POV-Ray : Newsgroups : povray.off-topic : Interpolation of 2D points : Interpolation of 2D points Server Time
28 Jul 2024 10:28:22 EDT (-0400)
  Interpolation of 2D points  
From: Lars Rohwedder
Date: 10 Sep 2014 10:58:06
Message: <541066fe$1@news.povray.org>
I've got the following problem:

Given an array of {t, Point} where t is a floating point number, between
0 to 1, and Point is a point in the 2D plane. (The array can be sorted
by ascending t.)

Now I want a formula f(t) that returns a "smooth path" going through all
these points.

It is AFAIK what Povray's spline feature does, right? But I want to use
that formula in my own C++ program. :-)


I googled around and found many sites full of explanations and formulae
about "Bezier splines", "B splines", Lagrange polynomials etc. many math
stuff I just don't care about.

I also found libraries (e.g. GNU Scientific Library) but these also look
too complicated for me, so I cannot even say whether and how they might
do what I want to. :-(

Perhaps one of you can give me some hints how to find such a formula.
The reward would be a nice animation, I could present to you all
afterwards. :-)


Lars R.


Post a reply to this message

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