SVMatrixOpsImpl.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Last edited by Bier on February 17, 1987 2:14:04 pm PST
Contents: Some of the transform operations from the latest copy of my unpublished transform tutorial.
DIRECTORY
Matrix3d, SV3d, SVMatrixOps;
SVMatrixOpsImpl: CEDAR PROGRAM
IMPORTS Matrix3d
EXPORTS SVMatrixOps =
BEGIN
Matrix4by4: TYPE = SV3d.Matrix4by4;
IncTransf: PUBLIC PROC [CWORLD, PWORLD, DWORLD, M: Matrix4by4] RETURNS [newCP: Matrix4by4] = {
OPEN Matrix3d;
Notes: If D = WORLD, DWORLD = I.
CD, WORLDP: Matrix4by4;
WORLDP ← Matrix3d.Inverse[PWORLD];
CD ← Matrix3d.AInTermsOfB[CWORLD, DWORLD];
newCP ← Mult[CD, Mult[M, Mult[DWORLD, WORLDP]]];
};
AbsTransf: PUBLIC PROC [PWORLD, DWORLD, N: Matrix4by4] RETURNS [newCP: Matrix4by4] = {
WORLDP: Matrix4by4;
WORLDP ← Matrix3d.Inverse[PWORLD];
newCP ← Matrix3d.Mult[N, Matrix3d.Mult[DWORLD, WORLDP]];
};
END.