|
|
> ... I tried to transform the spline coordinates to something more
> accessible, but that fails because one has no possibility to know how
> far on the spline a given point (x,y,z) is.
This macro can estimate the distance between points on a spline
by summing the linear distance between a number of sub-points.
#macro Len_Spline(Espl begin_at stop_at num)
#local c = 1/num;
#local V1 = Espl(begin_at);
#local result = 0;
#while (c <= 1)
#local V2 = Espl( c*(stop_at - begin_at) + begin_at);
#local result = result + vlength(V2-V1);
#local V1 = V2;
#local c = c + 1/num;
#end
(result)
#end
#declare sample = Len_Spline(ABC_spl, 0, 0.5, 2000);
You might also want to look at the MSM macro in
Ingo's meshmaker stuf. http://members.home.nl/seedseven/
Post a reply to this message
|
|