|
![](/i/fill.gif) |
Warp wrote in message <3c77e96e@news.povray.org>...
>Mark Wagner <mar### [at] gte net> 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
|
![](/i/fill.gif) |