-- CGSpline.mesa
-- Last changed by Doug Wyatt, August 23, 1982 3:34 pm
CGSpline: CEDAR DEFINITIONS = {
Dim: TYPE = {X,Y};
Coords: TYPE = ARRAY Dim OF REAL;
Coeffs: TYPE = RECORD[t3,t2,t1,t0: Coords];
Knots: TYPE = REF KnotsRep;
KnotsRep: TYPE = RECORD[length: NAT, array: SEQUENCE space: NAT OF Coords];
SplineType: TYPE = {naturalAL,cyclicAL};
Error: ERROR[type: ErrorType];
ErrorType: TYPE = {bug, tooFewKnots, unmatchedEnds};
Ref: TYPE = REF Rep;
Rep: TYPE;
New: PROC[size: NAT ← 0] RETURNS[Ref];
MakeSpline: PROC[self: Ref, knots: Knots, splineType: SplineType,
Proc: PROC[Coeffs]];
}.