POV-Ray : Newsgroups : povray.general : Subdividing a spline : Re: Subdividing a spline Server Time
31 Jul 2024 22:09:05 EDT (-0400)
  Re: Subdividing a spline  
From: Tim Attwood
Date: 23 Jul 2006 12:38:25
Message: <44c3a601@news.povray.org>
// straight line segment evaluation
#macro Len_Spline(Espl begin_at stop_at num)
   #local c = 1/num;
   #local V1 = Espl(begin_at);
   #while (c <= 1)
      #local V2 = Espl( c*(stop_at - begin_at) + begin_at);
      vlength(V2-V1)+
      #local V1 = V2;
      #local c = c + 1/num;
   #end
   0
#end

#declare sample = Len_Spline(ABC_spl, 0, 0.5, 10000);


Post a reply to this message

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