基数样条 / Catmull-Rom
用于 JavaScript/HTML5 的 Cardinal 样条(三次 Hermite 样条插值,带有张力选项的 Catmull-Rom)实现,它通过给定数组中的每个点对创建插值平滑曲线。 无需指定控制点。
为方便起见,存档附带三个单独的版本:
curve.js - Canvas 2D context extension. Call curve() on the context (ctx.curve(...))
curve_func.js - if you get sweaty palms with the idea of using extensions: this is a pure
function that takes the context as an argument instead of
1