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] spiritone com
The POV-Ray Cyclopedia http://www.spiritone.com/~english/cyclopedia/
Post a reply to this message
|