Hi all again.
Can anyone explain to me how I might be able to find the point of a circle that is closest to the origin (0,0)? Spent years in school and university doing math but I don't seem to have the slightest idea on how it might be calculated.
Printable View
Hi all again.
Can anyone explain to me how I might be able to find the point of a circle that is closest to the origin (0,0)? Spent years in school and university doing math but I don't seem to have the slightest idea on how it might be calculated.
Can I delete a thread?
Came to me just after i posted it. A line from the origin to the centre of the circle will cross the point. And after my last post regarding Arcs and Lines I have the calcs.
If you draw a straight line from the center of the circle to the origin, the point you want is the intercept of the line with the circle. To find it you solve for the 2 equqtions:
(Straight line)
y = bx/a
(Circle)
y = b - Sqrt[r2 - (x - a)2]
where r is the radius of the circle and (a,b) the coordinates of its center.
Although this thread has been marked resolved even before I suggested a way to solve it I think I must make a clarification to avoid misleading someone.
The above method is correct but the algebra is cumbersome. However there's a much more straightforward way to find the solution.
If (p,q) are the sought corrdinates of the closest point, r the radius of the circle and (a,b) the corrdinates of its center, then,
p + r*cos(alpha) = a
where alpha is the angle between the x axis and the line from the origin to the center of the circle.
tan(alpha) = b/a -> cos(alpha) = a/Sqr[a2 + b2]
So, finally,
p = a[1 - r/Sqr(a2 + b2)]
and q = bp/a = b[1 - r/Sqr(a2 + b2)]