|
-
Nov 1st, 2006, 04:38 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] Closest point to a circle
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.
-
Nov 1st, 2006, 04:46 PM
#2
Thread Starter
Fanatic Member
Re: Closest point to a circle
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.
-
Nov 1st, 2006, 05:02 PM
#3
Re: [RESOLVED] Closest point to a circle
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.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
-
Nov 1st, 2006, 06:02 PM
#4
Re: [RESOLVED] Closest point to a circle
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)]
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|