|
From: | GRAHAM ASHER |
Subject: | Re: [ft-devel] a satisfactory fix for the cubic spline bug |
Date: | Tue, 31 Aug 2010 17:17:31 +0000 (GMT) |
From: GRAHAM ASHER
[mailto:address@hidden
Sent: 31 August 2010 15:56
To: David Bevan
Subject: Re: [ft-devel] a
satisfactory fix for the cubic spline bug
Midpoint as defined by bisection is the point you get
when you split a cubic spline into two by the bisection method (as used by
FreeType in gray_split_cubic). It is defined as the midpoint of the line
between the two midpoints of the lines between the three midpoints of the lines
between the four control points, taken in order. It is of course a point on the
curve.
So that’s the point t = 0.5 in the parametric equation —
found using de Casteljau’s
algorithm.
Your example gives a midpoint of (31.25, 20.625).
Applying the midpoint method again (hastily) to the left-hand curve seems to
yield a y coordinate of 21.84375, so if my arithmetic is correct your example
is a good one.
Using the equation in
Hain’s paper (p.4; with v=0.1), the maximum deviation tmax in my example is at 0.3503928884,
which is the point (16.26529900, 23.37564709).
David %^>
Thanks,
Graham
From: David
Bevan <address@hidden>
To: GRAHAM ASHER
<address@hidden>
Sent: Tuesday, 31 August, 2010
15:20:59
Subject: RE: [ft-devel] a satisfactory
fix for the cubic spline bug
From: GRAHAM ASHER
[mailto:address@hidden
Sent: 31 August 2010 15:01
To: David Bevan; freetype-devel
Subject: Re: [ft-devel] a
satisfactory fix for the cubic spline bug
David,
(vi) Out of interest, please give an example, with
coordinates, of a cubic spline with both control points on the same side of the
straight line from start to end, for which the midpoint of the curve, as
defined by bisection, is not the point of maximum deviation.
I expect that something like the following would be an example:
P0: 0,0
P1: 0,50
P2: 50,5
P3, 100,0
But to be sure I’d need to know what you mean by “midpoint as defined by bisection”? Is it t = 0.5 in the parametric equation, the point perpendicular to the midpoint of the chord, or something else?
David %^>
[Prev in Thread] | Current Thread | [Next in Thread] |