DIRECTORY Seq, Complex USING [Vec], Cubic USING [Bezier]; Nodes: CEDAR DEFINITIONS = { DynNodes: PROC [samples: Seq.ComplexSequence, closed: BOOLEAN, penalty: REAL] RETURNS [nodes: Seq.NatSequence]; CubicTangents: PROC [samples: Seq.ComplexSequence, closed: BOOLEAN, err: REAL, maxit: INT, nodes: Seq.NatSequence _ NIL] RETURNS [tangents: Seq.ComplexSequence]; QuickTangents: PUBLIC PROC [samples: Seq.ComplexSequence, closed: BOOLEAN, maxAngle: REAL, nodes: Seq.NatSequence _ NIL] RETURNS [tangents: Seq.ComplexSequence]; SquareTangents: PUBLIC PROC [samples: Seq.ComplexSequence, closed: BOOLEAN, maxAngle: REAL, nodes: Seq.NatSequence _ NIL] RETURNS [tangents: Seq.ComplexSequence]; Progress: TYPE = PROC[tangent: Complex.Vec, cubic: Cubic.Bezier] RETURNS [stop: BOOLEAN]; ICubicTangents: PROC [progress: Progress, samples: Seq.ComplexSequence, closed: BOOLEAN, err: REAL, maxit: INT, nodes: Seq.NatSequence _ NIL]; }. FNodes.mesa Maureen Stone July 3, 1984 4:27:23 pm PDT The inteface for nodes is a sequence of samples. Points should never be duplicated to close a curve. The routines will return a sequence of indices into the sample sequence that are the nodes, or places to consider for knots. The tangent routines take a sequence of samples and a sequence of nodes. They will return a sequence of tangents the same length as the sequence of nodes. If nodes=NIL then every sample will have a tangent computed. Sample sequences should be checked NIL before calling these routines. finds nodes by fitting a polygon using DynFit Sets tangents at nodes by fitting a cubic between neighboring nodes computes tangents by differencing neighbors computes tangents, weighting the longer edges more Like CubicTangents but allows incremental feedback ÊG˜Jšœ ™ Jšœ)™)šÏk ˜ Jšœ˜Jšœœ˜Jšœœ ˜—J˜Jšœœ œ˜šœãœ™…J˜—š Ïnœœ(œ œœ˜oJšÏc-™-—šž œœ(œœ œœœ!˜¡JšŸC™C—š ž œ œ(œ œœœ!˜¡JšŸ+™+—š žœ œ(œ œœœ!˜¢JšŸ2™2—Jšžœ œ,œœ˜Yš žœœ<œœ œœ˜ŽJšŸ2™2—J˜—…—ž+