Cardinal spline extension for HTML5 Canvas