POV-Ray : Newsgroups : povray.general : Point along a line. : Re: Point along a line. Server Time
4 Aug 2024 04:14:33 EDT (-0400)
  Re: Point along a line.  
From: Steve Martin
Date: 19 Jul 2003 08:02:19
Message: <3f19334b@news.povray.org>
BorisW37 wrote:
> If i have 2 points A <x1,y1,z1> and B <x2,y2,z2>, how do i find coordinates
> of point C <x3,y3,z3> which lies on the line AB, distance D from point A?

x3 = x1 + D * (x2 - x1)

assuming 0 <= D <= 1 (in other words,
assuming D is normallized).

Repeat for y and z.



-- 
Steve Martin, CPBE CBNT


Post a reply to this message

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