<<>> <> <> <> <> <> DIRECTORY G3dBasic, G3dMatrix, Rope; G3dPlane: CEDAR DEFINITIONS ~ BEGIN <> Error: ERROR [reason: ROPE]; <> Plane: TYPE ~ RECORD [x, y, z, w: REAL ¬ 0.0, normalized: BOOL ¬ FALSE]; MajorPlane: TYPE ~ {xy, xz, yz, unknown}; -- the xy, xz, or yz planes PlaneSequence: TYPE ~ REF PlaneSequenceRep; PlaneSequenceRep: TYPE ~ RECORD [ length: CARDINAL ¬ 0, element: SEQUENCE maxLength: NATURAL OF Plane ]; Circle: TYPE ~ G3dBasic.Circle; NatSequence: TYPE ~ G3dBasic.NatSequence; Pair: TYPE ~ G3dBasic.Pair; PairSequence: TYPE ~ G3dBasic.PairSequence; Ray: TYPE ~ G3dBasic.Ray; Sign: TYPE ~ G3dBasic.Sign; Triple: TYPE ~ G3dBasic.Triple; TripleSequence: TYPE ~ G3dBasic.TripleSequence; Matrix: TYPE ~ G3dMatrix.Matrix; ROPE: TYPE ~ Rope.ROPE; <> FromPolygon: PROC [points: TripleSequence, polygon: NatSequence ¬ NIL] RETURNS [Plane]; <> <> <> <<>> FromThreePoints: PROC [p1, p2, p3: Triple, unitize: BOOL ¬ FALSE] RETURNS [Plane]; <> <> <> FromThreePointsAndBehind: PROC [p1, p2, p3, behind: Triple, unitize: BOOL ¬ FALSE] RETURNS [Plane]; <> <> FromPointAndNormal: PROC [point, normal: Triple, unitize: BOOL ¬ FALSE] RETURNS [Plane]; <> <> <<>> DFromNormalAndPoints: PROC [ normal: Triple, points: TripleSequence, polygon: NatSequence ¬ NIL] RETURNS [REAL]; <> <<>> NormalFromPlane: PROC [plane: Plane, unit: BOOL ¬ FALSE] RETURNS [Triple]; <> <> Unit: PROC [plane: Plane] RETURNS [Plane]; <> <> <> IntersectionOf3: PROC [p1, p2, p3: Plane] RETURNS [Triple]; <> <> IntersectionOf2: PROC [plane1, plane2: Plane] RETURNS [Ray]; <> <> IntersectWithLine: PROC [plane: Plane, line: Ray] RETURNS [Triple]; <> <> <> ProjectPointToPlane: PROC [point: Triple, plane: Plane] RETURNS [Triple]; <> <<>> ProjectVectorToPlane: PROC [v: Triple, plane: Plane] RETURNS [Triple]; <> <<>> ProjectPointToMajorPlane: PROC [p: Triple, majorPlane: MajorPlane] RETURNS [Pair]; <> ProjectPointsToXYPlane: PROC [points: TripleSequence] RETURNS [PairSequence]; <> <<>> ProjectPointsToXZPlane: PROC [points: TripleSequence] RETURNS [PairSequence]; <> <<>> ProjectPointsToYZPlane: PROC [points: TripleSequence] RETURNS [PairSequence]; <> <<>> ProjectPointsToMajorPlane: PROC [points: TripleSequence, majorPlane: MajorPlane] RETURNS [PairSequence]; <> <> Side: PROC [point: Triple, plane: Plane] RETURNS [Sign]; <> Negate: PROC [plane: Plane] RETURNS [Plane]; <> AlignWithXYPlane: PROC [plane: Plane, out: Matrix ¬ NIL] RETURNS [Matrix]; <> <> <> <<>> ClosestPair: PROC [pairs: PairSequence, pair: Pair] RETURNS [NAT]; <> <<>> GetMajorPlane: PROC [plane: Plane] RETURNS [MajorPlane]; <> <<>> CenterOfPlane: PROC [plane: Plane] RETURNS [Triple]; <> <<>> DistanceToPoint: PROC [point: Triple, plane: Plane, unitize: BOOL ¬ TRUE] RETURNS [REAL]; <> <> <> <> <<>> CircleFromPoints: PROC [p1, p2, p3: Triple] RETURNS [Circle]; <> <> <> CopyPlaneSequence: PROC [planes: PlaneSequence] RETURNS [PlaneSequence]; AddToPlaneSequence: PROC [planes: PlaneSequence, plane: Plane] RETURNS [PlaneSequence]; LengthenPlaneSequence: PROC [planes: PlaneSequence, amount: REAL ¬ 1.3] RETURNS [PlaneSequence]; END.