-- CGCubic.mesa
-- Last changed by Doug Wyatt, August 23, 1982 3:33 pm

DIRECTORY
GraphicsBasic USING [Vec];

CGCubic: CEDAR DEFINITIONS = {

Coeffs: TYPE = RECORD[c0,c1,c2,c3: GraphicsBasic.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: GraphicsBasic.Vec];
-- Bezier point representation for a cubic

CoeffsToBezier: PROC[Coeffs] RETURNS[Bezier];

BezierToCoeffs: PROC[Bezier] RETURNS[Coeffs];

Split: PROC[Bezier] RETURNS[Bezier,Bezier];

Flat: PROC[bezier: Bezier, epsilon: REAL] RETURNS[BOOLEAN];

}.