Results 1 to 14 of 14

Math Help - Checking for a point inside a region of a spherical surface

  1. #1
    Newbie
    Joined
    May 2008
    Posts
    13

    Checking for a point inside a region of a spherical surface

    Hi everybody,

    I am working on a 3D Morphing algorithm.

    I have a point X on lying on a unit sphere in the spherical coordinate system. I have three other points A,B, and C which are also on the unit sphere.

    I need to find out whether X lies on the spherical surface enclosed by A,B, and C or not.

    Can any one tell me how to do this?

    Thanks a lot in advance.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Aug 2007
    From
    USA
    Posts
    3,111
    Thanks
    2
    Are these spheres centered at the Origin? Distance formula is sufficient.

    If not, then find the center of the ABC sphere and it's the same problem.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    May 2008
    Posts
    13
    Thank you very much for your reply.

    Yes, the sphere is centered at the origin.

    Can you please explain, how the distance formula maybe used to find this out?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Joined
    Aug 2007
    From
    USA
    Posts
    3,111
    Thanks
    2
    In Rectangular Coordiantes, the point's address, (x,y,z) are easily used to calculate the distance - or in this case the square fo the distance will be fine - assuming the UNIT sphere is the only measure fo concern.

    Distance From Origin = \sqrt{x^{2}+y^{2}+z^{2}}

    If that's Greater than 1, it's outside.

    I think your only real problem is likely to be precision. Is 1.00000000001 Outside or ON the Unit sphere? You WILL have to make up your mind.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    May 2008
    Posts
    13
    Thanks for the reply. But, you didn't understand the problem at all. All four point lie on the same unit sphere center at the origin. So, ofcourse their distances from the origin will be 1 !

    I want to decide whether X lies within the area that is bounded by A,B and C.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    MHF Contributor
    Joined
    Aug 2007
    From
    USA
    Posts
    3,111
    Thanks
    2
    Well, it wasn't all that bad. I seem to have missed this section "which are also on the unit sphere". It is hard to judge the level of the question when no work is shown.

    Find the three planes: OAB, OBC, OCA.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    May 2008
    Posts
    13
    Thanks a lot. I get it now!
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Newbie
    Joined
    Jun 2008
    Posts
    3
    I'm new in sphere math world and i have the same problem.
    Perhaps I'm wrong or perhaps I don't know how to implement the method of the planes you have decribed previously, but I think you are missing a little surface where you point may lye. If the region enclosed by points A B C is really a triangle (triangulated sphere) there will be no problem(I don't know how to calculate but I guess there will no information missing). But if points do not form a triangle but something like this:

    B
    A )
    C

    The plane OBC will leave outside the region |).

    Correct me if i'm wrong
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Newbie
    Joined
    May 2008
    Posts
    13
    Yes egvega you are right. And this was the whole problem. Otherwise, finding a point exists within a triangle is not difficult.

    The region bounded by the three points will NOT be (and cannot be) triangular on the sphere's surface! Still, the method described by TKHUNNY should work.
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Newbie
    Joined
    Jun 2008
    Posts
    3
    You're lucky if it's useful but i'm still trying to solve the problem. The case is that I do care about the region left outside the planes.
    I found a way to know where the point is using sphere coordinates theta and phi but when the sphere rotate and the point is fixed, I don't know how to calculate the new region(i give numbers to them) enclosed by other 3 or 4 points where the point lyes. So I was looking for some general algorithm that i can apply no matter which rotation and how many of them I perform on the sphere.
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Newbie
    Joined
    May 2008
    Posts
    13
    Their won't be ANY region left outside.
    Follow Math Help Forum on Facebook and Google+

  12. #12
    Newbie
    Joined
    Jun 2008
    Posts
    3
    If you have the point A on one pole and both,B and C, on, let's say, 45 degrees of latitude. The line conecting B and C will be an arc. So the plane OBC will leave some of the region outside. Check it with a ball, I have one on my hands right now
    Follow Math Help Forum on Facebook and Google+

  13. #13
    Newbie
    Joined
    May 2008
    Posts
    13
    Yes. Now imagine a plane containing the points O,A,B (this plane is perpendicular to the curvature) ....now take another plane O,A,C and another plane O,B,C ..

    Now we just need to find whether X lies 'IN BETWEEN' these three planes.
    Follow Math Help Forum on Facebook and Google+

  14. #14
    MHF Contributor
    Joined
    Aug 2007
    From
    USA
    Posts
    3,111
    Thanks
    2
    The three cutting planes must be distinct. If you get only 2 planes, B is on OAC, for example, the problem of containment makes no sense. A, B, and C must be NONcolinear - in a Great Circle sense.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 0
    Last Post: October 18th 2011, 05:48 AM
  2. Area of a surface inside a cylinder
    Posted in the Calculus Forum
    Replies: 3
    Last Post: November 26th 2010, 04:05 PM
  3. Replies: 5
    Last Post: November 9th 2010, 06:15 PM
  4. Replies: 2
    Last Post: September 15th 2010, 05:27 AM
  5. Replies: 2
    Last Post: September 6th 2008, 03:20 AM

Search Tags


/mathhelpforum @mathhelpforum