DIRECTORY Complex USING [VEC], Cubic2 USING [Bezier], LSPiece USING [Metrics], Seq USING [ComplexSequence, NatSequence]; Nodes: CEDAR DEFINITIONS = { DynNodes: PROC [samples: Seq.ComplexSequence, closed: BOOLEAN, penalty: REAL] RETURNS [nodes: Seq.NatSequence]; CubicTangents: PROC [samples: Seq.ComplexSequence, closed: BOOLEAN, metrics: LSPiece.Metrics, 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: Cubic2.Bezier] RETURNS [stop: BOOLEAN]; ICubicTangents: PROC [progress: Progress, samples: Seq.ComplexSequence, closed: BOOLEAN, metrics: LSPiece.Metrics, nodes: Seq.NatSequence _ NIL]; }. μNodes.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Maureen Stone August 29, 1984 11:32:46 am PDT Doug Wyatt, September 5, 1985 2:32:29 pm PDT Maureen Stone, September 28, 1987 4:50:43 pm PDT The interface 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 Κ†˜codešœ ™ Kšœ Οmœ1™