05-18-2021, 05:27 PM
Interesting. Did you try to figure out what is t for which P(t)==K. From my dealings with Bézier curves over the past years, I would says that it is a bell curve very centered around t=0.5 (even if that specific curve has a cusp or a loop), so using this instead of trying to find the "best" point could save you some time. But of course it only works with single splines and not full strokes.
Also you can save some time by letting Gimp do as much computation for you as possible (since its done in C, somewhat faster than Python). For instance an accuracy criteria could just be the distance between your K=P(0.5) and the point in the middle of the stroke (using Gimp's getPointAtDist()).
Also you can save some time by letting Gimp do as much computation for you as possible (since its done in C, somewhat faster than Python). For instance an accuracy criteria could just be the distance between your K=P(0.5) and the point in the middle of the stroke (using Gimp's getPointAtDist()).