POV-Ray : Newsgroups : povray.advanced-users : Normalizing a quadratic spline : Re: Normalizing a quadratic spline Server Time
29 Jul 2024 14:18:34 EDT (-0400)
  Re: Normalizing a quadratic spline  
From: Christopher Johnson
Date: 13 Jan 2002 00:56:54
Message: <3c4121a6@news.povray.org>
"Chris Colefax" <chr### [at] tagpovrayorg> wrote in message
news:3c3d8543@news.povray.org...
> As you've discovered, traversing a curved spline at a constant speed is
not
> that simple.  The problem is that not only does each segment travel at its
> own speed, but within each segment there is acceleration and deceleration
> (generally slower around tighter corners).
>
> Now, I believe that there may be an analytical solution to the problem for
> quadratic splines, although this would involve recoding the internal
spline
> functions.  Instead, you may wish to try a solution similar to that I've
> used in my Spline Macro file.
>
> The file calculates cubic splines, for which no analytical solution
exists.
> Therefore, to achieve constant speed the macros actually evaluate the
spline
> at regular intervals, storing each time value and distance travelled in an
> array.  This array is then used to estimate the time value needed to
return
> a point at a particular distance along the spline, and using
equally-spaced
> distance values allows the spline to be traversed at constant speed.
>

Ok, I've moved from quadratic to cubic splines since cubics are much more
smooth.  Before I make one more attempt at this, I have two questions.....

1.  Using cubic splines (pov 3.5 native), does the number of control points
affect it's evaluation.  Basicly, are these treated as local splines or does
it slow down with more points?

2.  What are the space requirments for the splines in memory terms.  I'm
assuming there is some base amount + a certain value per point (depending on
how much the point needs).

Again, I do realize I'm digging a nice deep hole for myself with this one
but to be honest, I can't let go yet.  I have one more idea to try out.  So
far I've got a spline pre-processor that re-evaluates the time values for
each point.  The next step will have it subdivide the spline and add points
where neccessary.  If the number of control points doesn't adversely affect
performance, this might work .... to a degree.  Might as well give it a
shot.

Thanks again,
Chris J.


Post a reply to this message

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