Hacker News new | ask | show | jobs
by henningo 4322 days ago
Did you consider doing spline fits to the x,y coordinates and then just saving the spline coefficients instead?

The fit process could likely be done client-side, and could offer some subtle smoothing if wanted?

Anyhow, really nice execution!

1 comments

paper.js has a nice method to do this. I actually used it in a whiteboard app I made as a proof of concept. Rather than saving every X,Y coordinate, it uses a configurable number of points and handles and makes bezier curves. http://paperjs.org/examples/path-simplification/