I am trying to find a random point search algorithm at a given distance from a base point. For example:
alt text http://i34.tinypic.com/2e4vxao.png
It may just be basic math, and my brain isn’t working yet (forgive me, I haven’t brought coffee yet :)), but I tried to figure it out on paper and I won’t go anywhere.
coordinate of a point on a circle with radius R and center (xc, yc):
x = xc + R*cos(a); y = yc + R*sin(a);
changing the value of the angle a from 0 to 2 * PI, you can find any point on the circle.
Use the angle from the vertical as your random input.
:
angle = rand(0,1) x = cos(angle * 2 * pi) * Radius + x_centre y = sin(angle * 2 * pi) * Radius + y_centre
The main Pythagoras.
Choose a random number between 0 and 50 and specify h ^ 2 = a ^ 2 + b ^ 2 Add some random descriptions in the direction.