POV-Ray : Newsgroups : povray.newusers : splines of variable length : Re: splines of variable length Server Time
30 Jul 2024 14:23:37 EDT (-0400)
  Re: splines of variable length  
From: Carl Hoff
Date: 22 Feb 2004 08:54:49
Message: <4038b4a9@news.povray.org>
Thanks guys...

   I replaced my spline declaration with this and all works fine.

#declare path1_spline = spline {
  linear_spline
  #declare ctr = 0;
  #while (ctr < path1_num - 0.5)
    path1_seg_time[ctr], path1[ctr][0],
    #declare ctr = ctr + 1;
  #end
}


"Kurts" <kur### [at] yahoofr> wrote in message
news:kurtzlepirate-698849.10382722022004@news.povray.org...
> In article <4037d7b3@news.povray.org>, "Hughes, B."
<omn### [at] charternet>
> wrote:
>
> > sphere_sweep doesn't seem to accept all the points given it by #while
loop,
> > from what I've found.
>
>   ??? and why not ?
>
> #declare sphereRadius = ...;
> #declare myPoint = <0, 0, 0>;
> #declare index = 0;
>
> #declare mySphereSweep = sphere_sweep {
>   cubic_spline
>   n,
>   #while (index<n)
>     #set myPoint = compute x,y,z for index's point;
>     <myPoint.x, myPoint.y, myPoint.z>, sphereRadius
>     #set index=index+1;
>   #end
>   }
>
> then use :
>   object { mySphereSweep texture { } }
>
> a+


Post a reply to this message

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