DIRECTORY Cubic2 USING [Bezier], Imager USING [VEC], ImagerTransformation USING [Transformation]; CharacterizeCubic: CEDAR DEFINITIONS ~ BEGIN Bezier: TYPE ~ Cubic2.Bezier; VEC: TYPE ~ Imager.VEC; Type: TYPE ~ {vanilla, loop, cusp, singleInflection, doubleInflection, degenerate}; GetType: PROC [bezier: Bezier] RETURNS [Type]; GetTypeFromMapped: PROC [pt: VEC] RETURNS [Type]; GetCanonicalPoint: PROC [bezier: Bezier] RETURNS [pt: VEC]; SixPoints: PROC[from0,from1, from2, to0, to1, to2: VEC] RETURNS[transform: ImagerTransformation.Transformation]; Colinear: SIGNAL; END. μCharacterizeCubic.mesa Copyright Σ 1987 by Xerox Corporation. All rights reserved. Maureen Stone, January 18, 1988 5:26:11 pm PST Package for analyzing the characteristics of cubic segments These procedures efficiently determine whether a Bezier cubic has a loop, cusp, one or two inflection points. "Vanilla" means none of the above, "degenerate" means that the characterization cannot take place because the cubic is actually a straight line or point. Determines the type of Bezier curve Call when pt has already been mapped into canonical form. Map point with transformation that takes the cubic into canonical form. Map "from" points onto "to" points, in numerical order Signalled if SixPoints can't construct a transformation Κo˜code•Mark outsideHeaderšœ™Kšœ<™