On 11/04/13 14:03, Jasper van de Gronde wrote:
I see some issues with your maths, in particular that you seem to suggest integrating by arc-length, while the curves generally will not have the same length. In general, it is not that easy to get a natural correspondence between two parametric curves.
I want to address that issue by choosing equidistant integration points on the original curve and then find for each of them the parameter t for which the distance between the new curve and the chosen point on the original curve becomes minimal. The latter unfortunately needs to be calculated in every iteration but I think the set of parameters (t_1, ... t_n) created by the iteration before will be a good initial guess and it wont change much near the optimal point.
However, don't let that stop you from experimenting. Feel free to come up with a proposal for how to do this, with some examples of the effect. (A patch would obviously be welcome if your suggestion is an improvement.)
I found the lib2geom files but I didn't find the code which handles deleting nodes, can somebody please tell me where to look for that?
One thing you might try to avoid needing a correspondence between positions on the curves is to look at the area between the curves, and see if you can find a decent approach of minimizing that.
That's interesting, I will check if I can calculate derivatives for that.
There should also be a fairly large amount of literature on approximating a sequence of points by a spline.
I found some interesting articles and I will read them later:
http://jimherold.com/2012/04/20/least-squares-bezier-fit/ http://iut-arles.univ-provence.fr/web/romain-raffin/sites/romain-raffin/IMG/...
Alexander