Well, an arc is a piece of a circle. The general formulas for a circle are
x = r * cos(a) + cx
y = r * sin(a) + cy
Where r
is the radius of the circle, a
is the angle along the circle (in radians), and cx
and cy
are the coordinates of the center of the circle.
So each frame you would increment the angle (a
) and recalculate the position with those formulas.
The trick will be determining the appropriate radius and center points. You could probably figure out an algorithm that would find a center point based on a fixed radius.
Edit: To get the same velocity at different radii.
To get velocity (pixels/sec) from angular velocity (rad/sec)
v = Δa * r
So if we pick some v
, then Δa = v / r
where v is some constant and r is the radius of the circle.