(* VERSION 0002 *) module plot8; (*..................................................................*) (* PLOTLIB *) (* Plotlib is a collection of plot routines to aid in graphics *) (* programs. The routines were originally published in BYTE as *) (* 'Drawing with UCSD Pascal and the Hiplot Plotter' by Dr. James *) (* Stork, Oct 1981. The routines have been modified to run with *) (* a MicroAngelo graphics terminal by Ray Hopkins, 8 Chestnut Hill *) (* Ct., Cinnaminson N.J. (609) 829-4686. *) (*..................................................................*) type {$I PLOTLIB.TYP} const {$I PLOTLIB.CON} var xpos,ypos :external real; (*$IPLOTLIB.DEF*) {$ISTDLIB.DEF} procedure plotsymbol(sym:integer;height:real); var rxpos,rypos:real; begin rxpos:=xpos; rypos:=ypos; case sym of 1:begin {triangle} plotline(2,xpos,ypos+height/2); plotline(2,xpos-height/2,ypos-height); plotline(2,xpos+height,ypos); plotline(2,xpos-height/2,ypos+height); plotline(1,rxpos,rypos); end; 2:begin { X } plotline(1,xpos-height/2,ypos+height/2); plotline(2,xpos+height,ypos-height); plotline(1,xpos-height,ypos); plotline(2,xpos+height,ypos+height); plotline(1,rxpos,rypos); end; 3:begin {square} plotline(1,xpos,ypos+height/2); plotline(2,xpos-height/2,ypos); plotline(2,xpos,ypos-height); plotline(2,xpos+height,ypos); plotline(2,xpos,ypos+height); plotline(2,xpos-height/2,ypos); plotline(1,rxpos,rypos); end; 4:begin { + } plotline(2,xpos+height/2,ypos); plotline(2,xpos-height,ypos); plotline(2,xpos+height/2,ypos); plotline(2,xpos,ypos+height/2); plotline(2,xpos,ypos-height); plotline(2,rxpos,rypos); end; 5:begin { | } plotline(2,xpos,ypos+height/2); plotline(2,xpos,ypos-height); plotline(2,xpos,ypos); end; end; end; {plotsymbol} modend.