Trailing-Edge
-
PDP-10 Archives
-
decuslib10-05
-
43,50337/23/cosys.sim
There is 1 other file named cosys.sim in the archive. Click here to see a list.
OPTIONS(/E);
EXTERNAL CLASS figure;
COMMENT: Version 2, january 1975, $ke Blomberg;
REF(figure) PROCEDURE cosys(ox,x0,nx,dx,oy,y0,ny,dy);
REAL ox,oy,x0,y0,dx,dy; INTEGER nx,ny;
COMMENT: ox,oy origin (all measures in raster points)
x0,y0 starting coordinates of the axises
nx,ny number of tic marks on each axis
dx,dy distance between adjacent tic marks
The axises will be of length nx*dx, ny*dy;
BEGIN REF(figure) f; INTEGER i,n; REAL temp;
f:- NEW figure;
f.moveto(ox+x0,oy); f.drawto(ox+x0+nx*dx,oy);
f.moveto(ox,oy+y0); f.drawto(ox,oy+y0+ny*dy);
FOR i:=ny-1 STEP -1 UNTIL 0 DO
BEGIN temp:=oy+y0+i*dy;
f.moveto(ox-4,temp); f.drawto(ox+4,temp);
END;
n:=nx-1;
FOR i:=0 STEP 1 UNTIL n DO
BEGIN temp:=ox+x0+i*dx;
f.moveto(temp,oy+4); f.drawto(temp,oy-4);
END;
cosys:-f;
END***COSYS***