You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've experimented with monotone cubic interpolation (as per the Steffen method you reference in d3-shape) and with the array values being evenly spaced, the formula is quite simplified, as long as I read the paper correctly:
where h = 1 / n, t1 = t - i / n and i, n, and v0...v3 being computed the same as with the basis spline.
I tried it for the purpose of color interpolation, although it turned out to be of questionable usefulness, at least in RGB:
Nevertheless, if you think it would be a good addition to d3-interpolate, I'm happy to make a PR. (Could be useful for animations, since it smoothly interpolates the data points?)
The text was updated successfully, but these errors were encountered:
I came looking here for a monotone interpolation implementation as well. :/ Since there existed a monotone curve option in d3-shape I expected it to be available in d3-interpolate.
I've experimented with monotone cubic interpolation (as per the Steffen method you reference in d3-shape) and with the array values being evenly spaced, the formula is quite simplified, as long as I read the paper correctly:
where
h = 1 / n
,t1 = t - i / n
andi
,n
, andv0
...v3
being computed the same as with the basis spline.I tried it for the purpose of color interpolation, although it turned out to be of questionable usefulness, at least in RGB:
Nevertheless, if you think it would be a good addition to d3-interpolate, I'm happy to make a PR. (Could be useful for animations, since it smoothly interpolates the data points?)
The text was updated successfully, but these errors were encountered: