PEConstraints.mesa
Written by Darlene Plebon on August 22, 1983 10:36 am
Routines for imposing continuity constaints on the bezier spline segments. First order continuity is achieved by imposing colinearity on the tangent vectors at the junction of the two bezier spline segments.
DIRECTORY
PETypes,
ViewerClasses USING [Viewer];
PEConstraints: CEDAR DEFINITIONS =
BEGIN OPEN PETypes;
Constrain: PROCEDURE [pathViewer: ViewerClasses.Viewer, vertex: VertexNode, segment: SegmentNode, newPosition: Point];
This updates the position of the specified vertex in the specified segment according to the continuity constraints specified for it with respect to adjacent vertices. The application of the constraints may result in other vertices being moved too. This routine also updates the display accordingly.
ContinuousAt: PROCEDURE [vertex: VertexNode, segment: SegmentNode] RETURNS [continuous: BOOLEAN];
This routine determines whether continuity is required at the specified vertex. Continuity can be a requirement only at knots.
IsFixed: PROCEDURE [vertex: VertexNode] RETURNS [isFixed: BOOLEAN];
This routine determines whether the position of the specified vertex is fixed. A vertex is fixed if it is a knot, or if it is a control point whose position is fixed.
END.