Previous Thread  Next Thread

chat icon How to verify if a point is inside or outside a 3d body???

simtron

Posted: Wed Jun 22, 2011 7:17 am
Joined: 11 Sep 2010
Posts: 129
A general geometry problem.

I'm trying to test some physics problem.I need to know if a point is in certain 3d volume enclosed by a model.I've tried to implement ray cast algo in 3d but I'm having problems.

I wish some one could explain me a better way to do it.
Reply with quote


MacMesh

Posted: Thu Jul 28, 2011 1:02 am
Joined: 28 Jul 2011
Posts: 3
Hello,

when you say ray cast algo, do you mean the algorithm where you intersect a ray from the point under consideration and compute the number of intersections with the object. In case of an odd number of intersections the point is inside the body and when the number of intersections is even the point is outside.
This seems to be the best method, I have been using this algorithm for years. What exactely seems to be your problem?
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group