ferguson.mws

Ferguson Curve

Implementácia

>    with(linalg):with(plots):
X := 0: Y := 1:

Warning, the protected names norm and trace have been redefined and unprotected

Warning, the name changecoords has been redefined

Bázová Matica

>    M := matrix(4, 4,[[ 2, -2,  1,  1],[-3,  3, -2, -1],[ 0,  0,  1,  0],[ 1,  0,  0,  0]]);
T := matrix(1, 4, ['t'^3, 't'^2, 't', 1]);

M := matrix([[2, -2, 1, 1], [-3, 3, -2, -1], [0, 0, 1, 0], [1, 0, 0, 0]])

T := matrix([[t^3, t^2, t, 1]])

Súradnice riadiacich bodov a vektorov

>    F[X] := 10: F[Y] := 10:   F1[X] := 300: F1[Y] := 30:
G[X] := 50: G[Y] := 10:  G1[X] := 100: G1[Y] := -10:

Matice bodov a vektorov

>    PX := matrix(4,1,[[F[X]], [G[X]], [F1[X]], [G1[X]]]); PY := matrix(4,1,[[F[Y]], [G[Y]], [F1[Y]], [G1[Y]]])

PX := matrix([[10], [50], [300], [100]])

PY := matrix([[10], [10], [30], [-10]])

>    C := evalm(`&*`(T,M)); C1 := evalm(`&*`(C,PX)); C2 := evalm(`&*`(C,PY))

C := matrix([[2*t^3-3*t^2+1, -2*t^3+3*t^2, t^3-2*t^2+t, t^3-t^2]])

C1 := matrix([[320*t^3-580*t^2+10+300*t]])

C2 := matrix([[20*t^3-50*t^2+10+30*t]])

Riadniace body

>    body :=  PLOT(POINTS([F[X], F[Y]], [G[X], G[Y]])):

Vykreslenie krlvky

>    t := 't':krivka := plot([C1[1,1], C2[1,1], t=0..1]):

Ukážka

>    display({body, krivka})

[Maple Plot]