Results 1 to 4 of 4

Thread: [RESOLVED] Closest point to a circle

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Resolved [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.

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    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.

  3. #3
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    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)

  4. #4
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    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
  •  



Click Here to Expand Forum to Full Width