cardinal-spline-3d
Version:
Smooth curve through points with tension and resolution options.
39 lines (21 loc) • 826 B
Markdown
Generate cardinal splines in 2 or 3 dimentions

(red boxes show control points)

(rendered using [npmcad](https://github.com/dominictarr/npmcad-viewer))
``` js
var spline = require('cardinal-spline')
var points = spline([ //array of control points
[],...
],
0.5, //tension
20 //number of segments between each control point
)
```
adapted from [epistemex/cardinal-spline-js](https://github.com/epistemex/cardinal-spline-js)
Released under [MIT license](http://choosealicense.com/licenses/mit/). You can use this class in both commercial and non-commercial projects provided that full header (minified and developer versions) is included.
*© 2013-2017 Epistemex*
