POV-Ray : Newsgroups : povray.newusers : Points on line. : Re: Points on line. Server Time
30 Jun 2024 03:39:10 EDT (-0400)
  Re: Points on line.  
From: Warp
Date: 26 Nov 2011 07:24:42
Message: <4ed0da8a@news.povray.org>
kurtz le pirate <kur### [at] yahoofr> wrote:
> I have a point p1=<x1, y1, z1> and p2=<x2, y2, z2>

> I would put N equally spaced points on the 'line' from p1 to p2.

> Do you have an idea to do this ?

  You have been using POV-Ray too much when...

you wish you had paid more attention in math class instead if thinking that
you would never need that stuff in practice...

  :P

  An answer was already mentioned in another reply, but the explanation is:
You can calculate the weighted average of two points in the exact same way
as you would with to numbers. (If you change the weight linearly, you will
get linearly-placed points between the two endpoints.)

-- 
                                                          - Warp


Post a reply to this message

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