[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [ft-devel] cubic clean up
From: |
David Bevan |
Subject: |
RE: [ft-devel] cubic clean up |
Date: |
Fri, 12 Nov 2010 04:22:30 -0500 |
Aleksei,
If you relax the condition, you increase the number of splits. Normally, making
such a change is a mistake because the benefit of simplifying the condition is
easily outweighed by the greater cost of increasing the recursive depth. This
is the very reason why we ended up with a much more complex set of conditions
than in earlier version of FT: it reduces the number of splits very
significantly.
I've just had a brief chance to look at your proposal, and I now understand why
it makes no difference to the output. The chances of your relaxed condition
causing a split when the current (theoretically correct) condition doesn't is
very small: a control point would have to be in the small white areas in the
bottom corners of the rectangle in your diagram. Note that this check is only
made after subdivisions for the distance from the chord. Since this is the most
expensive test, it is done last, and normally only once.
Since there is no performance improvement, I don't believe that your proposal
should be included in the code. It would make the code more opaque: It is
obvious why the current code [if P1 or P2 is outside P0-P3, split the curve]
does what it does (especially if reference is made to Hain's paper); it would
not be at all clear why your condition for splitting [if P1 or P2 is far from
the center of P0-P3, split the curve] was there.
If you do come up with an improvement to the algorithm that is significantly
faster (and still provably correct), then by all means submit it for review
(but don't expect a quick or uncritical response).
Thanks.
David %^>
-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of ??????? ?????????????
Sent: 11 November 2010 20:23
To: GRAHAM ASHER
Cc: freetype-devel
Subject: Re: [ft-devel] cubic clean up
Shaded areas "Before" and "After" in the attached figures show
where control points have should be to permit flattening.
Is this a risky change? If anything, it is slightly more conservative,
yet the conditional is quite a bit simpler.
- [ft-devel] cubic clean up, Алексей Подтележников, 2010/11/08
- Re: [ft-devel] cubic clean up, GRAHAM ASHER, 2010/11/09
- Re: [ft-devel] cubic clean up, Алексей Подтележников, 2010/11/10
- Re: [ft-devel] cubic clean up, Алексей Подтележников, 2010/11/11
- Re: [ft-devel] cubic clean up, Werner LEMBERG, 2010/11/12
- RE: [ft-devel] cubic clean up,
David Bevan <=
- Re: [ft-devel] cubic clean up, Алексей Подтележников, 2010/11/12
- RE: [ft-devel] cubic clean up, David Bevan, 2010/11/12
- Re: [ft-devel] cubic clean up, GRAHAM ASHER, 2010/11/12
- Re: [ft-devel] cubic clean up, Алексей Подтележников, 2010/11/12
- Re: [ft-devel] cubic clean up, Алексей Подтележников, 2010/11/12
- Re: [ft-devel] cubic clean up, Behdad Esfahbod, 2010/11/12