We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Given the x,y, and radius of a circle, and given a point inside the circle, how can I find the closest point on the circle to my point without brute forcing? Is there a way?
Found my answer here:
http://stackoverflow.com/questions/300871/best-way-to-find-a-point-on-a-circle-closest-to-a-given-point
double vX = pX - cX; double vY = pY - cY; double magV = sqrt(vX*vX + vY*vY); double aX = cX + vX / magV * R; double aY = cY + vY / magV * R;
Answers
Found my answer here:
http://stackoverflow.com/questions/300871/best-way-to-find-a-point-on-a-circle-closest-to-a-given-point