POV-Ray : Newsgroups : povray.general : Another one for the math wizards out there : Re: Another one for the math wizards out there Server Time
7 Aug 2024 15:14:49 EDT (-0400)
  Re: Another one for the math wizards out there  
From: Josh English
Date: 24 Aug 2001 17:54:09
Message: <3B86CC97.EF7198B4@spiritone.com>
Jim Kress wrote:

> I have an arbitrarily shaped surface that consists of millions of triangles.
> I know the coordinates of each triangular vertex as well as the normal at
> each vertex.
>
> I also have a line defined by two points and I know the coordinates of each
> point.
>
> How do I calculate the point on the line where the surface and the line
> intersect?
>
> Thanks for the help.
>
> Jim

Ron has the best answer.
The long way would mean testing each triangle to see if it crosses the line.
To test is a line intersects a triangle, you have to find the intersection of
the line and the plane defined by that triangle, then determine if that point
is in the triangle.

Trace is the fastest solution


--
Josh English
eng### [at] spiritonecom
The POV-Ray Cyclopedia http://www.spiritone.com/~english/cyclopedia/


Post a reply to this message

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