I want to resample a spread in VL (probably spline). Is there a function already?
If not, is the source code to the vvvv resample node available? I couldn’t see it in the vvvv sdk
spline (i guess you mean b-spline/hermite) is in the making. in case you need cubic splines, you can just use bezierspread. linear resampling should be trivial to patch, right?
I actually meant the spline mode of the resample node, though I guess the result should be similar to bspline?
I tried patching the linear resample btw but got stuck calculating the lerp ratio between input slices
because i just used it: a basic building block for that is the CatmullRom node. it does a spline interpolation similar to Lerp but thru 4 points and thus has no edges when moving thru a value set:
The points that define a spline are known as “Control Points”. One of the features of the Catmull-Rom spline is that the specified curve will pass through all of the control points - this is not true of all types of splines.
lerp ratio is of course a value between 0 and 1. to calculate it you need to know the position of the value you want to calculate in the new spread expressed in terms of the old spread. to get a ratio you can use:
Ratio = OldCount/NewCount
NewPosition = NewIndex
PositionInOldSpread = NewPosition * Ratio
the whole part of this number is the index of the first point, +1 is the index of the next point and the fractional part is the interpolation value.
to use the CatmullRom you just add two more points, -1 and +2…
Has any one managed to succesfully emulate the vvvv resampler?
CatmullRom seems to make un-wanted shapes from my data
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.