POV-Ray : Newsgroups : povray.general : Intersection of two vectors : Re: Intersection of two vectors Server Time
24 Apr 2024 01:41:58 EDT (-0400)
  Re: Intersection of two vectors  
From: clipka
Date: 21 Jul 2018 06:45:22
Message: <5b530ec2$1@news.povray.org>
Am 21.07.2018 um 12:15 schrieb Mike Horvath:
> Is there already a function/macro for determining the intersection of
> two coplanar lines or vectors? (So I don't have to program it again.)

Not out of the box, as far as I know.

One approach to solve this problem would be to compute a transformation
from their common plane to the XY plane, then compute the intersection
point there, and finally apply the inverse transformation to the result
point. Finding a suitable transformation may not be trivial for general
cases though.

Another approach would be to determine the pair of points where the two
lines come closest to each other (there must be a general formula for
this somewhere), and either just pick one or compute the average of the
two. You can also use the distance between those two points as an
inexpensive coplanarity test if necessary.


Post a reply to this message

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