freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Problems with bbox code and cubic bezier curves


From: Tom Kacvinsky
Subject: Re: [Devel] Problems with bbox code and cubic bezier curves
Date: Tue, 24 Apr 2001 19:08:25 -0400 (EDT)

Hi Just,

Well, yeah, I am prone to histrionics. :) Yes, I would like to see your code.  I
don't know Python at all, but from what I have seen, I am sure I can grok the
code rather easily. :)

Oh yeah, are you of any relation to the author of Python?  Or is that just
coincidence?

Tom

On Wed, 25 Apr 2001, Just van Rossum wrote:

> Tom Kacvinsky wrote:
>
> > OK, but what are the parametric equations in t for the x and y coordinates?
> > One has to find the roots and guarantee that they are in the interval (0,1).
> > There are either 0, 1, or 2 roots, and there are degenerate cases to take
> > care of. Moreover, one has to then find the corresponding point(s) on the
> > graph of parametric equations and determine if they are extrema or not, and
> > so on.
> >
> > Its not just a matter of finding the roots.  As you can see, it gets
> > complicated rather quickly...
>
> Erm, I might be missing something, but I think you're making it look harder 
> than
> it is:
>
> - find all points where the curve is horizontal, filter out t's that
>   are < 0 or > 1. There are no more than two of these t's.
> - same for vertical.
> - calc the box around the found points and the end points.
>
> That's it, as far as I can see. (I now have a Python implementation, if you'd
> like to have a look. And Nathan is right: it can be done with 2 sqrts per
> curve.)
>




reply via email to

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