POV-Ray : Newsgroups : povray.advanced-users : 3D mathematics question : Re: 3D mathematics question Server Time
28 Jul 2024 16:24:33 EDT (-0400)
  Re: 3D mathematics question  
From: Tim Nikias
Date: 8 Nov 2004 16:11:52
Message: <418fe118$1@news.povray.org>
> Suppose I have a triangle with corners A, B and C. Suppose, further,
> that I have a line that passes through P and Q.
>
> Now... how do I figure out whether these two objects intersect each
> other? (I don't care *where* they intersect, only *if*.)

Well, you could generate the plane of the triangle, and then cut the line
through P and Q with that plane. The angle between the vectors that point
from the intersection to the three corners then needs to add up to 360
degrees to lie in the triangle.

I hope that's correct, just wrote this off the top of my head. Maybe someone
can correct me if I've missed something.

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

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