There was an error in my last e-mail. This is the corrected version.
The length of a generic cubic bezier curve is an elliptic integral.
I have an example of a solution.
http://www.getnet.net/~cherry/derive/LenBez.doc
The general closed solution includes the factoring of a fourth degree
polynomial. DERIVE factored the example I picked.
Here example of the failure of Maple to handle that elliptic integral with
complex zeros in the polynomial.
http://www.getnet.net/~cherry/derive/lenbez.mw
This worksheet was for Maple 6. I have tested Maple 10.03 and it failed.
I assume Mathematica would also fail.
Here is a reference:
Journal of Computational and Applied Mathematics 118 (2000) 71-85 Reduction
theorems for elliptic integrands with the square root of two quadratic
factors B.C. Carlson, James FitzSimons
Regards, Jim FitzSimons
-----Original Message-----
From: maxima-admin at math.utexas.edu [mailto:maxima-admin at math.utexas.edu] On
Behalf Of Daniel Lakeland
Sent: Friday, July 07, 2006 5:35 PM
To: maxima at math.utexas.edu
Subject: Re: [Maxima] length of bezier
On Fri, Jul 07, 2006 at 03:35:05PM -0700, Daniel Lakeland wrote:
> I'm trying to derive the length of a generic cubic bezier curve, so
> that I can write a program which calculates the length of paths
> defined in SVG.
>
> According to wikipedia the parametric bezier curve definition is as
> follows:
>
> eqx:Bx(t) = px[0]*(1-t)^3 + 3*px[1]*t*(1-t)^2+3*px[2]*t^2*(1-t)+px[3]*t^3;
> eqy:By(t) = py[0]*(1-t)^3 + 3*py[1]*t*(1-t)^2+3*py[2]*t^2*(1-t)+py[3]*t^3;
>
> I decided to see if maxima could symbolically integrate this as follows:
>
> dlen:rhs((diff(eqx,t)^2+diff(eqy,t)^2)^(1/2));
> integrate(dlen,t,0,1);
... After about 66 mins....
Error in PROGN [or a callee]: The storage for CONS is exhausted.
Currently, 186820 pages are allocated.
Use ALLOCATE to expand the space.
Mathematica (online via the integrals.wolfram.com interface)
immediately returns with integrate(sqrt(a*x^6+b*x^5+...+f*x+g),x)
unevaluated. perhaps I was wrong to think that this integral has a
closed form solution?