diff options
Diffstat (limited to 'app/schulis-mathematiksystem/1.0/src/mat.hp72xx plot')
-rw-r--r-- | app/schulis-mathematiksystem/1.0/src/mat.hp72xx plot | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/schulis-mathematiksystem/1.0/src/mat.hp72xx plot b/app/schulis-mathematiksystem/1.0/src/mat.hp72xx plot new file mode 100644 index 0000000..d197007 --- /dev/null +++ b/app/schulis-mathematiksystem/1.0/src/mat.hp72xx plot @@ -0,0 +1,3 @@ +PACKEThpplotDEFINESdrawingarea,plotterkanal,beginplot,endplot,plotend,stdhoehe,stdbreite,geschwindigkeit,clear,pen,move,draw:LETxcm=37.0,ycm=27.7,papierx1=1200,papierx2=16000,papiery1=320,papiery2=11400,plotterunitspercm=100.0;TEXT CONSTschlange:=code(126),terminator:=code(125);INT CONSTxunits:=int(xcm*plotterunitspercm),yunits:=int(ycm*plotterunitspercm);BOUND TEXT VARpicture;INT VARterminalchannel,plotterchannel:=5;LET POS=STRUCT(INTx,y);POS VARposition:=POS:(0,0);REAL VARbuchstabenhoehe:=1.108,buchstabenbreite:=0.4625;INT VARvelocity:=10;LETbackspace="�",alt="",stand="",pktklein="}",pktgross="{";PROCdrawingarea(REAL VARx1,y1,INT VARxpixel,ypixel):x1:=xcm;y1:=ycm;xpixel:=xunits;ypixel:=yunits;END PROCdrawingarea;PROCgeschwindigkeit(INT CONSTx):IFx>0ANDx<37THENvelocity:=xFI END PROCgeschwindigkeit;REAL PROCstdhoehe:buchstabenhoeheEND PROCstdhoehe;REAL PROCstdbreite:buchstabenbreiteEND PROCstdbreite;PROCstdhoehe(REAL CONSThoehe):buchstabenhoehe:=hoeheEND PROCstdhoehe;PROCstdbreite(REAL CONSTbreite):buchstabenbreite:=breiteEND PROCstdbreite;PROCbeginplot:ENDPROCbeginplot;PROCendplot:ENDPROCendplot;PROCplotend:TEXT VARhp:="";move(0,0);sendepicture;hpCAT("v"+sbn(0));hpCAT"�"+".)";toplotterchannel;out(hp);toterminalchannel;ENDPROCplotend;PROCclear:terminalchannel:=channel;forget("picture ds",quiet);picture:=new("picture ds");picture:="";TEXT VARhp;hp:="�.(";hpout(hp);hp:="�.M:";hpout(hp);hp:="�.I1000;17;13:";hpout(hp);hp:=schlange;hpCAT"W";hpCATplotput(papierx1,papiery1);hpCATplotput(papierx2,papiery2);hpCATterminator;hpout(hp);hp:=schlange;hpCAT"S";hpCATplotput(xunits,yunits);hpCATterminator;hpout(hp);hpout("vA");hpout(schlange+"Q");hpout(schlange+"V"+sbn(velocity)+terminator);hpout(schlange+"P"+plotput(0,3));END PROCclear;PROCpen(INT CONSTbackground,foreground,thickness,linetype):linetypesenden;verifypen;switchtopen;.verifypen:INT VARpen;pen:=max(0,foreground);pen:=min(4,pen).switchtopen:TEXT VARhp;hp:=("v"+sbn(pen));hpout(hp).linetypesenden:hp:=schlange+"Q";hpCATlinetypecode;hpout(hp).linetypecode:TEXT VARtt;tt:="";IFlinetype=0THENtt:=terminator;ELIFlinetype=1THENtt:=terminator;ELIFlinetype=2THENtt:=sbn(32+0)+sbn(1)+mbn(15)+terminator;ELIFlinetype=3THENtt:=sbn(32+1)+sbn(2)+mbn(15)+terminator;ELIFlinetype=4THENtt:=sbn(32+1)+sbn(2)+mbn(30)+terminator;ELIFlinetype=5THENtt:=sbn(32+1)+sbn(2)+sbn(32+2)+sbn(2)+mbn(28)+terminator;ELSEtt:=terminatorFI;ttEND PROCpen;PROCmove(INT CONSTx,y):verifyxy;movetoxy.verifyxy:INT VARxx,yy;xx:=max(0,x);xx:=min(xunits,xx);yy:=max(0,y);yy:=min(yunits,yy).movetoxy:TEXT VARhp:="";hpCAT"p";hpCAT(plotput(xx,yy)+terminator);hpout(hp);position:=POS:(x,y)END PROCmove;PROCdraw(INT CONSTx,y):verifyxy;drawtoxy.verifyxy:INT VARxx,yy;xx:=max(0,x);xx:=min(xunits,xx);yy:=max(0,y);yy:=min(yunits,yy).drawtoxy:TEXT VARhp:="";hpCAT"q";hpCAT(plotput(xx,yy)+terminator);hpout(hp);position:=POS:(x,y)END PROCdraw;PROCdraw(TEXT CONSTrecord,REAL CONSTangle,height,width):TEXT VARhp;INT VARspace:=int(width*plotterunitspercm),size:=int(height*plotterunitspercm*1.5);hp:=schlange+"%";hpCATplotput(space,size);hpout(hp);hp:=schlange+"'";ersetzeumlaute;hpCATumgesetztertext;hpCATcode(3);hpout(hp);move(position.x,position.y).ersetzeumlaute:TEXT VARumgesetztertext:="";INT VARi;FORiFROM1UPTO LENGTHrecordREPbildeneuentextPER.bildeneuentext:IF(pos("äöüÄÖÜß",(recordSUBi)))=0THENumgesetztertextCAT(recordSUBi)ELSEumgesetztertextCATersetzterumlautFI.ersetzterumlaut:IF"ä"=(recordSUBi)THENalt+"a"+pktklein+standELIF"ö"=(recordSUBi)THENalt+"o"+pktklein+standELIF"ü"=(recordSUBi)THENalt+"u"+pktklein+standELIF"Ä"=(recordSUBi)THENalt+"A"+pktgross+standELIF"Ö"=(recordSUBi)THENalt+"O"+pktgross+standELIF"Ü"=(recordSUBi)THENalt+"U"+pktgross+standELIF"ß"=(recordSUBi)THEN"P"+backspace+"p"ELSE""FI.END PROCdraw;PROCdraw(TEXT CONSTrecord):draw(record,0.0,stdhoehe,stdbreite)END PROCdraw;TEXT PROCplotput(INT CONSTnx,ny):INT VARn,nx1,nx2,nx3,ny2,ny3,ny4,ny5,nxr,nyr;TEXT VARmbpformat;INT VARnp1,np2,np3,np4,np5;n:=nx;IF NOT(nx>ny)THENn:=ny;FI;IFn<256THEN IFn>31 +THENthreebyteformatELIFn>3THENtwobyteformatELSEonebyteformatFI;ELSE IFn<2048THENfourbyteformatELIFn<16384THENfivebyteformatELSEerrorstop("out of range: "+text(n));FI;FI;mbpformat.onebyteformat:np1:=ny+96+4*nx;mbpformat:=code(np1);.twobyteformat:nx1:=nxDIV2;nx2:=nx-2*nx1;np1:=nx1+96;np2:=ny+32*nx2;IF NOT(np2>31)THENnp2:=np2+64;FI;mbpformat:=code(np1)+code(np2);.threebyteformat:nx1:=nxDIV16;nx2:=nx-16*nx1;ny2:=nyDIV64;ny3:=ny-64*ny2;np1:=nx1+96;np2:=ny2+4*nx2;IF NOT(np2>31)THENnp2:=np2+64;FI;np3:=ny3;IF NOT(np3>31)THENnp3:=np3+64;FI;mbpformat:=code(np1)+code(np2)+code(np3);.fourbyteformat:nx1:=nxDIV128;nxr:=nx-128*nx1;nx2:=nxrDIV2;nx3:=nxr-2*nx2;ny3:=nyDIV64;ny4:=ny-64*ny3;np1:=96+nx1;np2:=nx2;IF NOT(np2>31)THENnp2:=np2+64;FI;np3:=ny3+32*nx3;IF NOT(np3>31)THENnp3:=np3+64;FI;np4:=ny4;IF NOT(np4>31)THENnp4:=np4+64;FI;mbpformat:=code(np1)+code(np2)+code(np3)+code(np4);.fivebyteformat:nx1:=nxDIV1024;nxr:=nx-1024*nx1;nx2:=nxrDIV16;nx3:=nxr-16*nx2;ny3:=nyDIV4096;nyr:=ny-4096*ny3;ny4:=nyrDIV64;ny5:=nyr-64*ny4;np1:=96+nx1;np2:=nx2;IF NOT(np2>31)THENnp2:=np2+64;FI;np3:=ny3+4*nx3;IF NOT(np3>31)THENnp3:=np3+64;FI;np4:=ny4;IF NOT(np4>31)THENnp4:=np4+64;FI;np5:=ny5;IF NOT(np5>31)THENnp5:=np5+64;FI;mbpformat:=code(np1)+code(np2)+code(np3)+code(np4)+code(np5);.END PROCplotput;TEXT PROCmbn(INT CONSTnn):TEXT VARmbnformat;INT VARnp1,np2,np3,nn1,nn2,nn3,nr;IFnn<16THENonebyteformatELIFnn<1024THENtwobyteformatELIFnn<=32767THENthreebyteformatELSEerrorstop("out of range: "+text(nn));FI;mbnformat.onebyteformat:np1:=nn+96;mbnformat:=code(np1).twobyteformat:nn1:=nnDIV64;nn2:=nn-64*nn1;assemble2;mbnformat:=code(np1)+code(np2);.threebyteformat:nn1:=nnDIV4096;nr:=nn-nn1*4096;nn2:=nrDIV64;nn3:=nr-64*nn2;assemble1;assemble2;mbnformat:=code(np1)+code(np2)+code(np3);.assemble1:np3:=nn3;IF NOT(np3>31)THENnp3:=np3+64;FI;.assemble2:np2:=nn2;IF NOT(np2>31)THENnp2:=np2+64;FI;np1:=nn1+96;.END PROCmbn;TEXT PROCsbn(INT CONSTnn):INT VARnp;np:=nn;IF NOT(np>31)THENnp:=np+64;FI;code(np).END PROCsbn;PROChpout(TEXT CONSTplotcommand):pictureCATplotcommand;IFlength(picture)>800THENsendepictureFI END PROChpout;PROCsendepicture:getlen;toplotterchannel;out(text(picture,len));picture:="";getacknowledge.getlen:INT VARlen:=min(1000,length(picture)).getacknowledge:clearinputbuffer;out("�");readhandshakechar.clearinputbuffer:WHILEincharety<>""REP PER.readhandshakechar:TEXT VARchar:="";INT VARsession;WHILEchar<>"
"REPinchar(char)PER;toterminalchannel.END PROCsendepicture;PROCtoplotterchannel:continue(plotterchannel);END PROCtoplotterchannel;PROCtoterminalchannel:END PROCtoterminalchannel;INT PROCplotterkanal:plotterchannelEND PROCplotterkanal;PROCplotterkanal(INT CONSTnr):plotterchannel:=nr;END PROCplotterkanal;END PACKEThpplot;plotterkanal(7) + |