Results 1 to 9 of 9
Like Tree2Thanks
  • 1 Post By ebaines
  • 1 Post By ebaines

Math Help - Perpendicular Distance from Point to Arc

  1. #1
    Senior Member
    Joined
    Mar 2009
    Posts
    378

    Perpendicular Distance from Point to Arc

    I am sure the major portion of this has been covered, but I have an exception that I need to hash out.

    I want to find the intersection of two great circle arcs (numerically). I have already determined the location of the two intersection points of the two corresponding great circles. However, this leave me with the problem of determining which point lies on the great circle arc.

    Letlet p_1,\,q_1, p_2, q_2 define the great circle arcs, A_1,A_2, respectively, and let I_1,\, I_2 correspond to the intersections of the great circles. These intersections are antipodal of eachother, which is what causes my problem. To calculate the shortest distance between a point, X and a great circle I use the following
     n = p \times q
    then the perpendicular distance is given by
    \theta = \cos^{-1}(n \cdot X) - \frac{\pi}{2}.
    From here I check to see if \theta \le \epsilon.
    But, because of 0 \le \cos^{-1} X \le \pi I get that both I_1,\, I_2 are on the arc. How do I get the proper angle from \cos^{-1} using the information given?
    Last edited by lvleph; June 12th 2012 at 02:54 PM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Senior Member
    Joined
    Mar 2009
    Posts
    378

    Re: Perpendicular Distance from Point to Arc

    Is this a poorly asked question? It seems strange that no one has been able to answer this.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor ebaines's Avatar
    Joined
    Jun 2008
    From
    Illinois
    Posts
    1,095
    Thanks
    317

    Re: Perpendicular Distance from Point to Arc

    It is a little difficult to follow. I assume that one great circle arc is defined by two vectors p1 and q1, and the other by p2 and q2, correct? So you are trying to find the angular separation between X and either one of the great circles. I don't understand what you mean by "I get that both I_1 and I_2 are on the arc" -- they are the intersection points of the two great circle arcs, so yes, they are both "on the arc."

    I also don't get the formula for angular separation: \theta = \cos^{-1}(n \cdot X) - \frac {\pi}{2}: it seems with this formula that if X is on the arc then X is perpendicular to n, the dot product of n and X is 0, and hence the formula yields \theta = \frac{-\pi}2 instead of 0 as expected. I would think \theta = \sin^{-1}(n \cdot X)} would work better? One other thing - the values for theta ought to lie between 0 and pi/2, if the dot product yields a negative number I think you want to use its absolute value: \theta = \sin^{-1}(|n \cdot X|)}
    Last edited by ebaines; June 14th 2012 at 12:56 PM.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Senior Member
    Joined
    Mar 2009
    Posts
    378

    Re: Perpendicular Distance from Point to Arc

    I define two Arcs A_1,\, A_2 by the points \left\{p_1,\,q_1\right\},\left\{p_2,\,q_2\right\}, respectively, just as you said. What I want is A_1 \cap A_2. However, the way I have done this is by finding the intersection of the of two great circles corresponding to the given points. Since I find the intersection of two great circles, I get two intersections I_1,\, I_2. Only one of these two points actually lies on A_1 \cap A_2, so I figured I could just find the distance of each point to one of the arcs; the point with an angular distance closest to 0 would be the intersection of the two arcs. However, I get the same angular distance for both points. I hope this description is clearer.

    EDIT: The problem is that both I_1 and I_2 lie on the great circle, however only one lies on the arc. The question is how do I determine which lies on the arc?
    Last edited by lvleph; June 14th 2012 at 12:01 PM.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor ebaines's Avatar
    Joined
    Jun 2008
    From
    Illinois
    Posts
    1,095
    Thanks
    317

    Re: Perpendicular Distance from Point to Arc

    Quote Originally Posted by lvleph View Post
    The problem is that both I_1 and I_2 lie on the great circle, however only one lies on the arc. The question is how do I determine which lies on the arc?
    OK, I see. Two great circles will intersect at two points (assuming they are not coplanar), whereas two circle segments may have 0, 1 or 2 intersection points. How about this - if the angular distance from p to I_1 plus the angular distance from I_1 to q equals the angular distance from p to q then I_1 is between p and q and hence on the arc. If I_1 is not on the arc then the sum of these angles would be greater than the arc. You would have to use positive angles only, and control for the case where the arc is greater than 180 degrees.
    Thanks from lvleph
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Senior Member
    Joined
    Mar 2009
    Posts
    378

    Re: Perpendicular Distance from Point to Arc

    That sounds plausible. The other solution I was thinking might works is to look at \|p_1 - I_1\|_0 and \|p_1 - I_2\|_0 the smaller distance is the point I want. This will work because I know my arcs are small.
    Last edited by lvleph; June 14th 2012 at 12:58 PM.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    MHF Contributor ebaines's Avatar
    Joined
    Jun 2008
    From
    Illinois
    Posts
    1,095
    Thanks
    317

    Re: Perpendicular Distance from Point to Arc

    If the arcs are always less than 90 degrees in length and if there is always an intersect point on the arcs then yes, it would work.
    Thanks from lvleph
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Senior Member
    Joined
    Mar 2009
    Posts
    378

    Re: Perpendicular Distance from Point to Arc

    Good point, part of what I am checking is if there is even an intersection, so my method won't work.
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Senior Member
    Joined
    Mar 2009
    Posts
    378

    Re: Perpendicular Distance from Point to Arc

    Numerically, your test has a problem. If the intersection is one of the end points of an arc it can cause acos to throw NaN. But, I can detect this.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 6
    Last Post: May 16th 2011, 04:57 AM
  2. Replies: 1
    Last Post: April 6th 2011, 06:44 AM
  3. 3D perpendicular distance
    Posted in the Geometry Forum
    Replies: 1
    Last Post: March 18th 2010, 02:10 PM
  4. Perpendicular distance from point and plane question
    Posted in the Advanced Algebra Forum
    Replies: 0
    Last Post: March 2nd 2009, 04:39 PM
  5. Replies: 3
    Last Post: February 20th 2008, 10:17 AM

Search Tags


/mathhelpforum @mathhelpforum