Looking into it. The strangeness is that the 3rd degree polynomial is actually a 1st degree one in some curve elements.
Btw, how did you generate that sine wave?
OK, figured out the cause, the individual Bézier curves in your top curve have the X coordinates of the tangent be exactly 1/3 from the extremities(*):
This makes the 3rd and 2nd degree coefficients equal to 0. I'll have to improve the math a bit. Stay tuned.
(*) this also true of the bottom sine, however, since the wavelength is different, the range on X is not divisible exactly by 3, so woth the round off errors, the coefficients are small but not null.
OK, fixed, see v0.3 (just uploaded to SF)
Thanks for the report and the test-case.
Btw, how did you generate that sine wave?
OK, figured out the cause, the individual Bézier curves in your top curve have the X coordinates of the tangent be exactly 1/3 from the extremities(*):
Code:
PointsX: [0.0, 12.5, 25.0, 37.5], coeffsX: [0.0, 37.5, 0.0, 0.0]
PointsX: [37.5, 50.0, 62.5, 75.0], coeffsX: [37.5, 37.5, 0.0, 0.0]
PointsX: [75.0, 87.5, 100.0, 112.5], coeffsX: [75.0, 37.5, 0.0, 0.0]
PointsX: [112.5, 125.0, 137.5, 150.0], coeffsX: [112.5, 37.5, 0.0, 0.0]
PointsX: [150.0, 162.5, 175.0, 187.5], coeffsX: [150.0, 37.5, 0.0, 0.0]
This makes the 3rd and 2nd degree coefficients equal to 0. I'll have to improve the math a bit. Stay tuned.
(*) this also true of the bottom sine, however, since the wavelength is different, the range on X is not divisible exactly by 3, so woth the round off errors, the coefficients are small but not null.
OK, fixed, see v0.3 (just uploaded to SF)
Thanks for the report and the test-case.