|
![](/i/fill.gif) |
Warp <war### [at] tag povray org> wrote in news:3c761b7b@news.povray.org:
> But with an existing macro you can achieve the same thing with a lot
> less work. For example:
>
> #declare Points = array[6]
> { <1,1,1>, <2,2,2>, <3,3,3>, <3.5,3.5,3.5>, <4,4,4>, <5,5,5> }
>
> CreateSpline(Points)
Quoted code is from your own post:
#macro CreateSpline(cspoints)
// Keep parameter names lowercase to prevent
// name collisions with functions and other macros.
> spline
> { cubic_spline
> #declare Ind = 0;
#declare EndInd = dimension_size(cspoints, 1)-1;
> #while(Ind <= EndInd)
Ind/EndInd, cspoints[Ind]
> #declare Ind = Ind+1;
> #end
> }
#end
> Using the current spline syntax is certainly not "much easier". In
> fact, it's a lot more tedious and difficult.
Macros will fix that.
Post a reply to this message
|
![](/i/fill.gif) |