POV-Ray : Newsgroups : povray.programming : information about splines Server Time
22 Dec 2024 17:50:54 EST (-0500)
  information about splines (Message 1 to 4 of 4)  
From: Jonathan
Subject: information about splines
Date: 10 Jun 2004 06:13:56
Message: <40c83464$1@news.povray.org>
Hi,

I would know a little bit much about how povray compute splines, and what
mathematical method of interpolation is used. I have looked to the
documentation, but I just have found there how to use them. Is there a most
accurate ressource (doc, article) about that?
It is to do a simple program to visualize spline.
Thanks,

Demaeyer Jonathan

nb: I apologize if I'm off-topic here. I wasn't sure.


Post a reply to this message

From: Thies Heidecke
Subject: Re: information about splines
Date: 10 Jun 2004 17:19:11
Message: <40c8d04f@news.povray.org>
> Hi,
Hi

> I would know a little bit much about how povray compute splines, and what
> mathematical method of interpolation is used. I have looked to the
> documentation, but I just have found there how to use them. Is there a
> most accurate ressource (doc, article) about that?
> It is to do a simple program to visualize spline.
> Thanks,
> Demaeyer Jonathan

This sums it up in pretty short words(with applet):
http://www.math.utah.edu/~wright/applets/spline/spline.html
or a bit better explained:
http://mathworld.wolfram.com/CubicSpline.html

The idea with splines is to have a number of controlpoints for which you
specify the position (x-coordinate) and the value (y-position). Now
you compute a cubic polynomial for each interval between two neighbouring
controlpoints. More precisely, you compute the cubic polys so that they
make a continuous function where they meet. Furthermore you demand the
same continuity for the first and second derivative. Since the polys
are cubics, the first derivative is a quadratic function and the second
derivative is linear. But they still are continuous. The third der.
is just a constant in each interval and all from the 4th der. up are zero.
I've attached(sorry in advance for doing that in a non-binary group)
a little picture showing an example spline with 6 controlpoints and 5
intervals. The spline itself is shown in blue, the 1st der. in red,
the 2nd der. in green and the 3rd in yellow.
The process of getting the coefficients is explained on the wolframpage.
Basically, you have to solve a linear equation system which is given by
your continuity-constraints for the function and the derivatives.

I hope this helps a bit,

Thies


Post a reply to this message


Attachments:
Download 'Cubic-Spline-Example.png' (8 KB)

Preview of image 'Cubic-Spline-Example.png'
Cubic-Spline-Example.png


 

From: Warp
Subject: Re: information about splines
Date: 11 Jun 2004 09:05:26
Message: <40c9ae16@news.povray.org>
Jonathan <jon### [at] hotmailcom> wrote:
> I would know a little bit much about how povray compute splines, and what
> mathematical method of interpolation is used.

  For the math behind splines, this should get you started (follow the
links to the different types of splines):

http://mathworld.wolfram.com/Spline.html

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Jonathan
Subject: Re: information about splines
Date: 11 Jun 2004 13:43:28
Message: <40c9ef40@news.povray.org>
"Thies Heidecke" <h3i### [at] gmxnet> wrote
>
> This sums it up in pretty short words(with applet):
> http://www.math.utah.edu/~wright/applets/spline/spline.html
> or a bit better explained:
> http://mathworld.wolfram.com/CubicSpline.html
>
Thank you very much for this link, it helped me a lot!
(I just had to do a generalization for a three dimensional space, but it was
very easy.)
Thanks to everyone for yours answers.
Regards,

Jonathan Demaeyer


Post a reply to this message

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