POV-Ray : Newsgroups : povray.beta-test : Spline inconsistencies Server Time
30 Jul 2024 10:25:50 EDT (-0400)
  Spline inconsistencies (Message 51 to 54 of 54)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Mark Wagner
Subject: Re: Spline inconsistencies
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

From: Rune
Subject: Re: Spline inconsistencies
Date: 24 Feb 2002 09:51:52
Message: <3c78fe08@news.povray.org>
"Warp" wrote:
>   Eh, you didn't understand what I meant: I meant that
> a macro would be cumbersome because of limited syntax
> capabilities.

The suggested syntax I've described in the other thread is not *that*
cumbersome. You have to write a few more characters per point, yes, but
complaining about that is most of all nit-picking IMO.

> Using an "illegal" value to mean optionality is not
> very handy either (in a worst case scenario you would
> have to write tens or even hundreds of these "optional"
> time values even though you are using just two or three
> regular time values).

Copy and paste.

>   The idea was that you don't have to write any time
> value for those points which you want to be calculated
> automatically.

I must admit that it would make it better for the purposes of obfuscated
signatures. Pity eh?

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Feb 16)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: Rune
Subject: Re: Spline inconsistencies
Date: 24 Feb 2002 12:12:36
Message: <3c791f04@news.povray.org>
"Mark Wagner" wrote:
> The work needed to add catmull-rom splines:

> Possibly add the definition of "catmull_rom_spline" and
> "natural_cubic_spline" to parse.h and tokenize.cpp

You might want to check with Thorsten, but I think it was more or less
decided to call the catmull-rom spline for "cubic_spline" and the natural
cubic spline for "natural_spline".

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Feb 16)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Spline inconsistencies
Date: 24 Feb 2002 13:07:52
Message: <3c792bf8$1@news.povray.org>
In article <3c788234@news.povray.org> , "Mark Wagner" <mar### [at] gtenet>
wrote:

> 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

If you just do this part, I can easily do the rest while integrating the code.
You can test it by temporarily using the cubic_spline option or something -
integrating parser code based on pre-3.5 code would take more time than
writing it from scratch...

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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