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 ำ 1985, 1992 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 สฎ•NewlineDelimiter –(cedarcode) style™codešœ ™ Kšœ ฯeœ6™BKšœ-™-K™,K™0—K˜šฯk ˜ Kšœžœžœ˜Kšœžœ ˜Kšœžœ ˜Kšœžœ ˜)—K˜Kšะblœžœž œ˜K™šœไžœ™†K˜—š ฯnœžœ(žœ žœžœ˜oKšฯc-™-K™—š   œžœ(žœ5žœžœ!˜คKšกC™CK™—š   œž œ(žœ žœžœžœ!˜กKšก+™+K™—š  œž œ(žœ žœžœžœ!˜ขKšก2™2K™—š  œž œžœžœžœ˜ZK˜—š œžœ<žœ5žœ˜‘Kšก2™2K™—K™K˜—…—ไ †