I am trying to render an image with return values from an attractor calculation and need to map the output to the screen.
a and b values are generated randomly between -3 and 3
c and d values are generated randomly between -.5 and 1.5
Then the X and Y coordinates are set using
self.xCoord = sin(self.yCoord * b) + c * sin(self.xCoord * b);
self.yCoord = sin(self.xCoord * a) + d * sin(self.yCoord * a);
The x and y coordinates always returning as decimal numbers and I am not sure what range is outputted from the formula.
I need to convert the number to the screen range so I can draw it.
Is there a way to calculate a range for a formula?