Checking for a point inside a region of a spherical surface

Status
Not open for further replies.

zeeshanzia84

Full Member level 3
Joined
May 29, 2006
Messages
166
Helped
35
Reputation
70
Reaction score
17
Trophy points
1,298
Location
Pakistan / Germany
Activity points
2,680
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.
 

Re: Checking for a point inside a region of a spherical surf

I don't get you, do you mean in MATLAB for example or generally?
 

Re: Checking for a point inside a region of a spherical surf

I needed a mathematical procedure to do this, so I could implement this in C++.

I know how to do it now. Here's how:


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.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…