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

Home » Public Forums » archive » Re: some geometry questions.
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: some geometry questions. [message #48170 is a reply to message #48152] Wed, 29 March 2006 21:29 Go to previous messageGo to previous message
Karl[1] is currently offline  Karl[1]
Messages: 79
Registered: October 2005
Member
You might do a google search for "signed areas" and/or see:

http://softsurfer.com/Archive/algorithm_0101/algorithm_0101. htm#Triangles

The idea is to take the vector cross product of something like
(v4-v1)x(v2-v1) and compare it to (v2-v3)x(v4-v3). If the signs of the
z components are different, the lines cross.

A much bigger hammer to use is IDLgrTessellator. If you call the
AddPolygon method with those 4 points and then call the Tessellate
method, the tessellator will always return 2 triangles, but it will
return a 5th point if the lines cross, since the 5th point is needed to
define the point of intersection.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Corrected copy of Intro to IDL available
Next Topic: About iTools

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

Current Time: Sun Oct 12 01:30:18 PDT 2025

Total time taken to generate the page: 0.48232 seconds