Misc3d.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Bloomenthal, February 18, 1986 3:29:23 pm PST
DIRECTORY Matrix3d, Vector3d;
Misc3d: CEDAR DEFINITIONS
~ BEGIN
Triple: TYPE ~ Vector3d.Triple;
A Frame is defined as a vector, its principal normal, and its binormal (see Computation Geometry for Design and Manufacture by Faux and Pratt).
Frame: TYPE ~ ARRAY {v, n, b} OF Triple;
Matrix: TYPE ~ Matrix3d.Matrix;
MakeFrame: PROC [v: Triple] RETURNS [Frame];
Return frame of v.
Basis: PROC [v, vv, rv: Triple] RETURNS [n, b: Triple];
Given tangent v along a curve, previous tangent vv, and reference vector rv, compute vectors n and b; v, n, and b form a new set of axes; the transformation of the x, y, and z axes to v, n, and b accomodates the twist in the curve; n and b are unitized
RefMatrix: PROC [p, x, y, z: Triple, s, t: REAL, out: Matrix ← NIL] RETURNS [Matrix];
Return matrix which transforms origin to p, xaxis to x, yaxis to y and zaxis to z; twist around z by t degrees and scale by s.
END.