POV-Ray : Newsgroups : povray.advanced-users : subtle behavior of Spline_Trans() macro in transforms.inc Server Time
8 Jul 2024 18:05:57 EDT (-0400)
  subtle behavior of Spline_Trans() macro in transforms.inc (Message 31 to 33 of 33)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Warp
Subject: Re: subtle behavior of Spline_Trans() macro in transforms.inc
Date: 22 Apr 2009 16:25:00
Message: <49ef7d1b@news.povray.org>
Kenneth <kdw### [at] earthlinknet> wrote:
> Yet, from the user's standpoint, the docs still leave out a few details that
> would be useful (to avoid 'mysterious behavior'): What exactly *is* meant by a
> 'low' value for Foresight;

  The value should be small enough so that such a section of the spline of
that length has no significant curvature. (The more curvature there is in
the section of the spline between the two sample points, the less accurate
the approximated direction vector will be.)

> and what's the lowest value that we shouldn't go
> below. In light of all that's been said, I think the only thing that *is*
> needed is a caveat in the docs--perhaps in one of those yellow boxes--something
> like this:
> "Since it's mathematically difficult to determine EXACT alignment using
> Foresight, a recommended lowest value is *-----*."

  The problem is that there's not really a good lowest (or largest)
recommended value because it depends on the spline itself.

  You can't just say "a value of 1e-10 is recommended" because then if
your spline control points are at huge distances, you will get significant
rounding errors. On the other hand you can't say "a value of 0.1 is
recommended" because if your spline control points use very small values,
you will get significant approximation errors (because the curvature of
the spline will probably be very significant on those distances).

  "A value of 1/100 of the minimum distance between two consecutive control
points" could be closer to working, but could still depend on the spline
(if the curvature is really pronounced at some location, even that value
might not be accurate enough).

-- 
                                                          - Warp


Post a reply to this message

From: Kenneth
Subject: Re: subtle behavior of Spline_Trans() macro in transforms.inc
Date: 23 Apr 2009 14:50:00
Message: <web.49f0b751987a083ff50167bc0@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Kenneth <kdw### [at] earthlinknet> wrote:
> > ...In light of all that's been said, I think the only thing that *is*
> > needed is a caveat in the docs--perhaps in one of those yellow boxes--
> > something like this:
> > "Since it's mathematically difficult to determine EXACT alignment using
> > Foresight, a recommended lowest value is *-----*."
>
>   The problem is that there's not really a good lowest (or largest)
> recommended value because it depends on the spline itself.
>

Ah, I had a funny feeling that this might be the case.  Oh well...

Maybe a more prosaic warning in the docs could be this:
"WATCH OUT! You might choose a too-low Foresight value that will flip the
object(s) 90-degrees! If that happens--choose a higher one, dummy!"  ;-P

KW


Post a reply to this message

From: Warp
Subject: Re: subtle behavior of Spline_Trans() macro in transforms.inc
Date: 23 Apr 2009 14:55:43
Message: <49f0b9af@news.povray.org>
Kenneth <kdw### [at] earthlinknet> wrote:
> "WATCH OUT! You might choose a too-low Foresight value that will flip the
> object(s) 90-degrees! If that happens--choose a higher one, dummy!"  ;-P

  Actually if you start getting significant rounding errors because the
values involved are too small (for 64-bit floating point), the object
might not flip 90 degrees, but behave otherwise erratically.

-- 
                                                          - Warp


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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