POV-Ray : Newsgroups : povray.advanced-users : Intersection test for triangles : Re: Intersection test for triangles Server Time
30 Jul 2024 02:23:31 EDT (-0400)
  Re: Intersection test for triangles  
From: David Fontaine
Date: 24 May 2000 18:26:19
Message: <392C5626.C0BC36B0@faricy.net>
John VanSickle wrote:

> 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

Wow, sounds like it will take a long time to parse. (I actually want it to
test cubes for intersection, but the faces can be considered two triangles,
and if the faces don't intersect the cubes don't. For the bowl-full-o-cubes
thing...)

--
David Fontaine     <dav### [at] faricynet>     ICQ 55354965
Please visit my website: http://www.faricy.net/~davidf/


Post a reply to this message

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