Skip to content

AlecJStrickland/parametric-cubic-spline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Parametric Cubic Spline

Given a set of (x,y) coordinates, and a resolution (number of values of t to calculate over the curve), interpolate a parametric cubic spline.

const interpolate = require('parametric-cubic-spline')
const pointsX = // Array of X values
const pointsY = // Array of Y values
const resolution = // number of values of t to calculate over the curve

const points = interpolate(pointsX, pointsY, resolution) // Array of objects {x, y, t}. Graphing the x,y values in order will yield the parametric curve

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published