POV-Ray : Newsgroups : povray.beta-test : Spline inconsistencies : Re: Spline inconsistencies Server Time
30 Jul 2024 04:17:11 EDT (-0400)
  Re: Spline inconsistencies  
From: Mark Wagner
Date: 24 Feb 2002 01:03:32
Message: <3c788234@news.povray.org>
Warp wrote in message <3c77e96e@news.povray.org>...
>Mark Wagner <mar### [at] gtenet> wrote:
>>>  By the way, any chance of making the time values optional?
>
>> No.  The time for feature requests is over, particularly for difficult
>> feature requests such as this.
>
>  Adding support for catmull-rom splines was a feature request, which is
>being considered.
>  I was just suggesting that as someone is going to make changes to the
>spline code anyways, if he could go a bit further.

When I re-wrote the MegaPOV spline code, I deliberately made it easy to add
more spline types.  Consequently, doing so will probably take about two to
three hours to implement and debug.
The work needed to add catmull-rom splines:

Add a catmull_rom_interpolate() function to splines.cpp
Add one "case" statement to the switch statement in Get_Spline_Val() in
splines.cpp
Add a #define for catmull-rom splines to the splines.h file
Add a CASE(CATMULL_ROM_SPLINE_TOKEN) to Parse_Spline() in express.cpp
Add a CASE(CATMULL_ROM_SPLINE_TOKEN) to Parse_Num_Factor() in express.cpp
Possibly add the definition of "catmull_rom_spline" and
"natural_cubic_spline" to parse.h and tokenize.cpp

The work needed to add optional time values to splines:
A partial re-write of the Parse_Spline() function
A re-write of Insert_Spline_Entry()
Adding a "Post_Spline()" function to compute the time values that were not
given once parsing the spline is complete.
Far more time spent debugging this feature than I will have available in the
next few months

--
Mark


Post a reply to this message

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