[ft-devel] preliminary analysis of the problem with cubic spline optimisation

2010-08-29 Thread Graham Asher
The aim is to draw a straight line between the start end end of a cubic spline, instead of rendering the curve correctly, if the curve deviates by less than a certain value from the straight line. The code in gray_render_cubic in ftgrays.c checks only the midpoint of the curve. However, this

[ft-devel] Re: preliminary analysis of the problem with cubic spline optimisation

2010-08-29 Thread Graham Asher
Correction: it's not monotonicity that matters, but having the two control points on different sides of the straight line. Graham Asher wrote: The aim is to draw a straight line between the start end end of a cubic spline, instead of rendering the curve correctly, if the curve deviates by

[ft-devel] tentative fix for cubic spline bug

2010-08-29 Thread Graham Asher
Here's a fix that works. I'm trying to think of a faster way of doing it. The fix splits the cubic spline in two, guaranteeing that the resulting curves have their control points on the same side of the straight lines from start to end, then performs the original test for the distance (or

Re: [ft-devel] Re: preliminary analysis of the problem with cubic spline optimisation

2010-08-29 Thread James Cloos
GA == Graham Asher graham.as...@btinternet.com writes: GA Correction: it's not monotonicity that matters, but having the two GA control points on different sides of the straight line. Wouldn't the midpoint also fail to be the furthest point from the line whenever the two off-curve control

Re: [ft-devel] Re: preliminary analysis of the problem with cubic spline optimisation

2010-08-29 Thread Graham Asher
It can happen, though. In fact I now don't think it can happen. If there are any good mathematicians out there (better than me at this, which sets quite a low bar), please confirm that no point on a cubic spline curve with both control points on the same side of the straight line from start to