[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] regarding freetype 2 cubic curve flattening

From: Graham Asher
Subject: Re: [ft-devel] regarding freetype 2 cubic curve flattening
Date: Sun, 30 Oct 2011 11:17:40 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1


in fact the great work is David's, not mine - I made the original attempt, which was buggy, and then supplied a fix, but David wrote a new version which was justified mathematically and based on Hain's paper, as you mention. So I'll have to pass the responsibility for explaining it to David Bevan.

Best regards,


On 30/10/2011 08:25, Vivek Rathod wrote:
Hello Graham,

I was looking at the new spline flattening algorithm that you and David worked on.
The speed up due to this is fantastic. Great work!

I could not understand the part of the code where you compare s_limit with s

according to Hain's paper
dmax = (s/L) * dnorm ;  here s  is not normalized. dmax is the tolerance for flatness and dnorm is the normalized flatness of the curve.

so s_limit = (dmax / dnorm) * L ; by putting dnorm = 0.75 we get the permissible height of the control point for the curve not to be split.

so should we  not be comparing s= abs(dy * dxi - dx * dyi) with s_limit * L    instead of s and s_limit  ( because s is perpendicular distance of control point multiplied by L) ?

Am I missing something very obvious?

Vivek Rathod

reply via email to

[Prev in Thread] Current Thread [Next in Thread]