catmull-rom-curve

Calculate a 2D spline curve in R

我只是一个虾纸丫 提交于 2019-11-30 23:49:02
问题 I'm trying to calculate a Bezier-like spline curve that passes through a sequence of x-y coordinates. An example would be like the following output from the cscvn function in Matlab (example link): I believe the (no longer maintained) grid package used to do this ( grid.xspline function?), but I haven't been able to install an archived version of the package, and don't find any examples exactly along the lines of what I would like. The bezier package also looks promising, but it is very slow

Catmull-Rom interpolation on SVG Paths

本小妞迷上赌 提交于 2019-11-26 07:42:18
问题 I am experimenting with creating high-performance, good-looking pencil tools using SVG paths. I am logging the mouse coordinates to draw a path. To get a high-fidelity path (accurate to the user\'s movements) I need to log a point for every pixel movement. Keeping each and every point in the path creates a huge amount of points which is not ideal for collaborative features later-on (sending huge amount of points back and forth is not efficient), plus parsing huge paths every time I need to