DIRECTORY G2dBasic, Rope; G2dSpline: CEDAR DEFINITIONS ~ BEGIN Pair: TYPE ~ G2dBasic.Pair; RealSequence: TYPE ~ G2dBasic.RealSequence; PairSequence: TYPE ~ G2dBasic.PairSequence; Spline1d: TYPE ~ REF Spline1dRep; Spline1dRep: TYPE ~ ARRAY [0..4) OF REAL; Spline1dSequence: TYPE ~ REF Spline1dSequenceRep; Spline1dSequenceRep: TYPE ~ RECORD [ length: CARDINAL ¬ 0, element: SEQUENCE maxLength: CARDINAL OF Spline1d ]; Spline2d: TYPE ~ REF Spline2dRep; Spline2dRep: TYPE ~ ARRAY [0..4) OF Pair; Spline2dSequence: TYPE ~ REF Spline2dSequenceRep; Spline2dSequenceRep: TYPE ~ RECORD [ length: CARDINAL ¬ 0, element: SEQUENCE maxLength: CARDINAL OF Spline2d ]; NearSpline: TYPE ~ RECORD [ point: Pair ¬ [0.0, 0.0], -- point on 2d spline t: REAL ¬ 0.0, -- parametric position distance: REAL ¬ 0.0 -- distance to spline ]; Error: ERROR [reason: Rope.ROPE]; Interpolate1d: PROC [ knots: RealSequence, spline: Spline1dSequence ¬ NIL, noOvershoot: BOOL ¬ FALSE] RETURNS [Spline1dSequence]; Interpolate2d: PROC [ knots: PairSequence, spline: Spline2dSequence ¬ NIL] RETURNS [Spline2dSequence]; Position1d: PROC [spline: Spline1d, t: REAL] RETURNS [REAL]; Velocity1d: PROC [spline: Spline1d, t: REAL] RETURNS [REAL]; Acceleration1d: PROC [spline: Spline1d, t: REAL] RETURNS [REAL]; Position2d: PROC [spline: Spline2d, t: REAL] RETURNS [Pair]; Velocity2d: PROC [spline: Spline2d, t: REAL] RETURNS [Pair]; Acceleration2d: PROC [spline: Spline2d, t: REAL] RETURNS [Pair]; END. ^ G2dSpline.mesa Copyright Σ 1984, 1992 by Xerox Corporation. All rights reserved. Bloomenthal, July 1, 1992 7:08 pm PDT Type Declarations 1D Interpolation Creates one-dimensional natural interpolating spline with chord-length parametrization. Use spline if nonsNIL. End tangents are zero. If noOvershoot, clamp tangents to prevent spline from exceeding knot values Creates two-dimensional natural interpolating spline with chord-length parametrization. Use spline if nonsNIL. End tangents are zero. Evaluation Return the point of the curve at position t. Return the unnormalized tangent of the curve at position t. Return the unnormalized acceleration of the curve at position t. Return the point of the curve at position t. Return the unnormalized tangent of the curve at position t. Return the unnormalized acceleration of the curve at position t. Κ"•NewlineDelimiter –"cedarcode" style™™Jšœ Οeœ6™B™%J™—JšΟk œ˜J˜—JšΠln œžœž ˜Jšœž˜headšΟl™šœ žœ˜ J˜—Jšœžœ˜-šœžœ˜-J˜—Jšœ žœžœ ˜%š œžœžœžœžœ˜,J˜—Jšœžœžœ˜2šœžœžœ˜$Jšœžœ˜Jšœžœ žœžœ ˜7Jšœ˜J˜—Jšœ žœžœ ˜%šœžœžœžœ˜,J˜—Jšœžœžœ˜2šœžœžœ˜$Jšœžœ˜Jšœžœ žœžœ ˜7J˜J˜—šœžœžœ˜Jšœ#Οc˜8Jšœ žœ ‘˜0Jšœžœ ‘˜3J˜J˜—JšΟnœžœžœ˜!—š ™š’ œžœ˜Jšœ˜Jšœžœ˜Jšœ žœžœ˜Jšžœ˜J™WJ™J™J™KJ™—š’ œžœ˜Jšœ˜Jšœžœ˜Jšžœ˜J™WJ™J™——š  ™ š ’ œžœžœžœžœ˜