-- LSSpline.mesa -- For fitting a cubic spline with specified endpoints and tangents. -- Michael Plass August 3, 1982 3:47 pm DIRECTORY Complex, Cubic, Seq; LSSpline: DEFINITIONS = BEGIN Handle: PUBLIC TYPE = REF Rec; Rec: PUBLIC TYPE = RECORD [ z: Seq.ComplexSequence _ NIL, tan: Seq.ComplexSequence _ NIL, t: Seq.RealSequence _ NIL, length: NAT _ 0 ]; -- Non-opaque for Warnock's sake. Create: PUBLIC PROCEDURE [lengthHint: NAT _ 10] RETURNS [handle: Handle]; Reset: PUBLIC PROCEDURE [handle: Handle]; Sample: PUBLIC PROCEDURE [ handle: Handle, samplePoint: Complex.Vec, tangent: Complex.Vec _ [0,0]]; -- Will expand the data structures if necessary. CubicProc: TYPE = PROCEDURE [Cubic.Bezier]; Subdivide: PUBLIC PROCEDURE [ handle: Handle, cubicProc: CubicProc, tolerance: REAL, from: NAT _ 0, thru: NAT _ LAST[NAT] ]; END.