From: Alexander B. <ale...@lu...> - 2016-12-04 20:58:22
|
Hi, I made a little toy which shows different methods for fitting a single cubic bezier curve to a set of points. You can play with it by moving the control points of a cubic bezier, the toy then selects an adjustable number of points on the curve and attemps different methods for fitting bezier curves to them. https://github.com/abrock/lib2geom The toy is in src/toys/bezier-fit.cpp, curve fitting code is in src/tests/bezierfit.h and src/tests/bezierfit-a.h (newer version, I keep the old version for comparison to avoid regressions) Best Regards, Alexander |