<> <> <> <> DIRECTORY Vector USING [VEC], Seq USING [ComplexSequence, RealSequence]; SampledCurves: CEDAR DEFINITIONS = { SampledCurve: TYPE = REF SampledCurveRec; PointRec: TYPE = RECORD [p, t: Vector.VEC, k,ds: REAL]; SampledCurveRec: TYPE = RECORD[closed: BOOLEAN, element: SEQUENCE length:NAT OF PointRec]; SampledCurveFromSamples: PROC [samples: Seq.ComplexSequence, closed: BOOLEAN] RETURNS[SampledCurve]; DeltaK: PROC[sc: SampledCurve] RETURNS [deltas: Seq.RealSequence]; <> Wrap: PROC[sc: SampledCurve, index: INT] RETURNS [newIndex: NAT]; OpenCurve: SIGNAL; --raised when you try an illegal operation on an open curve ArcLength: PROC[sc: SampledCurve, from, to: NAT] RETURNS[d: REAL]; <<>> <> <> <> ConditionProc: TYPE = PROC[point: PointRec] RETURNS[BOOLEAN]; None: SIGNAL; FindSequence: PROC[sc: SampledCurve, start: NAT, condition: ConditionProc] RETURNS[ft, lt: NAT]; <> <> <<(the change in angle)/(change in arc length) approximated by ArcTan[Cross[dIn, dOut],Dot[dIn, dOut]] Find the radius of the center of the circle that contains the three points (0,0) dIn, dOut >> CurvatureProc: TYPE = PROC[dIn,dOut: Vector.VEC] RETURNS [REAL]; SetKProc: PROC[CurvatureProc]; DThetaDegrees: CurvatureProc; DThetaRadians: CurvatureProc; CircleCenter: CurvatureProc; FindCircleCenter: PROC[p0,p1,p2: Vector.VEC] RETURNS [center: Vector.VEC, valid: BOOLEAN]; <> FindAngleDegrees: PROC[dIn,dOut: Vector.VEC] RETURNS [REAL]; <> }.