POV-Ray : Newsgroups : povray.general : evenly spaced points on splines : Re: evenly spaced points on splines Server Time: 24 Jul 2008 08:54:51 GMT
  Re: evenly spaced points on splines  
From: Tim Attwood
Date: 13 Apr 2008 22:15:55
// calculate the length of a spline
#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


Post a reply to this message

Copyright 1991-2004 POV-Team™