The parametric equation for moving around the circle is as follows:
x=r*cos(theta) y=r*sin(theta)
theta is the angle, and r is the radius.
If you want to know the change in theta , in order to get the desired speed, deciding on the distance d , you get that change in theta : arccos(1-(d/r)^2/2)
JavaScript functions: Math.cos , Math.sin, and Math.acos , respectively. All of them relate to radians.
simonzack
source share