[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] Problems with bbox code and cubic bezier curves
From: |
Just van Rossum |
Subject: |
Re: [Devel] Problems with bbox code and cubic bezier curves |
Date: |
Wed, 25 Apr 2001 01:00:22 +0200 |
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.)
Just
- Re: [Devel] Problems with bbox code and cubic bezier curves, (continued)
- Re: [Devel] Problems with bbox code and cubic bezier curves, Tom Kacvinsky, 2001/04/24
- Re: [Devel] Problems with bbox code and cubic bezier curves, Nathan Hurst, 2001/04/24
- Re: [Devel] Problems with bbox code and cubic bezier curves, Tom Kacvinsky, 2001/04/24
- Re: [Devel] Problems with bbox code and cubic bezier curves, David Turner, 2001/04/25
- Re: [Devel] Problems with bbox code and cubic bezier curves, Tom Kacvinsky, 2001/04/25
- Re: [Devel] Problems with bbox code and cubic bezier curves, Tom Kacvinsky, 2001/04/24
- Re: [Devel] Problems with bbox code and cubic bezier curves,
Just van Rossum <=
- Re: [Devel] Problems with bbox code and cubic bezier curves, Tom Kacvinsky, 2001/04/24
RE: [Devel] Problems with bbox code and cubic bezier curves, Ivan Nincic, 2001/04/24
RE: [Devel] Problems with bbox code and cubic bezier curves, Ivan Nincic, 2001/04/24
- Re: [Devel] Problems with bbox code and cubic bezier curves, Tom Kacvinsky, 2001/04/24
- Re: [Devel] Problems with bbox code and cubic bezier curves, Just van Rossum, 2001/04/24
- Re: [Devel] Problems with bbox code and cubic bezier curves, Tom Kacvinsky, 2001/04/24
- Re: [Devel] Problems with bbox code and cubic bezier curves, Just van Rossum, 2001/04/24
- Re: [Devel] Problems with bbox code and cubic bezier curves, Tom Kacvinsky, 2001/04/24
- Re: [Devel] Problems with bbox code and cubic bezier curves, Just van Rossum, 2001/04/24