ImagerBrick.mesa
Adapted from CGBrickImpl by Ken Pier
Michael Plass, December 30, 1983 11:49 am
ImagerBrick: CEDAR DEFINITIONS = {
Types and Variables
Brick: TYPE = REF BrickRep;
BrickRep: TYPE = RECORD
[fSize, sSize: CARDINAL, --dimensions of the matrix always positive
phase: INTEGER, --shift value of succeeding matrix repetition
u, v: CARDINAL, --values matrix was derived from
cBrick: SEQUENCE size: NAT OF REAL
];
Procedures
BuildBrick: PROC [freq: REAL, angle: REAL, filter: PROC [x, y: REAL] RETURNS [fvalue: REAL]]
RETURNS [brick: Brick];
freq is the screen frequency, in pixels per dot (need not be an integer)
angle is the angle of screen rotation, in degrees
filter is defined on the interval [-1..+1] in both x and y, returning values in the range [0..1].
GetSize: PROC [brick: Brick] RETURNS [fSize, sSize: CARDINAL, phase: INTEGER];
brick is fSize long and sSize high
GetElement: PROC [brick: Brick, x, y: CARDINAL] RETURNS [bElement: REAL];
GetRow: PROC [brick: Brick, x, y: CARDINAL] RETURNS [row: CARDINAL];
GetCol: PROC [brick: Brick, x, y: CARDINAL] RETURNS [col: CARDINAL];
}. --of CGBrick
LOG
Created 21-Oct-81 11:27:15 By Pier
changed Brick to REF
reformatted, 19-JAN-82
changed brick definition to use L,p,D,cBrick field names, 2/22/82
Michael Plass, July 6, 1983 3:22 pm: Changed name from CGBrick to ImagerBrick, removed currentBrick and FreeBrick.
Michael Plass, July 7, 1983 8:59 am: changed brick definition to use fSize, sSize, phase, cBrick field names, Brick and BrickRep instead of BrickHandle and Brick.