stevenvh wrote:
this a quick and dirty macro I use:
#macro SmoothSpline( Spline, Grain )
//regularizes the spline definition so
//the distance along the spline will be
//more proportional to the clock value
//first measure the input spline
#local TL=0;
#local Ptr=1;#while(Ptr<=Grain)
#local TL=
TL+vlength( Spline(Ptr/Grain)
-Spline((Ptr-1)/Grain) );
#local Ptr=Ptr+1;#end
//now redefine the spline
#local L=0;
spline {
natural_spline
0 Spline(0)
#local Ptr=1;#while(Ptr<=Grain)
#local L=
L+vlength( Spline(Ptr/Grain)
-Spline((Ptr-1)/Grain) );
L/TL Spline(Ptr/Grain)
#local Ptr=Ptr+1;#end
}
#end
Post a reply to this message
|