A Cattmull Rom implementation in JS