PixelGraphics: CEDAR DEFINITIONS = BEGIN Point: TYPE ~ RECORD [x, y: INT]; Cubic: TYPE ~ RECORD [ax, ay, bx, by, cx, cy, dx, dy: REAL]; InterpolatePoints: PROC [p0, p1: Point, proc: PROC [p: Point]]; Line: PROC [p0, p1: Point] RETURNS [LIST OF Point]; Lines: PROC [p: LIST OF Point] RETURNS [LIST OF Point]; InterpolateLines: PROC [vertices: LIST OF Point, proc: PROC [p: Point]]; Spline: PROC [m: Cubic, segments: CARDINAL] RETURNS [LIST OF Point]; InterpolateSpline: PROC [m: Cubic, segments: CARDINAL, proc: PROC [p: Point]]; Bezier: PROC [p1, p2, p3, p4: Point] RETURNS [m: Cubic]; Simple: PROC [p1, p2, p3, p4: Point] RETURNS [m: Cubic]; BSpline: PROC [p1, p2, p3, p4: Point] RETURNS [m: Cubic]; CatmullRom: PROC [p1, p2, p3, p4: Point] RETURNS [m: Cubic]; Hermite: PROC [p1, q1, p2, q2: Point] RETURNS [m: Cubic]; END. ζPixelGraphics.mesa Contains utilities for doing various kinds of graphing, especially related to working on a raster, and drawing splines. Eric Nickell, April 25, 1985 7:54:10 am PST Interpolates the points in the line segment between p0 and p1, calling proc for each one. Note that no call is made for point p0, but one is made for p1. Returns the list of points which constitute the line between p0 and p1. The points returned will be in order, but no guarantee is made as to which endpoint is found at the beginning of the LIST and which is at the end. Returns the list of points which constitute the lines between successive points in p. The points returned will be in order, but no guarantee is made as to which endpoint is found at the beginning of the LIST and which is at the end. Same as Lines above, except that calls proc for each point, instead of placing in a list Finds the set of interpolation points for the spline, breaking the spline into segments parts. Same as Spline above, except that calls proc for each point, instead of placing in a list Generates the Cubic matrix for a Bezier spline given the four control points. Generates the Cubic matrix for a Cubic spline given the four control points. Generates the Cubic matrix for a B-Spline given the four control points. Generates the Cubic matrix for a Catmull-Rom spline given the four control points. Generates the Cubic matrix for a Hermite spline given the two control points and the tangent vectors at those points. ΚΓ˜code™K™wK™+K™—šœΟkœ œ˜(J˜Jšœœœœ˜!Jšœœœ"œ˜