Cubic.mesa
Copyright Ó 1985, 1992 by Xerox Corporation. All rights reserved.
Last changed by Michael Plass, August 4, 1982 1:45 pm
Doug Wyatt, September 5, 1985 1:00:29 pm PDT
Coeffs:
TYPE =
RECORD [c0,c1,c2,c3:
VEC];
The coefficients for a parametric cubic
x = c3.x*t^3 + c2.x*t^2 + c1.x*t + c0.x
y = c3.y*t^3 + c2.y*t^2 + c1.y*t + c0.y
Bezier:
TYPE =
RECORD[b0,b1,b2,b3:
VEC];
The Bezier control points for a cubic
CoeffsToBezier: PROC [c: Coeffs] RETURNS [b: Bezier];
BezierToCoeffs: PROC [b: Bezier] RETURNS [c: Coeffs];
BezierPolygon: PROC [b: Bezier, epsilon: REAL, Proc: PROC [VEC]];
IsFlat: PROC [b: Bezier, eps: REAL] RETURNS [BOOL];
}.