-
Notifications
You must be signed in to change notification settings - Fork 70
Description
I dislike asking this question without having the proper vocabulary for it, but I was experimenting with reproducing Photoshop's Curves interface using D3 modules.
After reading up on some of the math, experimenting with polynomial interpolation (and experiencing Runge's phenomenon with it), I came back to a cubic spline interpolation — using a package that implements this algorithm — that gave me the correct result.
Pictured below, in combination with a clamped linear scale, and in comparison with some curves available in d3-shape:
- Would such a spline interpolator be a good addition to d3-interpolate?
- Is it called something specific? (I'm a bit lost among the various types of splines...)
Also, reading through the original implementation of this spline, it also mentions it being a natural spline, and I have found that in some situations, D3's curveNatural matches this implementation, but in others they diverge, further clouding my understanding of terms :D
