POV-Ray : Newsgroups : povray.advanced-users : Intersection test for triangles : Re: Intersection test for triangles Server Time
2 Nov 2024 03:17:14 EDT (-0400)
  Re: Intersection test for triangles  
From: John VanSickle
Date: 24 May 2000 07:46:18
Message: <392BC0F8.5BA8C2EF@erols.com>
David Fontaine wrote:
> 
> Given the points of two triangles, how do I test for intersection?

Try this:

Find the planes that contain each triangle; if they are parallel (but
not coincident), the triangles do not intersect.

Find the line along which the planes intersect.

Find the part of the line that lies within the first triangle.  If the
line lies out of the triangle, the triangles do not intersect.

Find the part of the line that lies within the second triangle.  If the
line falls out of the triangle, the triangles do not intersect.

If the two resulting line segments overlap, the triangles intersect.
Otherwise, they don't.

Hope this helps,
John


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.