|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello,
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 ?
Thanks
--
klp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
#local i=0; #while(i<N)
sphere {
0, 1
translate p1+(i/(N-1))*(p2-p1)
}
#local i=i+1; #end
kurtz le pirate <kur### [at] yahoofr> wrote:
> Hello,
>
> 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 ?
>
>
> Thanks
>
> --
> klp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <web.4ed0c35e6b9045f7c4586f720@news.povray.org>,
"Roman Reiner" <lim### [at] gmxde> wrote:
> #local i=0; #while(i<N)
> sphere {
> 0, 1
> translate p1+(i/(N-1))*(p2-p1)
> }
> #local i=i+1; #end
>
Thanks Roman, it was really too simple...
--
klp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |