comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Check if a point is inside a polygon mesh
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Check if a point is inside a polygon mesh [message #45232 is a reply to message #45231] Thu, 18 August 2005 09:10 Go to previous message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
On Thu, 18 Aug 2005 03:53:19 -0700, photosalex@freenet.de wrote:

> Hello, All!
>
> Does anybody know a way to figure out if a 3D point lies inside a
> closed 3D triangular polygon mesh. The mesh is a tricky engineering
> construction of thousands of vertices with holes, stems, supports etc.,
> rather than a rectangular slab.
>
> The question arose basically from the task to find the coordinates of
> the intersection(s) of a ray with an arbitrary volumetric IDL model.
> I've searched the newsgroups but couldn't find a ready answer.
>
> If anyone provides me with information on either problems, I'd be very
> grateful.
>
> Cheers!

One way to do it is to create a point that you know is outside of the
mesh. Use that point and the point in question to define a line segment.
Then, perform a simple triangle/line-segment intersection check for each
triangle in the mesh and keep track of the number of times the line
intersects a triangle. If the total number of intersections is odd, the
point in question is considered to be inside the closed mesh.

Karl
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: How to handle gaps in plot?
Next Topic: Re: Speeding Up Oracle DataBase Access with IDL DataMiner

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Nov 30 06:00:19 PST 2025

Total time taken to generate the page: 0.01549 seconds