The x direction ratio is (tx-cx) / r, where r is the radius of the circle. Similarly, the y direction ratio is (ty-cy) / r.
I take the right Cartesian coordinate with the x axis in the direction to the right of the image. Otherwise, you may need to multiply (-1) to adjust the direction.
source
share