POV-Ray : Newsgroups : povray.general : Looking for a formula : Re: Looking for a formula Server Time
29 Jul 2024 04:26:48 EDT (-0400)
  Re: Looking for a formula  
From: Trevor G Quayle
Date: 12 Feb 2013 08:50:01
Message: <web.511a47e224d8606e81c811d20@news.povray.org>
FlyerX <fly### [at] yahoocom> wrote:
> On 2/11/2013 6:15 PM, H. Karsten wrote:
> > Hi people :)
> > I have two lines and like to have there intersection-point.
> >
> > Like
> > <Line_1_Start_X,Line_1_Start_y> to <Line_1_End_X,Line_1_End_Y>
> > and
> > <Line_2_Start_X,Line_2_Start_y> to <Line_2_End_X,Line_2_End_Y>
> >
> > And I like to get <Intersection_X,Intersection_Y>
> >
> > Is there any formula, coming with the PovRay-Inc-Files, like Math.inc, I can
> > use?
> >
> > Or does someone have a quick way to solve this?
> >
> > Tanx,
> > Holger :)
> >
> >
> >
> >
> http://mathworld.wolfram.com/Line-LineIntersection.html

Since you are dealing with lines in 3-space (x,y,z), the lines will only
intersect if they lie on the same plane.  Otherwise, the best you can do is find
the closest point.

-tgq


Post a reply to this message

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