TEX source
DERIVE source
The length of a Be\'zier curve is an elliptic integral. This is a Be\'zier curve.
x=a3 t3+a2 t2+a1 t+x0

y=b3 t3+b2 t2+b1 t+y0
The control points of a Be\'zier curve are:
(x0,y0)    (x1,y1)    (x2,y2)    (x3,y3)
This is the curve for those control points.
a1=3 (x1-x0)    a2=3 (x0-x1+x2)    a3=-x0+3 x1-x2+x3

b1=3 (y1-y0)    b2=3 (y0-y1+y2)    b3=-y0+3 y1-y2+y3
The length of the Be\'zier curve from 0 to u is:
ó
õ
u

0 

Ö
 

(a1+2 a2 t+3 a3 t2)2+(b1+2 b2 t+3 b3 t2)2
 
 dt
The control points of an example Be\'zier curve are:
(x0=6,y0=8)    (x1=1,y1=10)    (x2=7,y2=3)    (x3=4,y3=4)
Solve for a1,a2,a3,b1,b2,b3.
a1=-15    a2=33    a3=-20    b1=6    b2=-27    b3=17
The Be\'zier curve for this example is:
x=-20 t3+33 t2-15 t+6    y=17 t3-27 t2+6 t+8
For this example the length is:
ó
õ
1

0 

Ö
 

689 t4-1492 t3+1076 t2-292 t+29
 
 dt
Numerical integration gives 7.237223368328592885826619210956022413967067986017504163362886516
DERIVE factored the polynomial:
689 t4-1492 t3+1076 t2-292 t+29=

689  æ
ç
ç
ç
è
t+   æ
 ú
Ö

  ____
Ö6005

1378
+ 23377
474721
 
- 373
689
+i  æ
ç
ç
è
  æ
Ö

[6005]
1378
- 23377
474721
 
+ 7
689
ö
÷
÷
ø
ö
÷
÷
÷
ø

æ
ç
ç
ç
è
t+   æ
 ú
Ö

  ____
Ö6005

1378
+ 23377
474721
 
- 373
689
-i  æ
ç
ç
è
  æ
Ö

[6005]
1378
- 23377
474721
 
+ 7
689
ö
÷
÷
ø
ö
÷
÷
÷
ø

æ
ç
ç
ç
è
t-   æ
 ú
Ö

  ____
Ö6005

1378
+ 23377
474721
 
- 373
689
+i  æ
ç
ç
è
  æ
Ö

[6005]
1378
- 23377
474721
 
- 7
689
ö
÷
÷
ø
ö
÷
÷
÷
ø

æ
ç
ç
ç
è
t-   æ
 ú
Ö

  ____
Ö6005

1378
+ 23377
474721
 
- 373
689
+i  æ
ç
ç
è
7
689
-   æ
Ö

[6005]
1378
- 23377
474721
 
ö
÷
÷
ø
ö
÷
÷
÷
ø
Now define values k, m, a, b:
k=3    ___
Ö689
 
   m=[1,1,1,1]    b=[-1,-1,-1,-1]    e=[e1,e2,e3,e4]

a=[0.216589-0.0937743 i,0.216589+0.0937743 i, 0.866139-0.0734550 i,0.866139+0.0734550 i]
Do a partial fraction expansion.
I(m)=D219(1,m,4,a,b,e)

I(m)=I(4 e1)+(1.29909+0.375097 iI(3 e1)+(0.383342+0.365466 iI(2 e1)

-(0.0228475-0.0784923 iI(e1)
Reduce I(4 e1).
R35(0,1,4,a,b,e)=0

A(2 e1+e2+e3+e4)+3 I(4 e1)+(3.24774+0.937743 iI(3 e1)+(0.766684+0.730933 iI(2 e1)

-(0.0342712-0.117738 iI(e1)=0

A(2 e1+e2+e3+e4)=-0.138815+0.00794130 i
Substitute I(4 e1).
I(m)=(0.216516+0.0625162 iI(3 e1)+(0.127780+0.121822 iI(2 e1)

-(0.0114237-0.0392461 iI(e1)+0.0462716-0.00264710 i
Reduce I(3 e1).
R35(-1,1,4,a,b,e)=0

A(e1+e2+e3+e4)+2 I(3 e1)+(1.94864+0.562645 iI(2 e1)

+(0.383342+0.365466 iI(e1)-(0.0114237-0.0392461 iI(0)=0

A(e1+e2+e3+e4)=-0.0846852
Substitute I(3 e1).
I(m)=-0.0655894 I(2 e1)-(0.0415000+0.0123012 iI(e1)

+(0.00246348-0.00389163 iI(0)+0.0554395
Reduce I(2 e1).
R35(-2,1,4,a,b,e)=0

A(e2+e3+e4)+I(2 e1)+(0.0114237-0.0392461 iI(-e1)

+(0.649549+0.187548 iI(e1)=0

A(e2+e3+e4)=-0.949300-0.327220 i
Substitute I(2 e1).
I(m)=(0.000749279-0.00257413 iI(-e1)+0.00110358 I(e1)

+(0.00246348-0.00389163 iI(0)-0.00682448-0.0214622 i
Calculate the basic integrals numerically.
I(-e1)=-17.2709+33.5142 i    I(0)=12.0414   I(e1)=-3.86310-1.12917 i
Substitute the values of the integrals.
I(m)=0.0919054       k I(m)=7.23722
That is a good match.
Jim FitzSimons Mailto:cherry@neta.com


File translated from TEX by TTH, version 3.86.
On 25 Nov 2009, 02:45.