DIRECTORY JunoStorage USING [Coords, Point, Frame]; JunoMatrix: DEFINITIONS = BEGIN OPEN Stor: JunoStorage; Point: TYPE = Stor.Point; Coords: TYPE = Stor.Coords; Matrix: TYPE = ARRAY [1..3] OF ARRAY [1..3] OF REAL; Frame: TYPE = Stor.Frame; Identity: PROC [m: REF Matrix _ NIL] RETURNS [mid: REF Matrix]; GetFrameMatrix: PROC [frame: Frame, m: REF Matrix _ NIL] RETURNS [mr: REF Matrix]; InvertMatrix: PROC [m: REF Matrix, work: REF Matrix _ NIL] RETURNS [mInv: REF Matrix, singular: BOOL]; MultiplyMatrix: PUBLIC PROC [ma, mb: REF Matrix, mc: REF Matrix _ NIL] RETURNS [mr: REF Matrix]; ComputeTransform: PROC [src, dest: Frame, mm: REF Matrix _ NIL] RETURNS [mat: REF Matrix, singular: BOOL]; MapCoords: PROC [coords: Coords, mat: REF Matrix] RETURNS [cMap: Coords]; END. * JunoMatrix.mesa Last Edited by: Stolfi, June 12, 1984 5:45:51 pm PDT Tools for coordinate transformations and matrix algebra. Returns an identity matrix. The matrix m is optional, and used to store the result if given (saves alloc.) Returns the coordinate transform matrix for the frame determined by the points org, xP, yP (the last one or two may be NIL). The resulting matrix satisfies m*[0,0,1]^T= org, m*[1,0,1]^T= hor, m*[1,0,1]^T= ver. The matrix m is optional, and used to store the result if given (saves alloc.) Inverts m^ into mInv^ by pivoting three times; or sets "singular" flag. The matrix work is optional, and used to store the result if given (saves alloc.) Multiply ma^ * mb^. The matrix mc is optional, and used to store the result if given (saves alloc.) Computes the transform matrix that maps src to dest column vectors with third component 1. Hence we compute the inverse of src and multipy on the left by dest. The matrix mm is optional, and used to store the result if given (saves alloc.) Transforms coords by the given matrix ʘ™™J™4—Jšœ9™9šœÏk ˜ Jšœ œ˜*——JšœÏb œ œ˜šœœœ˜Jšœžœœ˜Jšœžœœ˜Jšœžœœœœœœœ˜5Jšœžœœ˜š œÏnœœœ œœœ ˜@šœ™JšÏc œ B™N——š Ÿœœœ œœœ ˜Sšœ|™|JšœU™UJš  œ B™N——šŸ œœœœ œœœœ˜hš G™GJš  œ B™Q——šŸœœœ œ œ œœœ ˜cš ™Jš  œ B™O——šŸœœœ œœœœ˜mš (œ œ '™ZJš  Ðcr ¡ ™DJš  œ B™O——š œŸ œœœ œ˜JJšœ%™%——Jšœ˜—…— L