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

An open space where people who use Blender in an academic environment can share progress and the typical problems and needs of academic environments.

Moderators: jesterKing, stiv

simtron
Posts: 131
Joined: Sat Sep 11, 2010 8:33 pm

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

Postby simtron » Wed Jun 22, 2011 8:17 am

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.

MacMesh
Posts: 3
Joined: Thu Jul 28, 2011 1:28 am

Postby MacMesh » Thu Jul 28, 2011 2:02 am

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?


Return to “Academic & Research”

Who is online

Users browsing this forum: No registered users and 2 guests