
ofxMSASpline - openFrameworks addon to interpolate any-dimensional data
1 year ago
A set of C++ template classes for doing various types of interpolations on data with any number of dimensions. You can feed the system an arbitrary number of data (data can be simple types like float, int or complex types like structs, classes), then resample at any resolution, or ask for the value at any percentage along the data - or just draw it - including splines in 3D. This is useful for creating and drawing splines (in any dimensions), or creating smooth animation paths from keyframes (again, in any dimensions).
memo.tv/ofxmsaspline
memo.tv/ofxmsaspline
-
Vimeo: About / Blog / Developers / Jobs / Community Guidelines / Community Forums / Help Center / Site Map / Merchandise
/ Get Vimeo

Previous Week
i'm just curious about your technique!
sorry for all the text here : D
merci!
btw i think your magnetic force fields is simply wonderful
I created a method Spline::sampleAt(float f) which returns the interpolated value at point f (0...1) percentage along the dataset. This can be physical distance or percentage of given sample points. E.g. sampleAt(0.25) can mean 'give me the value at one quarter along the spline' OR 'give me the value at one quarter of the nodes along the spline).
So e.g. the following code will resample the value at 100 points along the dataset:
for(float f=0; f (LE) 1; f+=0.01) {value = mySpline.sampleAt(f); }
I've implemented two interpolation types: linear and catmull-rom (cubic). So the idea is to be able to calculate a value at any point along the data by fitting a mathematical curve that goes through all the points. Hope that is a bit clearer.