Jump to content
  • Advertisement
Sign in to follow this  
zeeshanzia84

Checking for a point inside a region of a spherical surface

This topic is 3625 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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. The sphere is centered at the origin. I need to find out whether X lies on the spherical 'triangular' area enclosed by A,B, and C or not. Can any one tell me how to do this? Thanks a lot in advance.

Share this post


Link to post
Share on other sites
Advertisement
I may not be thinking about this right, but if the point were on the 'triangle', wouldn't it also be on the 'inside' of each of the three planes formed by the sphere center and the triangle vertex pairs?

Share this post


Link to post
Share on other sites
I've never actually done this, but the answer seems intuitive enough.

Calculate three planes. Each one is defined by three points: 2 of your "spherical triangle" points and the center of your sphere. Have the normals of the planes pointing "inwards" on your spherical triangle. The space inside those three planes defines your spherical triangle. Check your test point against the planes; if it's on the side of the plane where the normal is pointing, it's inside your spherical triangle.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!