POV-Ray : Newsgroups : povray.advanced-users : subtle behavior of Spline_Trans() macro in transforms.inc : Re: subtle behavior of Spline_Trans() macro in transforms.inc Server Time
5 Jul 2024 13:12:32 EDT (-0400)
  Re: subtle behavior of Spline_Trans() macro in transforms.inc  
From: scott
Date: 21 Apr 2009 10:21:22
Message: <49edd662@news.povray.org>
> That's the only 'real' trouble with the macro (actually more of a mystery 
> than a
> problem): how small to make Foresight to get 'bleeding edge' alignment 
> accuracy,
> without going so low as to cause the equations to flip the object 90-deg. 
> (I
> haven't yet done any tests to see what that value might be.) No mention of 
> it
> in the docs, unfortunately. I'm sure there's *some* kind of formula for
> determining that--probably based on the 'limited size of floating point
> numbers.' But in a practical sense--from the user's standpoint--it would 
> be
> useful if the docs actually stated such a lower-limit value, whatever it 
> is.
> That would keep any 'surprises' at bay. (Or--egads!--does the value depend 
> on
> other parameters like spline type?)

As Warp pointed out, going to really small values isn't really worth it most 
of the time.

As a rough rule-of-thumb, if R is the minimum radius of curvature in your 
spline, and D is the minimum error acceptable (in degrees) between the 
actual direction and the calculated direction, then use a foresight length F 
of:

F = R * D / 50

For example, if the tightest part of your spline is similar to a circular 
arc of radius 5 units, and you want alignment accuracy to within 1 degree, 
then use a foresight length of 5 * 1 / 50 = 0.1 units.


Post a reply to this message

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