Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Point Sequence Interpolation

Given an arbitrary sequence of points in space, how would you produce a smooth continuous interpolation between them?

2D and 3D solutions are welcome. Solutions that produce a list of points at arbitrary granularity and solutions that produce control points for bezier curves are also appreciated.

Also, it would be cool to see an iterative solution that could approximate early sections of the curve as it received the points, so you could draw with it.

like image 287
Nick Retallack Avatar asked Sep 20 '08 08:09

Nick Retallack


People also ask

What is interpolation sequence?

Interpolation is a statistical method by which related known values are used to estimate an unknown price or potential yield of a security. Interpolation is achieved by using other established values that are located in sequence with the unknown value.

What is an interpolation point?

In short, interpolation is a process of determining the unknown values that lie in between the known data points. It is mostly used to predict the unknown values for any geographical related data points such as noise level, rainfall, elevation, and so on.

What is an example of interpolation?

Based on the given data set, farmers can estimate the height of trees for any number of days until the tree reaches its normal height. For example, based on the above data, the farmer wants to know the tree's height on the 7th day. He can find it out by interpolating the above values.


1 Answers

The Catmull-Rom spline is guaranteed to pass through all the control points. I find this to be handier than trying to adjust intermediate control points for other types of splines.

This PDF by Christopher Twigg has a nice brief introduction to the mathematics of the spline. The best summary sentence is:

Catmull-Rom splines have C1 continuity, local control, and interpolation, but do not lie within the convex hull of their control points.

Said another way, if the points indicate a sharp bend to the right, the spline will bank left before turning to the right (there's an example picture in that document). The tightness of those turns in controllable, in this case using his tau parameter in the example matrix.

Here is another example with some downloadable DirectX code.

like image 85
Bob Cross Avatar answered Oct 03 '22 02:10

Bob Cross