kill(all)$

load("eigen")$

van=facebook.com/LearningCalculus$

Point:matrix([x],[y],[z],[1]);

P(x,y,z):=matrix([x],[y],[z],[1]);

Point[2];

pRay(t):=matrix([a[1]*t+a[0]],
                [b[1]*t+b[0]],
                [c[1]*t+c[0]],[1]);

pQuadratic(t):=matrix([a[2]*t^2+a[1]*t+a[0]],
                      [b[2]*t^2+b[1]*t+b[0]],
                      [c[2]*t^2+c[1]*t+c[0]],[1]);

eFunctionX:matrix([x], [f(x)], [0], [1]);

eFunctionXY:matrix([x],[y],[f(x,y)],[1]);

Scale:matrix([S[x], 0, 0, 0],[0, S[y],0, 0],[0, 0, S[z], 0],[0, 0, 0, 1]);

Scale.Point;

Scale.P(x,y,z);

Scale.P(x-h,y-k,z-l);

Scale.P(a[1]*t+a[0],b[1]*t+b[0],c[1]*t+c[0]);

Scale.pRay(t);

Scale.pQuadratic(t);

Translate:matrix([1, 0, 0, T[x]],[0, 1,0, T[y]],[0, 0, 1, T[z]],[0, 0, 0, 1]);

Translate.Point;

Translate.pRay(t);

Translate.pQuadratic(t);

integrate(Translate.pQuadratic(t),t);

Translate.Scale;

(Translate.Scale).Point;

(Scale.Translate).Point;

(Translate.Scale).pRay(t);

(Scale.Translate).pRay(t);

(Translate.Scale).pQuadratic(t);

(Scale.Translate).pQuadratic(t);

invert((Scale.Translate));

invert((Translate.Scale));

eigenvalues(Scale.Translate);

eigenvectors(Scale.Translate);

xRotate:matrix([1,           0,           0, 0],
                 [0, cos(%alpha),-sin(%alpha), 0],
                 [0, sin(%alpha), cos(%alpha), 0],
                 [0,           0,           0, 1]);

yRotate:matrix([ cos(%beta), 0, sin(%beta), 0],
                 [ 0,           1,           0, 0],                 
                 [-sin(%beta), 0, cos(%beta), 0],
                 [ 0,           0,           0, 1]);

zRotate:matrix([cos(%gamma),-sin(%gamma), 0, 0],
                 [sin(%gamma), cos(%gamma), 0, 0],
                 [0,           0,           1, 0],
                 [0,           0,           0, 1]);

xRotateI:trigsimp(invert(xRotate));

yRotateI:trigsimp(invert(yRotate));

zRotateI:trigsimp(invert(zRotate));

trigsimp(xRotate.xRotateI);

van=facebook.com/LearningCalculus$

Translate;

Scale;

Rotate:(xRotate.yRotate.zRotate);

Translate.Scale.Rotate;

Translate.Scale.Rotate.eFunctionX;