-- Cubic.mesa
-- Last changed by Michael Plass,  August 4, 1982 1:45 pm
-- Written by Doug Wyatt, September 1, 1980  10:00 PM

DIRECTORY
	Vector USING [Vec],
	CGCubic USING [Bezier, Coeffs];

Cubic: CEDAR DEFINITIONS = {

Coeffs: TYPE = CGCubic.Coeffs;
-- RECORD[c0,c1,c2,c3: Vector.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 = CGCubic.Bezier;
-- RECORD[b0,b1,b2,b3: Vector.Vec];
-- The Bezier control points for a cubic

CoeffsToBezier: PROCEDURE[c: Coeffs] RETURNS[b: Bezier];
BezierToCoeffs: PROCEDURE[b: Bezier] RETURNS[c: Coeffs];
BezierPolygon: PROCEDURE[b: Bezier, epsilon: REAL,Proc: PROCEDURE[Vector.Vec]];
IsFlat: PROCEDURE[b: Bezier, eps: REAL];
CubicImpl: PROGRAM;

}.

Michael Plass,  August 4, 1982 1:45 pm. Made Coeffs and Bezier the same as in CGCubic.