POV-Ray : Newsgroups : povray.general : help with splines : Re: help with splines Server Time
30 Apr 2024 15:26:09 EDT (-0400)
  Re: help with splines  
From: Tor Olav Kristensen
Date: 12 Dec 2010 10:15:00
Message: <web.4d04e5ed464c1137c734aecd0@news.povray.org>
"yoyodunno" <nomail@nomail> wrote:
> Ok so I tried sampling points along the spline like this:
>
> #declare curve_Vectors=0;
>      //try to average curve length with averaging vectors
>      #declare curve_loop=2;
>         #while(curve_loop<11)
>                 #declare
>
curve_Vectors=curve_Vectors+vlength(spline_A(Nr+(stepValue*curve_loop))-spline_A(Nr+(stepValue*(curve_loop-1))));
>                 #declare curve_loop=curve_loop+1;
>         #end
>      #declare curve_Average=curve_Vectors/9; //try to get average length of 9
> subdivisions
>      #declare CumulativeDistance=CumulativeDistance+curve_Average;
>
>       object{tracks Spline_Trans(spline_A,CumulativeDistance,y,.1,.8)}
>
> So it does give slightly better spaced tracks, I made that while loop to try and
> average more vectors along the spline and it also helped slightly. But still not
> that much better than originally.
>
> Is there anything else to give a better approximation of the curve distance? And
> yeah that colefax macro didn't work for what I have since I'm using a natural
> spline, and also the Spline_Trans macro.

See my recent posts to povray.binaries.images and povray.text.scene-files

--
Tor Olav
http://subcube.com


Post a reply to this message

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