Geometry – Find the Nearest Point on an Arc from Another Point

circlesgeometry

I have an arc defined with an origin, radius and the two angles the arc is restricted to on the circle.

I am trying to find how to get the nearest point on the arc from another point.

I can easily get the nearest point on a full circle but not sure how to do it when it is restricted to an arc.

Best Answer

WLOG we may assume the centre of the circular arc to be origin and radius to be $r$. So parametrically the points on the arc may be defined as $(r\cos \theta,r\sin \theta)$ where $\theta \in [\alpha,\beta]$.

$D^2=(x-r\cos \theta)^2+(y-r\sin \theta)^2$

$=x^2+y^2+r^2-2r(xr\cos \theta+yr\sin \theta)$

$=x^2+y^2+r^2-2r\sqrt{x^2+y^2}\cos \left(\theta-\tan^{-1}\frac{y}{x}\right)$

Substituting for $\theta \in [\alpha,\beta]$ we may obtain the distance of any point on arc from $(x,y)$.

To obtain the shortest distance we find that value of $\theta \in [\alpha,\beta]$ for which $D^2$ is minimum. Corresponding to that particular $\theta$ we find the point $(r\cos \theta,r\sin \theta)$