POV-Ray : Newsgroups : povray.advanced-users : Cubic splines Server Time
1 Nov 2024 17:19:29 EDT (-0400)
  Cubic splines (Message 1 to 2 of 2)  
From: Nikodemus Siivola
Subject: Cubic splines
Date: 19 May 2001 09:28:43
Message: <3b06750b@news.povray.org>
I am making some spline related macros - to learn and to use (and for
fun...), and up to a point things went smoothly.

No problems with linear splines or quadratic splines, even bezier splines
went fine... but the cubic spline has me stunted.

As far as I have understood, the function is

    r(t) = a + bt + ct^2 + d^3, t E [0,1]

    where,

    r(0) = a
    r(1) = a + b + c + d
    r'(0) = b
    r'(1) = b + 2c + 3d

    etc..

Now, my problem is not with a single spline segment but with fitting them
togather smoothly. Can anyone explain?

Sample images in p.b.i and code in p.t.s-f.

Desperately,

 - Nikodemus


Post a reply to this message

From: Nikodemus Siivola
Subject: Re: Cubic splines
Date: 19 May 2001 10:43:50
Message: <3b0686a6@news.povray.org>
> I am making some spline related macros - to learn and to use (and for
> fun...), and up to a point things went smoothly.
>
> No problems with linear splines or quadratic splines, even bezier splines
> went fine... but the cubic spline has me stunted.

Does it ever happen to you, that the minute you ask for help you stumble
upon a solution by accident?

:) I did. Found what I needed to see in the Spilineditor's web-page: the
tangent at P1 is parallel to the line connecting P0 and P2.

Happy me,

  -- Nikodemus


Post a reply to this message

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