Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bezier curve approximation for large amount of points

I have about hundred points, that I want to approximate with Bezier curve, but if there are more than 25 points (or something like that), factorial counting in number of combination causes number overflow. Is there a way of approximating such amount of points in a Bezier-like way (smooth curve without passing through all points, except first and last)? Or do I need to choose another approximation algorithm with the same effect? I'm using default swing drawing tools.

P.S. English is not native for me, so probably I've used wrong math terms somewhere.

like image 944
loginpassword Avatar asked Jan 14 '13 13:01

loginpassword


1 Answers

Do you want to get one Bezier curve fitting best in all 100 points? If that is the case Jim Herold has a very detailed explanation how to do it. A further optimisation could be reducing the amount of points using the Douglas-Peucker algorithm.

like image 164
mrab Avatar answered Sep 18 '22 16:09

mrab