POV-Ray : Newsgroups : povray.general : Cubic spline question : Re: Cubic spline question Server Time
6 Aug 2024 23:28:01 EDT (-0400)
  Re: Cubic spline question  
From: ingo
Date: 17 Feb 2002 06:41:54
Message: <Xns91B8817AE8F1Cseed7@povray.org>
On 2002 02 17, you wrote in povray.general:

> If I knew for certain what sort of cubic spline is used in "prism",
> I'd be able to duplicate it and add it as another type of pure
> spline. 
> 

If I understand the source right it indeed is a Catmull-Rom spline:

 CatMul Rom basis Matrix (hits every input vector)
 As T goes from 0 to 1 you go from n to n+1
          n-1      n   n+1   n+2
   T^3     -1     +3    -3    +1     /
   T^2     +2     -5     4    -1    /
   T^1     -1      0     1     0   /  2 (divisor)
   T^0      0      2     0     0  /


In that case, could you use the spheresweep code?

Also IMO in the spheresweep the camul_rom_spline keyword should be 
replaced by cubic_spline. In the docs we can then make clear that what 
is 
called a cubic spline in POV-Ray is the catmull-rom spline.


I posted a basic file on splines, that shows the matrices and the their 
in:

Newsgroups: povray.binaries.tutorials
Subject: Splines.bas
From: ingo <ing### [at] homenl>
Message-ID: <Xns### [at] povrayorg>
Date: 17 Feb 2002 06:35:16 -0500
Xref: news.povray.org povray.binaries.tutorials:1289


Ingo

p.s. (sorry Mark, hit a wrong button, so you also got it by mail)


Post a reply to this message

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