POV-Ray : Newsgroups : povray.general : Help on Splines : Re: Help on Splines Server Time
1 Aug 2024 16:32:32 EDT (-0400)
  Re: Help on Splines  
From: Jim Charter
Date: 20 Jul 2005 10:54:02
Message: <42de658a$1@news.povray.org>
Chrisir wrote:

I think it's easiest to use a type other than cubic_spline

something like:

#macro U_Spline ( Start, Height, End )

         spline {
                natural_spline
                0/2 Start
                1/2 ((End-Start)/2)+<0,Height,0>
                2/2 End
         }

#end

//usage
#local Myspline = U_Spline ( <0,0,0>, 3, <2,1,1> );

#local Grain=30;
#local I=0;#while(I<Grain)
         sphere { 0, .1
                pigment { rgb <1,0,1> }
                finish { ambient 1 }
                translate Myspline(I/Grain)
         }
#local I=I+1;#end


Post a reply to this message

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