Parametric Curves

Bezier Curves

A procedure to graph Bezier curves

> with( plots ):
>
x[0] := 4:    y[0] := 1:
> x[1] := 28:  y[1] := 48:
>
x[2] := 50:  y[2] := 42:
>
x[3] := 40:  y[3] := 5:
>
f := t -> x[0]*(1-t)^3 + 3*x[1]*t*(1-t)^2 + 3*x[2]*t^2*(1-t) + x[3]*t^3;
>
g := t -> y[0]*(1-t)^3 + 3*y[1]*t*(1-t)^2 + 3*y[2]*t^2*(1-t) + y[3]*t^3;
>
G := plot( [ f(t), g(t), t=0..1 ], thickness = 2 ):
> t0 := textplot( [ 8,1, `P[0]` ], align = ABOVE ):
> t1 := textplot( [ 29, 48, `P[1]` ], align = RIGHT ):
> t2 := textplot( [ 51, 42, `P[2]` ], align = RIGHT ):
> t3 := textplot( [ 44, 6, `P[3]` ], align = ABOVE ):
> pp := pointplot( { [4,1], [28,48], [50,42], [40,5] }, symbol = circle, color = navy ):

f := proc (t) options operator, arrow; x[0]*(1-t)^3...

g := proc (t) options operator, arrow; y[0]*(1-t)^3...

> display(G,t0,t1,t2,t3,pp);

[Maple Plot]

¡@

BACK