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?

-- 
Daniel Lakeland
dlakelan at street-artists.org
http://www.street-artists.org/~dlakelan