DIRECTORY G2dBasic, Imager; G2dMatrix: CEDAR DEFINITIONS ~ BEGIN singular: ERROR; Pair: TYPE ~ G2dBasic.Pair; Triple: TYPE ~ G2dBasic.Triple; Rectangle: TYPE ~ Imager.Rectangle; Matrix: TYPE ~ RECORD [row1, row2, row3: Triple]; Identity: PROC RETURNS [Matrix]; Transpose: PROC [m: Matrix] RETURNS [Matrix]; Determinant: PROC [m: Matrix] RETURNS [REAL]; Adjoint: PROC [m: Matrix] RETURNS [Matrix]; Invert: PROC [m: Matrix] RETURNS [Matrix]; Mul: PROC [left, rite: Matrix] RETURNS [Matrix]; Rotate: PROC [mat: Matrix, radians: REAL] RETURNS [Matrix]; Scale: PROC [mat: Matrix, scale: Pair] RETURNS [Matrix]; Translate: PROC [mat: Matrix, translate: Pair] RETURNS [Matrix]; Transform: PROC [p: Triple, mat: Matrix] RETURNS [Triple]; UnitSquareToQuadrilateral: PROC [p1, p2, p3, p4: Pair] RETURNS [Matrix]; QuadrilateralToRectangle: PROC [p1, p2, p3, p4: Pair, rectangle: Rectangle] RETURNS [Matrix]; END. X G2dMatrix.mesa Copyright Σ 1988, 1992 by Xerox Corporation. All rights reserved. Bloomenthal, July 2, 1992 4:37 pm PDT Type Declarations That is, [row1.x row1.y row1.z] [row2.x row2.y row2.z] [row3.x row3.y row3.z] Basic 3 by 3 Matrix Operations Return the identity matrix. Return the transpose of the matrix. Return the determinant of the matrix. Return the adjoint of the matrix. Invert the matrix. Post multiply the left by the rite. Rotate the matrix (right-handed) by the angle in radians. Scale the matrix by the scale pair. Translate the matrix by the translate pair. Post multiply the triple p by the matrix. Transformation Miscellany Return 2d perspective transformation of unit square {(0,0), (0,1), (1,1), (1,0)} to quadrilateral. Return 2d perspective transformation of quadilateral to rectangle. Κ–"cedarcode" style•NewlineDelimiter ™™Jšœ Οeœ6™BJ™%J™JšΟk œ˜J˜—šΠbl œžœž ˜Jšœž˜J˜Jšœ žœ˜—headšΟl™Jšœžœ˜Jšœ žœ˜ šœ žœ˜#J˜—šœžœžœ˜2J™'J™!J™!——š ™šΟnœžœžœ ˜ J™J˜—š‘ œžœ žœ ˜-J™#J™—š‘ œžœ žœžœ˜-J™%J™—š‘œžœ žœ ˜+J™!J˜—š‘œžœ žœ ˜*J™J™—š‘œžœžœ ˜0J™#J™—š‘œžœžœžœ ˜;J™9J™—š‘œžœžœ ˜8J™#J™—š‘ œžœ žœ ˜@J™+J™—š‘ œžœžœ ˜:J™)——š ™š‘œžœžœ ˜HJ™bJ™—š‘œžœ-˜KJšžœ ˜J™B——J˜Jšžœ˜—…—