home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / c / yamp / graph.tex < prev    next >
LaTeX Document  |  1992-01-17  |  12.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Corel 10 Texture (image/corel10Texture) ext Unsupported
1% dexvert Croteam texture file (image/croteamTextureFile) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file C++ source text default
99% file LaTeX document text default
98% file C source, ASCII text, with CRLF line terminators default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: plain text[CRLF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 63 68 61 70 74 65 72 | 7b 20 41 6e 20 58 2d 2d |\chapter|{ An X--|
|00000010| 59 20 50 6c 6f 74 3a 20 | 47 4d 61 74 72 69 78 7d |Y Plot: |GMatrix}|
|00000020| 0d 0a 0d 0a 41 20 67 72 | 61 70 68 69 63 73 20 6f |....A gr|aphics o|
|00000030| 62 6a 65 63 74 20 77 61 | 73 20 64 65 76 65 6c 6f |bject wa|s develo|
|00000040| 70 65 64 20 74 6f 20 68 | 65 6c 70 20 76 69 73 75 |ped to h|elp visu|
|00000050| 61 6c 69 7a 65 20 64 61 | 74 61 2e 20 49 74 20 75 |alize da|ta. It u|
|00000060| 73 65 73 0d 0a 74 68 65 | 20 42 6f 72 6c 61 6e 64 |ses..the| Borland|
|00000070| 20 47 72 61 70 68 69 63 | 73 20 49 6e 74 65 72 66 | Graphic|s Interf|
|00000080| 61 63 65 20 28 42 47 49 | 29 2c 20 73 6f 20 69 74 |ace (BGI|), so it|
|00000090| 20 72 65 71 75 69 72 65 | 73 20 74 68 65 20 42 6f | require|s the Bo|
|000000a0| 72 6c 61 6e 64 0d 0a 63 | 6f 6d 70 69 6c 65 72 73 |rland..c|ompilers|
|000000b0| 2e 20 49 74 20 75 73 65 | 73 20 61 20 76 69 72 74 |. It use|s a virt|
|000000c0| 75 61 6c 20 6d 61 74 72 | 69 78 20 74 6f 20 73 74 |ual matr|ix to st|
|000000d0| 6f 72 65 20 74 68 65 20 | 64 61 74 61 2c 20 61 6e |ore the |data, an|
|000000e0| 64 0d 0a 64 69 73 70 6c | 61 79 73 20 61 6e 20 78 |d..displ|ays an x|
|000000f0| 2d 2d 79 20 67 72 61 70 | 68 20 6f 6e 20 74 68 65 |--y grap|h on the|
|00000100| 20 73 63 72 65 65 6e 2e | 20 49 74 20 69 73 20 73 | screen.| It is s|
|00000110| 69 6d 70 6c 65 20 61 73 | 20 66 61 72 20 61 73 0d |imple as| far as.|
|00000120| 0a 67 72 61 70 68 69 63 | 73 20 67 6f 65 73 2e 20 |.graphic|s goes. |
|00000130| 49 74 20 69 73 20 69 6e | 74 65 6e 64 65 64 20 74 |It is in|tended t|
|00000140| 6f 20 62 65 20 71 75 69 | 63 6b 20 61 6e 64 20 64 |o be qui|ck and d|
|00000150| 69 72 74 79 2e 20 4d 6f | 72 65 0d 0a 73 6f 70 68 |irty. Mo|re..soph|
|00000160| 69 73 74 69 63 61 74 65 | 64 20 67 72 61 70 68 69 |isticate|d graphi|
|00000170| 63 73 20 61 72 65 20 77 | 69 64 65 6c 79 20 61 76 |cs are w|idely av|
|00000180| 61 69 6c 61 62 6c 65 2c | 20 73 6f 20 74 68 65 72 |ailable,| so ther|
|00000190| 65 20 69 73 20 6e 6f 74 | 0d 0a 6d 75 63 68 20 6e |e is not|..much n|
|000001a0| 65 65 64 20 74 6f 20 72 | 65 69 6e 76 65 6e 74 20 |eed to r|einvent |
|000001b0| 74 68 65 20 77 68 65 65 | 6c 2e 20 59 6f 75 20 63 |the whee|l. You c|
|000001c0| 61 6e 20 77 72 69 74 65 | 20 74 68 65 20 76 69 72 |an write| the vir|
|000001d0| 74 75 61 6c 0d 0a 6d 61 | 74 72 69 78 20 74 6f 20 |tual..ma|trix to |
|000001e0| 61 6e 20 41 53 43 49 49 | 20 66 69 6c 65 2c 20 61 |an ASCII| file, a|
|000001f0| 6e 64 20 75 73 65 20 61 | 20 70 72 6f 66 65 73 73 |nd use a| profess|
|00000200| 69 6f 6e 61 6c 20 70 61 | 63 6b 61 67 65 20 66 6f |ional pa|ckage fo|
|00000210| 72 20 68 69 67 68 0d 0a | 71 75 61 6c 69 74 79 20 |r high..|quality |
|00000220| 6f 75 74 70 75 74 2e 20 | 0d 0a 0d 0a 54 68 65 20 |output. |....The |
|00000230| 5c 76 65 72 62 2b 47 4d | 61 74 72 69 78 2b 20 5c |\verb+GM|atrix+ \|
|00000240| 69 6e 64 65 78 7b 47 4d | 61 74 72 69 78 20 7d 20 |index{GM|atrix } |
|00000250| 63 6c 61 73 73 20 63 6f | 6d 62 69 6e 65 73 20 67 |class co|mbines g|
|00000260| 72 61 70 68 69 63 73 20 | 77 69 74 68 0d 0a 61 20 |raphics |with..a |
|00000270| 76 69 72 74 75 61 6c 20 | 6d 61 74 72 69 78 2e 20 |virtual |matrix. |
|00000280| 54 68 65 20 5c 76 65 72 | 62 2b 47 4d 61 74 72 69 |The \ver|b+GMatri|
|00000290| 78 2b 20 6b 65 65 70 73 | 20 74 68 65 20 64 61 74 |x+ keeps| the dat|
|000002a0| 61 20 69 6e 20 61 20 76 | 69 72 74 75 61 6c 0d 0a |a in a v|irtual..|
|000002b0| 6d 61 74 72 69 78 2e 20 | 41 6e 79 20 6e 75 6d 62 |matrix. |Any numb|
|000002c0| 65 72 20 6f 66 20 78 2d | 2d 79 20 70 6c 6f 74 73 |er of x-|-y plots|
|000002d0| 20 63 61 6e 20 62 65 20 | 73 74 6f 72 65 64 20 69 | can be |stored i|
|000002e0| 6e 20 74 68 69 73 20 6d | 61 74 72 69 78 2e 0d 0a |n this m|atrix...|
|000002f0| 4f 6e 63 65 20 74 68 65 | 20 64 61 74 61 20 68 61 |Once the| data ha|
|00000300| 73 20 62 65 65 6e 20 63 | 72 65 61 74 65 64 2c 20 |s been c|reated, |
|00000310| 74 68 65 20 67 72 61 70 | 68 20 63 61 6e 20 62 65 |the grap|h can be|
|00000320| 20 64 69 73 70 6c 61 79 | 65 64 2e 20 54 68 65 0d | display|ed. The.|
|00000330| 0a 67 72 61 70 68 20 68 | 61 73 20 74 69 74 6c 65 |.graph h|as title|
|00000340| 73 2c 20 61 78 69 73 20 | 6c 61 62 65 6c 73 2c 20 |s, axis |labels, |
|00000350| 6e 65 61 74 20 61 78 69 | 73 20 76 61 6c 75 65 73 |neat axi|s values|
|00000360| 2c 20 72 65 66 65 72 65 | 6e 63 65 0d 0a 6c 69 6e |, refere|nce..lin|
|00000370| 65 73 2c 20 61 6e 64 20 | 76 61 72 69 6f 75 73 20 |es, and |various |
|00000380| 73 79 6d 62 6f 6c 73 20 | 66 6f 72 20 6f 76 65 72 |symbols |for over|
|00000390| 6c 61 79 65 64 20 67 72 | 61 70 68 73 2e 20 49 74 |layed gr|aphs. It|
|000003a0| 20 64 65 74 65 72 6d 69 | 6e 65 73 0d 0a 77 68 65 | determi|nes..whe|
|000003b0| 72 65 20 74 6f 20 70 75 | 74 20 69 74 73 20 65 6c |re to pu|t its el|
|000003c0| 65 6d 65 6e 74 73 20 61 | 63 63 6f 72 64 69 6e 67 |ements a|ccording|
|000003d0| 20 74 6f 20 74 68 65 20 | 76 69 65 77 20 73 65 74 | to the |view set|
|000003e0| 74 69 6e 67 73 20 66 6f | 75 6e 64 0d 0a 66 72 6f |tings fo|und..fro|
|000003f0| 6d 20 61 75 74 6f 6d 61 | 74 69 63 20 64 65 74 65 |m automa|tic dete|
|00000400| 63 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 67 72 61 |ction of| the gra|
|00000410| 70 68 69 63 73 20 73 79 | 73 74 65 6d 20 6f 6e 20 |phics sy|stem on |
|00000420| 74 68 65 20 6d 61 63 68 | 69 6e 65 2e 0d 0a 48 65 |the mach|ine...He|
|00000430| 6e 63 65 20 69 74 20 77 | 6f 72 6b 73 20 66 6f 72 |nce it w|orks for|
|00000440| 20 61 6e 79 20 6f 66 20 | 74 68 65 20 6d 6f 6e 69 | any of |the moni|
|00000450| 74 6f 72 73 20 61 6e 64 | 20 6d 6f 64 65 73 20 73 |tors and| modes s|
|00000460| 75 70 70 6f 72 74 65 64 | 20 62 79 0d 0a 74 68 65 |upported| by..the|
|00000470| 20 42 47 49 2e 20 0d 0a | 0d 0a 5c 73 65 63 74 69 | BGI. ..|..\secti|
|00000480| 6f 6e 7b 54 68 65 20 47 | 4d 61 74 72 69 78 20 43 |on{The G|Matrix C|
|00000490| 6c 61 73 73 7d 0d 0a 0d | 0a 49 20 64 65 73 69 67 |lass}...|.I desig|
|000004a0| 6e 65 64 20 74 68 65 20 | 67 72 61 70 68 20 63 6c |ned the |graph cl|
|000004b0| 61 73 73 20 74 6f 20 62 | 65 20 72 65 61 73 6f 6e |ass to b|e reason|
|000004c0| 61 62 6c 79 20 73 69 6d | 70 6c 65 20 74 6f 20 75 |ably sim|ple to u|
|000004d0| 73 65 20 73 6f 20 49 0d | 0a 63 6f 75 6c 64 20 72 |se so I.|.could r|
|000004e0| 65 6d 65 6d 62 65 72 20 | 77 68 61 74 20 65 76 65 |emember |what eve|
|000004f0| 72 79 74 68 69 6e 67 20 | 6d 65 61 6e 74 2e 20 49 |rything |meant. I|
|00000500| 20 61 6c 73 6f 20 77 61 | 6e 74 65 64 20 73 6f 6d | also wa|nted som|
|00000510| 65 74 68 69 6e 67 0d 0a | 74 68 61 74 20 77 6f 75 |ething..|that wou|
|00000520| 6c 64 20 67 65 74 20 61 | 20 72 65 61 73 6f 6e 61 |ld get a| reasona|
|00000530| 62 6c 79 20 67 6f 6f 64 | 20 6c 6f 6f 6b 69 6e 67 |bly good| looking|
|00000540| 20 67 72 61 70 68 20 6f | 6e 20 74 68 65 20 73 63 | graph o|n the sc|
|00000550| 72 65 65 6e 0d 0a 77 69 | 74 68 20 61 62 6f 75 74 |reen..wi|th about|
|00000560| 20 35 20 6d 69 6e 75 74 | 65 73 20 6f 66 20 74 79 | 5 minut|es of ty|
|00000570| 70 69 6e 67 2e 20 54 68 | 65 20 63 6c 61 73 73 20 |ping. Th|e class |
|00000580| 64 65 66 69 6e 69 74 69 | 6f 6e 20 69 73 20 67 69 |definiti|on is gi|
|00000590| 76 65 6e 20 62 79 0d 0a | 0d 0a 5c 62 65 67 69 6e |ven by..|..\begin|
|000005a0| 7b 76 65 72 62 61 74 69 | 6d 7d 0d 0a 63 6c 61 73 |{verbati|m}..clas|
|000005b0| 73 20 47 4d 61 74 72 69 | 78 0d 0a 7b 0d 0a 20 20 |s GMatri|x..{.. |
|000005c0| 70 72 69 76 61 74 65 3a | 0d 0a 20 20 20 20 2f 2f |private:|.. //|
|000005d0| 20 42 6f 72 6c 61 6e 64 | 20 67 72 61 70 68 69 63 | Borland| graphic|
|000005e0| 73 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 2e 20 62 |s inform|ation. b|
|000005f0| 67 69 20 66 69 6c 65 73 | 20 6d 75 73 74 20 62 65 |gi files| must be|
|00000600| 20 61 76 61 69 6c 61 62 | 6c 65 0d 0a 20 20 20 20 | availab|le.. |
|00000610| 69 6e 74 20 20 20 20 47 | 72 61 70 68 44 72 69 76 |int G|raphDriv|
|00000620| 65 72 3b 0d 0a 20 20 20 | 20 69 6e 74 20 20 20 20 |er;.. | int |
|00000630| 47 72 61 70 68 4d 6f 64 | 65 3b 0d 0a 20 20 20 20 |GraphMod|e;.. |
|00000640| 69 6e 74 20 20 20 20 4d | 61 78 58 2c 20 4d 61 78 |int M|axX, Max|
|00000650| 59 3b 0d 0a 20 20 20 20 | 69 6e 74 20 20 20 20 4d |Y;.. |int M|
|00000660| 61 78 43 6f 6c 6f 72 73 | 3b 0d 0a 20 20 20 20 69 |axColors|;.. i|
|00000670| 6e 74 20 20 20 20 45 72 | 72 6f 72 43 6f 64 65 3b |nt Er|rorCode;|
|00000680| 0d 0a 20 20 20 20 73 74 | 72 75 63 74 20 6c 69 6e |.. st|ruct lin|
|00000690| 65 73 65 74 74 69 6e 67 | 73 74 79 70 65 20 6c 69 |esetting|stype li|
|000006a0| 6e 65 69 6e 66 6f 3b 0d | 0a 20 20 20 20 73 74 72 |neinfo;.|. str|
|000006b0| 75 63 74 20 76 69 65 77 | 70 6f 72 74 74 79 70 65 |uct view|porttype|
|000006c0| 20 76 69 65 77 69 6e 66 | 6f 3b 0d 0a 0d 0a 0d 0a | viewinf|o;......|
|000006d0| 20 20 20 20 2f 2f 20 72 | 65 66 65 72 65 6e 63 65 | // r|eference|
|000006e0| 20 6c 69 6e 65 73 2e 20 | 63 61 6e 20 68 61 76 65 | lines. |can have|
|000006f0| 20 61 74 20 6d 6f 73 74 | 20 32 30 20 72 65 66 65 | at most| 20 refe|
|00000700| 72 65 6e 63 65 20 6c 69 | 6e 65 73 0d 0a 20 20 20 |rence li|nes.. |
|00000710| 20 64 6f 75 62 6c 65 20 | 2a 68 72 65 66 73 3b 0d | double |*hrefs;.|
|00000720| 0a 20 20 20 20 64 6f 75 | 62 6c 65 20 2a 76 72 65 |. dou|ble *vre|
|00000730| 66 73 3b 0d 0a 20 20 20 | 20 69 6e 74 20 6e 76 72 |fs;.. | int nvr|
|00000740| 65 66 73 2c 20 6e 68 72 | 65 66 73 3b 0d 0a 0d 0a |efs, nhr|efs;....|
|00000750| 20 20 20 20 2f 2f 20 6f | 75 74 70 75 74 20 61 20 | // o|utput a |
|00000760| 6c 69 6e 65 2c 20 61 6e | 64 20 70 61 75 73 65 20 |line, an|d pause |
|00000770| 66 75 6e 63 74 69 6f 6e | 20 45 53 43 20 73 74 6f |function| ESC sto|
|00000780| 70 73 20 70 72 6f 67 72 | 61 6d 0d 0a 20 20 20 20 |ps progr|am.. |
|00000790| 69 6e 74 20 20 67 70 72 | 69 6e 74 66 28 69 6e 74 |int gpr|intf(int|
|000007a0| 20 2a 78 6c 6f 63 2c 20 | 69 6e 74 20 2a 79 6c 6f | *xloc, |int *ylo|
|000007b0| 63 2c 20 63 68 61 72 20 | 2a 66 6d 74 2c 20 2e 2e |c, char |*fmt, ..|
|000007c0| 2e 20 29 3b 0d 0a 20 20 | 20 20 76 6f 69 64 20 50 |. );.. | void P|
|000007d0| 61 75 73 65 28 29 3b 0d | 0a 0d 0a 20 20 20 20 2f |ause();.|... /|
|000007e0| 2f 20 67 72 61 70 68 20 | 69 73 20 73 74 6f 72 65 |/ graph |is store|
|000007f0| 64 20 69 6e 20 61 20 56 | 4d 61 74 72 69 78 3a 20 |d in a V|Matrix: |
|00000800| 5b 67 72 61 70 68 69 64 | 2c 20 73 79 6d 62 6f 6c |[graphid|, symbol|
|00000810| 2c 20 78 2c 20 79 5d 20 | 34 20 63 6f 6c 73 0d 0a |, x, y] |4 cols..|
|00000820| 20 20 20 20 69 6e 74 20 | 20 20 20 67 72 61 70 68 | int | graph|
|00000830| 6e 75 6d 3b 20 20 20 20 | 20 20 20 20 2f 2f 20 6e |num; | // n|
|00000840| 75 6d 62 65 72 20 6f 66 | 20 67 72 61 70 68 73 20 |umber of| graphs |
|00000850| 69 6e 20 67 72 66 3b 0d | 0a 20 20 20 20 56 4d 61 |in grf;.|. VMa|
|00000860| 74 72 69 78 20 2a 67 72 | 66 3b 0d 0a 0d 0a 20 20 |trix *gr|f;.... |
|00000870| 20 20 2f 2f 20 70 6c 6f | 74 20 61 20 70 6f 69 6e | // plo|t a poin|
|00000880| 74 20 6f 6e 20 74 68 65 | 20 73 63 72 65 65 6e 0d |t on the| screen.|
|00000890| 0a 20 20 20 20 76 6f 69 | 64 20 70 6c 6f 74 70 6f |. voi|d plotpo|
|000008a0| 69 6e 74 28 20 69 6e 74 | 20 69 78 2c 20 69 6e 74 |int( int| ix, int|
|000008b0| 20 69 79 2c 20 69 6e 74 | 20 73 79 6d 62 6f 6c 29 | iy, int| symbol)|
|000008c0| 3b 0d 0a 0d 0a 20 20 70 | 75 62 6c 69 63 3a 0d 0a |;.... p|ublic:..|
|000008d0| 0d 0a 20 20 20 20 2f 2f | 20 63 6f 6e 73 74 72 75 |.. //| constru|
|000008e0| 63 74 6f 72 73 20 61 6e | 64 20 64 65 73 74 72 75 |ctors an|d destru|
|000008f0| 63 74 6f 72 73 0d 0a 0d | 0a 20 20 20 20 47 4d 61 |ctors...|. GMa|
|00000900| 74 72 69 78 28 20 76 6f | 69 64 20 29 3b 0d 0a 20 |trix( vo|id );.. |
|00000910| 20 20 20 47 4d 61 74 72 | 69 78 28 20 56 4d 61 74 | GMatr|ix( VMat|
|00000920| 72 69 78 20 26 52 4f 70 | 2c 20 69 6e 74 20 73 79 |rix &ROp|, int sy|
|00000930| 6d 62 6f 6c 3d 20 2d 27 | 20 27 29 3b 20 2f 2f 20 |mbol= -'| '); // |
|00000940| 52 4f 70 20 73 68 6f 75 | 6c 64 20 62 65 20 72 78 |ROp shou|ld be rx|
|00000950| 32 20 6d 61 74 72 69 78 | 0d 0a 20 20 20 20 20 20 |2 matrix|.. |
|00000960| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000970| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000980| 20 20 20 20 20 20 20 20 | 2f 2f 20 63 6f 6c 75 6d | |// colum|
|00000990| 6e 20 31 20 69 73 20 78 | 2c 20 63 6f 6c 20 32 20 |n 1 is x|, col 2 |
|000009a0| 69 73 20 79 0d 0a 20 20 | 20 20 7e 47 4d 61 74 72 |is y.. | ~GMatr|
|000009b0| 69 78 28 20 76 6f 69 64 | 20 29 3b 0d 0a 0d 0a 20 |ix( void| );.... |
|000009c0| 20 20 20 2f 2f 20 64 69 | 73 70 6c 61 79 20 61 20 | // di|splay a |
|000009d0| 67 72 61 70 68 0d 0a 20 | 20 20 20 76 6f 69 64 20 |graph.. | void |
|000009e0| 53 68 6f 77 28 20 76 6f | 69 64 20 29 3b 0d 0a 0d |Show( vo|id );...|
|000009f0| 0a 20 20 20 20 2f 2f 20 | 61 64 64 20 61 20 6e 65 |. // |add a ne|
|00000a00| 77 20 76 65 63 74 6f 72 | 20 74 6f 20 70 6c 6f 74 |w vector| to plot|
|00000a10| 0d 0a 20 20 20 20 76 6f | 69 64 20 41 64 64 56 65 |.. vo|id AddVe|
|00000a20| 63 28 20 56 4d 61 74 72 | 69 78 20 26 52 4f 70 2c |c( VMatr|ix &ROp,|
|00000a30| 20 69 6e 74 20 73 79 6d | 62 6f 6c 20 3d 20 2d 27 | int sym|bol = -'|
|00000a40| 20 27 29 3b 0d 0a 0d 0a | 20 20 20 20 2f 2f 20 61 | ');....| // a|
|00000a50| 6e 6e 6f 74 61 74 69 6f | 6e 20 6f 70 74 69 6f 6e |nnotatio|n option|
|00000a60| 73 0d 0a 0d 0a 20 20 20 | 20 73 74 72 74 79 70 65 |s.... | strtype|
|00000a70| 20 2a 74 69 74 6c 65 2c | 20 2a 74 69 74 6c 65 32 | *title,| *title2|
|00000a80| 2c 20 2a 78 6e 61 6d 65 | 2c 20 2a 79 6e 61 6d 65 |, *xname|, *yname|
|00000a90| 2c 20 2a 50 61 74 68 54 | 6f 44 72 69 76 65 72 3b |, *PathT|oDriver;|
|00000aa0| 0d 0a 20 20 20 20 62 6f | 6f 6c 65 61 6e 20 52 65 |.. bo|olean Re|
|00000ab0| 63 74 61 6e 67 6c 65 4f | 6e 2c 20 59 47 72 69 64 |ctangleO|n, YGrid|
|00000ac0| 4f 6e 2c 20 58 47 72 69 | 64 4f 6e 3b 0d 0a 20 20 |On, XGri|dOn;.. |
|00000ad0| 20 20 76 6f 69 64 20 48 | 72 65 66 28 20 64 6f 75 | void H|ref( dou|
|00000ae0| 62 6c 65 20 68 72 65 66 | 20 29 3b 0d 0a 20 20 20 |ble href| );.. |
|00000af0| 20 76 6f 69 64 20 56 72 | 65 66 28 20 64 6f 75 62 | void Vr|ef( doub|
|00000b00| 6c 65 20 76 72 65 66 20 | 29 3b 0d 0a 20 20 20 20 |le vref |);.. |
|00000b10| 69 6e 74 20 43 6c 65 61 | 72 48 72 65 66 28 20 76 |int Clea|rHref( v|
|00000b20| 6f 69 64 20 29 7b 20 69 | 6e 74 20 74 3d 6e 68 72 |oid ){ i|nt t=nhr|
|00000b30| 65 66 73 3b 20 6e 68 72 | 65 66 73 20 3d 20 2d 31 |efs; nhr|efs = -1|
|00000b40| 3b 20 72 65 74 75 72 6e | 20 74 3b 7d 0d 0a 20 20 |; return| t;}.. |
|00000b50| 20 20 69 6e 74 20 43 6c | 65 61 72 56 72 65 66 28 | int Cl|earVref(|
|00000b60| 20 76 6f 69 64 20 29 7b | 20 69 6e 74 20 74 3d 6e | void ){| int t=n|
|00000b70| 76 72 65 66 73 3b 20 6e | 76 72 65 66 73 20 3d 20 |vrefs; n|vrefs = |
|00000b80| 2d 31 3b 20 72 65 74 75 | 72 6e 20 74 3b 7d 0d 0a |-1; retu|rn t;}..|
|00000b90| 0d 0a 20 20 20 20 2f 2f | 20 73 61 76 65 20 74 68 |.. //| save th|
|00000ba0| 65 20 67 72 66 20 6d 61 | 74 72 69 78 0d 0a 20 20 |e grf ma|trix.. |
|00000bb0| 20 20 76 6f 69 64 20 53 | 61 76 65 47 72 61 70 68 | void S|aveGraph|
|00000bc0| 28 20 63 68 61 72 20 2a | 66 69 64 20 29 20 7b 20 |( char *|fid ) { |
|00000bd0| 57 72 69 74 65 61 28 20 | 66 69 64 2c 20 2a 67 72 |Writea( |fid, *gr|
|00000be0| 66 20 29 3b 20 7d 0d 0a | 7d 3b 0d 0a 5c 65 6e 64 |f ); }..|};..\end|
|00000bf0| 7b 76 65 72 62 61 74 69 | 6d 7d 0d 0a 0d 0a 54 68 |{verbati|m}....Th|
|00000c00| 65 20 67 72 61 70 68 69 | 63 73 20 63 6c 61 73 73 |e graphi|cs class|
|00000c10| 20 69 73 20 6e 6f 74 20 | 61 75 74 6f 6d 61 74 69 | is not |automati|
|00000c20| 63 61 6c 6c 79 20 69 6e | 63 6c 75 64 65 64 20 69 |cally in|cluded i|
|00000c30| 6e 20 79 6f 75 72 20 70 | 72 6f 6a 65 63 74 0d 0a |n your p|roject..|
|00000c40| 73 69 6e 63 65 20 69 74 | 20 69 73 20 6d 61 63 68 |since it| is mach|
|00000c50| 69 6e 65 2d 63 6f 6d 70 | 69 6c 65 72 20 73 70 65 |ine-comp|iler spe|
|00000c60| 63 69 66 69 63 2e 20 54 | 6f 20 67 61 69 6e 20 61 |cific. T|o gain a|
|00000c70| 63 63 65 73 73 20 74 6f | 20 74 68 65 0d 0a 63 6c |ccess to| the..cl|
|00000c80| 61 73 73 20 79 6f 75 20 | 6d 75 73 74 20 64 65 66 |ass you |must def|
|00000c90| 69 6e 65 20 74 68 65 20 | 67 6c 6f 62 61 6c 20 73 |ine the |global s|
|00000ca0| 79 6d 62 6f 6c 20 5c 76 | 65 72 62 2b 56 49 52 54 |ymbol \v|erb+VIRT|
|00000cb0| 47 52 41 46 2b 2e 20 54 | 68 69 73 0d 0a 63 61 6e |GRAF+. T|his..can|
|00000cc0| 20 62 65 20 64 6f 6e 65 | 20 69 6e 20 74 68 65 20 | be done| in the |
|00000cd0| 63 6f 6d 70 69 6c 65 72 | 20 6f 70 74 69 6f 6e 73 |compiler| options|
|00000ce0| 20 6f 66 20 74 68 65 20 | 49 44 45 2c 20 6f 72 20 | of the |IDE, or |
|00000cf0| 77 69 74 68 20 61 0d 0a | 5c 76 65 72 62 2b 2d 44 |with a..|\verb+-D|
|00000d00| 56 49 52 54 47 52 41 46 | 2b 20 5c 69 6e 64 65 78 |VIRTGRAF|+ \index|
|00000d10| 7b 47 4d 61 74 72 69 78 | 21 56 49 52 54 47 52 41 |{GMatrix|!VIRTGRA|
|00000d20| 46 7d 20 69 6e 20 74 68 | 65 20 63 6f 6d 6d 61 6e |F} in th|e comman|
|00000d30| 64 20 6c 69 6e 65 20 0d | 0a 63 6f 6d 70 69 6c 65 |d line .|.compile|
|00000d40| 72 2e 20 54 68 69 73 20 | 73 65 74 73 20 61 20 73 |r. This |sets a s|
|00000d50| 77 69 74 63 68 20 69 6e | 20 5c 76 65 72 62 2b 56 |witch in| \verb+V|
|00000d60| 49 52 54 2e 48 2b 20 74 | 6f 20 69 6e 63 6c 75 64 |IRT.H+ t|o includ|
|00000d70| 65 20 74 68 65 0d 0a 47 | 4d 61 74 72 69 78 20 63 |e the..G|Matrix c|
|00000d80| 6c 61 73 73 20 64 65 66 | 69 6e 69 74 69 6f 6e 2e |lass def|inition.|
|00000d90| 20 20 59 6f 75 20 6d 75 | 73 74 20 61 6c 73 6f 20 | You mu|st also |
|00000da0| 6d 61 6b 65 20 56 49 52 | 54 47 52 41 46 2e 43 50 |make VIR|TGRAF.CP|
|00000db0| 50 20 70 61 72 74 0d 0a | 6f 66 20 79 6f 75 72 20 |P part..|of your |
|00000dc0| 70 72 6f 6a 65 63 74 2e | 0d 0a 0d 0a 54 68 65 20 |project.|....The |
|00000dd0| 73 74 72 74 79 70 65 20 | 70 6f 69 6e 74 65 72 20 |strtype |pointer |
|00000de0| 5c 76 65 72 62 2b 50 61 | 74 68 54 6f 44 72 69 76 |\verb+Pa|thToDriv|
|00000df0| 65 72 2b 0d 0a 5c 69 6e | 64 65 78 7b 47 4d 61 74 |er+..\in|dex{GMat|
|00000e00| 72 69 78 21 50 61 74 68 | 54 6f 44 72 69 76 65 72 |rix!Path|ToDriver|
|00000e10| 7d 20 63 6f 6e 74 61 69 | 6e 73 20 74 68 65 20 70 |} contai|ns the p|
|00000e20| 61 74 68 20 74 6f 20 74 | 68 65 0d 0a 42 47 49 20 |ath to t|he..BGI |
|00000e30| 64 72 69 76 65 72 73 2e | 20 59 6f 75 20 74 65 6c |drivers.| You tel|
|00000e40| 6c 20 79 6f 75 72 20 70 | 72 6f 67 72 61 6d 20 77 |l your p|rogram w|
|00000e50| 68 65 72 65 20 74 68 65 | 20 42 47 49 20 66 69 6c |here the| BGI fil|
|00000e60| 65 73 20 61 72 65 20 62 | 79 20 61 0d 0a 63 6f 6d |es are b|y a..com|
|00000e70| 6d 61 6e 64 20 73 75 63 | 68 20 61 73 20 5c 76 65 |mand suc|h as \ve|
|00000e80| 72 62 2b 2a 50 61 74 68 | 54 6f 44 72 69 76 65 72 |rb+*Path|ToDriver|
|00000e90| 20 3d 20 22 63 3a 5c 5c | 74 63 5c 5c 62 67 69 22 | = "c:\\|tc\\bgi"|
|00000ea0| 2b 2e 20 54 68 65 72 65 | 20 61 72 65 0d 0a 74 77 |+. There| are..tw|
|00000eb0| 6f 20 74 68 69 6e 67 73 | 20 74 6f 20 6e 6f 74 65 |o things| to note|
|00000ec0| 20 68 65 72 65 2e 20 46 | 69 72 73 74 2c 20 50 61 | here. F|irst, Pa|
|00000ed0| 74 68 54 6f 44 72 69 76 | 65 72 20 69 73 20 61 20 |thToDriv|er is a |
|00000ee0| 70 6f 69 6e 74 65 72 2c | 20 73 6f 0d 0a 79 6f 75 |pointer,| so..you|
|00000ef0| 20 6d 75 73 74 20 75 73 | 65 20 61 20 27 2a 27 20 | must us|e a '*' |
|00000f00| 69 6e 20 66 72 6f 6e 74 | 20 6f 66 20 69 74 20 74 |in front| of it t|
|00000f10| 6f 20 73 74 6f 72 65 20 | 61 20 76 61 6c 75 65 20 |o store |a value |
|00000f20| 69 6e 20 69 74 2e 0d 0a | 53 65 63 6f 6e 64 6c 79 |in it...|Secondly|
|00000f30| 2c 20 6e 6f 74 65 20 74 | 68 65 20 64 6f 75 62 6c |, note t|he doubl|
|00000f40| 65 20 73 6c 61 73 68 65 | 73 20 61 72 65 20 72 65 |e slashe|s are re|
|00000f50| 71 75 69 72 65 64 20 66 | 6f 72 20 74 68 65 20 42 |quired f|or the B|
|00000f60| 47 49 0d 0a 61 75 74 6f | 64 65 74 65 63 74 69 6f |GI..auto|detectio|
|00000f70| 6e 20 66 75 6e 63 74 69 | 6f 6e 2e 20 0d 0a 0d 0a |n functi|on. ....|
|00000f80| 5c 73 75 62 73 65 63 74 | 69 6f 6e 7b 54 68 65 20 |\subsect|ion{The |
|00000f90| 50 72 69 76 61 74 65 20 | 70 61 72 74 73 20 6f 66 |Private |parts of|
|00000fa0| 20 47 4d 61 74 72 69 78 | 7d 0d 0a 0d 0a 54 68 65 | GMatrix|}....The|
|00000fb0| 20 66 69 72 73 74 20 38 | 20 76 61 72 69 61 62 6c | first 8| variabl|
|00000fc0| 65 73 20 61 72 65 20 66 | 72 6f 6d 20 74 68 65 20 |es are f|rom the |
|00000fd0| 42 47 49 0d 0a 66 75 6e | 63 74 69 6f 6e 73 2e 20 |BGI..fun|ctions. |
|00000fe0| 47 72 61 70 68 44 72 69 | 76 65 72 20 61 6e 64 20 |GraphDri|ver and |
|00000ff0| 47 72 61 70 68 4d 6f 64 | 65 20 5c 69 6e 64 65 78 |GraphMod|e \index|
|00001000| 7b 47 4d 61 74 72 69 78 | 21 47 72 61 70 68 44 72 |{GMatrix|!GraphDr|
|00001010| 69 76 65 72 2c 0d 0a 47 | 72 61 70 68 4d 6f 64 65 |iver,..G|raphMode|
|00001020| 7d 20 61 72 65 20 63 6f | 64 65 73 20 66 6f 72 20 |} are co|des for |
|00001030| 74 68 65 20 68 69 67 68 | 65 73 74 20 72 65 73 6f |the high|est reso|
|00001040| 6c 75 74 69 6f 6e 20 73 | 63 72 65 65 6e 20 61 76 |lution s|creen av|
|00001050| 61 69 6c 61 62 6c 65 0d | 0a 6f 6e 20 74 68 65 20 |ailable.|.on the |
|00001060| 6d 61 63 68 69 6e 65 2e | 20 4d 61 78 58 20 61 6e |machine.| MaxX an|
|00001070| 64 20 4d 61 78 59 20 5c | 69 6e 64 65 78 7b 47 4d |d MaxY \|index{GM|
|00001080| 61 74 72 69 78 21 4d 61 | 78 58 2c 20 4d 61 78 59 |atrix!Ma|xX, MaxY|
|00001090| 7d 20 69 73 20 74 68 65 | 0d 0a 6e 75 6d 62 65 72 |} is the|..number|
|000010a0| 20 6f 66 20 70 69 78 65 | 6c 73 20 69 6e 20 74 68 | of pixe|ls in th|
|000010b0| 65 20 78 20 61 6e 64 20 | 79 20 61 78 65 73 2e 20 |e x and |y axes. |
|000010c0| 4d 61 78 43 6f 6c 6f 72 | 73 0d 0a 5c 69 6e 64 65 |MaxColor|s..\inde|
|000010d0| 78 7b 47 4d 61 74 72 69 | 78 21 4d 61 78 43 6f 6c |x{GMatri|x!MaxCol|
|000010e0| 6f 72 73 7d 20 69 73 20 | 74 68 65 20 6d 61 78 69 |ors} is |the maxi|
|000010f0| 6d 75 6d 20 6e 75 6d 62 | 65 72 20 6f 66 20 63 6f |mum numb|er of co|
|00001100| 6c 6f 72 73 20 69 6e 20 | 74 68 65 0d 0a 64 69 73 |lors in |the..dis|
|00001110| 70 6c 61 79 2e 20 4d 6f | 73 74 20 6f 66 20 74 68 |play. Mo|st of th|
|00001120| 69 73 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 69 |is infor|mation i|
|00001130| 73 20 61 76 61 69 6c 61 | 62 6c 65 20 69 6e 20 74 |s availa|ble in t|
|00001140| 68 65 20 73 74 72 75 63 | 74 75 72 65 73 0d 0a 6d |he struc|tures..m|
|00001150| 61 69 6e 74 61 69 6e 65 | 64 20 62 79 20 74 68 65 |aintaine|d by the|
|00001160| 20 42 47 49 20 61 6e 64 | 20 74 68 65 20 61 75 74 | BGI and| the aut|
|00001170| 6f 64 65 74 65 63 74 69 | 6f 6e 20 66 75 6e 63 74 |odetecti|on funct|
|00001180| 69 6f 6e 73 2e 20 54 68 | 65 0d 0a 73 74 72 75 63 |ions. Th|e..struc|
|00001190| 74 75 72 65 20 5c 76 65 | 72 62 2b 76 69 65 77 69 |ture \ve|rb+viewi|
|000011a0| 6e 66 6f 2b 20 5c 69 6e | 64 65 78 7b 47 4d 61 74 |nfo+ \in|dex{GMat|
|000011b0| 72 69 78 21 76 69 65 77 | 69 6e 66 6f 7d 20 63 6f |rix!view|info} co|
|000011c0| 6e 74 61 69 6e 73 20 6d | 6f 73 74 0d 0a 6f 66 20 |ntains m|ost..of |
|000011d0| 74 68 69 73 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |this inf|ormation|
|000011e0| 20 61 66 74 65 72 20 61 | 20 63 61 6c 6c 20 74 6f | after a| call to|
|000011f0| 20 74 68 65 20 42 47 49 | 20 66 75 6e 63 74 69 6f | the BGI| functio|
|00001200| 6e 0d 0a 5c 76 65 72 62 | 2b 64 65 74 65 63 74 2b |n..\verb|+detect+|
|00001210| 2e 20 54 68 65 20 73 74 | 72 75 63 74 75 72 65 20 |. The st|ructure |
|00001220| 5c 76 65 72 62 2b 6c 69 | 6e 65 69 6e 66 6f 2b 20 |\verb+li|neinfo+ |
|00001230| 63 6f 6e 74 61 69 6e 73 | 20 61 20 0d 0a 64 69 73 |contains| a ..dis|
|00001240| 63 72 69 70 74 69 6f 6e | 20 6f 66 20 74 68 65 20 |cription| of the |
|00001250| 6c 69 6e 65 20 74 79 70 | 65 73 20 61 6e 64 20 74 |line typ|es and t|
|00001260| 68 69 63 6b 6e 65 73 73 | 65 73 2e 20 43 6f 6e 73 |hickness|es. Cons|
|00001270| 75 6c 74 20 74 68 65 0d | 0a 42 6f 72 6c 61 6e 64 |ult the.|.Borland|
|00001280| 20 6c 69 62 72 61 72 79 | 20 72 65 66 65 72 65 6e | library| referen|
|00001290| 63 65 20 6d 61 6e 75 61 | 6c 73 20 61 62 6f 75 74 |ce manua|ls about|
|000012a0| 20 74 68 65 73 65 20 76 | 61 72 69 61 62 6c 65 73 | these v|ariables|
|000012b0| 2e 0d 0a 0d 0a 54 77 6f | 20 76 65 63 74 6f 72 73 |.....Two| vectors|
|000012c0| 20 5c 76 65 72 62 2b 68 | 72 65 66 73 2b 20 61 6e | \verb+h|refs+ an|
|000012d0| 64 20 5c 76 65 72 62 2b | 76 72 65 66 73 2b 20 5c |d \verb+|vrefs+ \|
|000012e0| 69 6e 64 65 78 7b 47 4d | 61 74 72 69 78 21 68 72 |index{GM|atrix!hr|
|000012f0| 65 66 73 2c 0d 0a 76 72 | 65 66 73 7d 20 63 6f 6e |efs,..vr|efs} con|
|00001300| 74 61 69 6e 20 74 68 65 | 20 6c 6f 63 61 74 69 6f |tain the| locatio|
|00001310| 6e 73 20 6f 66 20 68 6f | 72 69 7a 6f 6e 74 61 6c |ns of ho|rizontal|
|00001320| 20 61 6e 64 20 76 65 72 | 74 69 63 61 6c 0d 0a 72 | and ver|tical..r|
|00001330| 65 66 65 72 65 6e 63 65 | 20 6c 69 6e 65 73 2e 20 |eference| lines. |
|00001340| 54 68 65 20 75 73 65 72 | 20 63 61 6e 20 73 70 65 |The user| can spe|
|00001350| 63 69 66 79 20 61 74 20 | 6d 6f 73 74 20 32 30 20 |cify at |most 20 |
|00001360| 68 6f 72 69 7a 6f 6e 74 | 61 6c 20 61 6e 64 0d 0a |horizont|al and..|
|00001370| 32 30 20 76 65 72 74 69 | 63 61 6c 20 72 65 66 65 |20 verti|cal refe|
|00001380| 72 65 6e 63 65 20 6c 69 | 6e 65 73 2e 20 54 68 65 |rence li|nes. The|
|00001390| 20 6d 65 6d 62 65 72 73 | 20 61 72 65 20 73 74 6f | members| are sto|
|000013a0| 72 65 64 20 69 6e 20 61 | 0d 0a 63 69 72 63 75 6c |red in a|..circul|
|000013b0| 61 72 20 66 61 73 68 69 | 6f 6e 3a 20 74 68 65 20 |ar fashi|on: the |
|000013c0| 32 31 27 73 74 20 72 65 | 66 65 72 65 6e 63 65 20 |21'st re|ference |
|000013d0| 6c 69 6e 65 20 6f 76 65 | 72 77 72 69 74 65 73 20 |line ove|rwrites |
|000013e0| 74 68 65 20 31 27 73 74 | 0d 0a 72 65 66 65 72 65 |the 1'st|..refere|
|000013f0| 6e 63 65 20 6c 69 6e 65 | 2e 20 54 68 65 20 76 61 |nce line|. The va|
|00001400| 72 69 61 62 6c 65 73 20 | 5c 76 65 72 62 2b 6e 76 |riables |\verb+nv|
|00001410| 72 65 66 73 2b 20 61 6e | 64 20 5c 76 65 72 62 2b |refs+ an|d \verb+|
|00001420| 6e 68 72 65 66 73 2b 0d | 0a 5c 69 6e 64 65 78 7b |nhrefs+.|.\index{|
|00001430| 47 4d 61 74 72 69 78 21 | 6e 76 72 65 66 73 2c 20 |GMatrix!|nvrefs, |
|00001440| 6e 68 72 65 66 73 7d 20 | 63 6f 75 6e 74 20 68 6f |nhrefs} |count ho|
|00001450| 77 20 6d 61 6e 79 20 72 | 65 66 65 72 65 6e 63 65 |w many r|eference|
|00001460| 20 6c 69 6e 65 73 0d 0a | 68 61 76 65 20 62 65 65 | lines..|have bee|
|00001470| 6e 20 64 65 63 6c 61 72 | 65 64 2e 20 54 68 65 20 |n declar|ed. The |
|00001480| 6e 75 6d 62 65 72 20 6f | 66 20 68 6f 72 69 7a 6f |number o|f horizo|
|00001490| 6e 74 61 6c 20 6c 69 6e | 65 73 20 74 68 61 74 20 |ntal lin|es that |
|000014a0| 77 69 6c 6c 20 62 65 20 | 64 69 73 70 6c 61 79 65 |will be |displaye|
|000014b0| 64 0d 0a 77 69 6c 6c 20 | 62 65 20 32 30 20 69 66 |d..will |be 20 if|
|000014c0| 20 5c 76 65 72 62 2b 6e | 68 72 65 66 73 2b 20 69 | \verb+n|hrefs+ i|
|000014d0| 73 20 32 30 20 6f 72 20 | 6d 6f 72 65 2e 20 4f 6e |s 20 or |more. On|
|000014e0| 6c 79 20 74 68 65 20 32 | 30 20 6d 6f 73 74 0d 0a |ly the 2|0 most..|
|000014f0| 72 65 63 65 6e 74 6c 79 | 20 64 65 63 6c 61 72 65 |recently| declare|
|00001500| 64 20 6c 69 6e 65 73 20 | 77 69 6c 6c 20 62 65 20 |d lines |will be |
|00001510| 64 69 73 70 6c 61 79 65 | 64 2e 0d 0a 0d 0a 54 68 |displaye|d.....Th|
|00001520| 65 20 6e 65 78 74 20 74 | 77 6f 20 66 75 6e 63 74 |e next t|wo funct|
|00001530| 69 6f 6e 73 20 63 6f 6e | 74 72 6f 6c 20 74 68 65 |ions con|trol the|
|00001540| 20 6f 75 74 70 75 74 2e | 20 5c 76 65 72 62 2b 50 | output.| \verb+P|
|00001550| 61 75 73 65 28 29 2b 0d | 0a 5c 69 6e 64 65 78 7b |ause()+.|.\index{|
|00001560| 47 4d 61 74 72 69 78 21 | 50 61 75 73 65 28 29 7d |GMatrix!|Pause()}|
|00001570| 20 61 6c 6c 6f 77 73 20 | 74 68 65 20 67 72 61 70 | allows |the grap|
|00001580| 68 20 74 6f 20 62 65 20 | 64 69 73 70 6c 61 79 65 |h to be |displaye|
|00001590| 64 20 75 6e 74 69 6c 20 | 61 0d 0a 6b 65 79 20 69 |d until |a..key i|
|000015a0| 73 20 70 72 65 73 73 65 | 64 2e 20 49 74 20 77 69 |s presse|d. It wi|
|000015b0| 6c 6c 20 61 6c 73 6f 20 | 74 65 72 6d 69 6e 61 74 |ll also |terminat|
|000015c0| 65 20 74 68 65 20 70 72 | 6f 67 72 61 6d 20 69 66 |e the pr|ogram if|
|000015d0| 20 79 6f 75 20 70 72 65 | 73 73 0d 0a 74 68 65 20 | you pre|ss..the |
|000015e0| 45 53 43 20 6b 65 79 2e | 20 5c 76 65 72 62 2b 67 |ESC key.| \verb+g|
|000015f0| 70 72 69 6e 74 66 28 29 | 2b 20 5c 69 6e 64 65 78 |printf()|+ \index|
|00001600| 7b 47 4d 61 74 72 69 78 | 21 67 70 72 69 6e 74 66 |{GMatrix|!gprintf|
|00001610| 28 29 7d 20 69 73 0d 0a | 73 69 6d 69 6c 61 72 20 |()} is..|similar |
|00001620| 74 6f 20 70 72 69 6e 74 | 66 28 29 20 69 6e 20 43 |to print|f() in C|
|00001630| 2e 20 54 68 65 20 66 69 | 72 73 74 20 74 77 6f 20 |. The fi|rst two |
|00001640| 61 72 67 75 6d 65 6e 74 | 73 20 61 72 65 20 74 68 |argument|s are th|
|00001650| 65 0d 0a 6c 6f 63 61 74 | 69 6f 6e 73 20 6f 66 20 |e..locat|ions of |
|00001660| 6f 75 74 70 75 74 20 72 | 65 6c 61 74 69 76 65 20 |output r|elative |
|00001670| 74 6f 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 76 |to the c|urrent v|
|00001680| 69 65 77 70 6f 72 74 2e | 20 54 68 65 0d 0a 76 61 |iewport.| The..va|
|00001690| 72 69 61 62 6c 65 20 61 | 72 67 75 6d 65 6e 74 20 |riable a|rgument |
|000016a0| 6c 69 73 74 20 63 6f 6e | 74 61 69 6e 73 20 61 20 |list con|tains a |
|000016b0| 66 6f 72 6d 61 74 20 73 | 74 72 69 6e 67 20 66 6f |format s|tring fo|
|000016c0| 72 20 6f 75 74 70 75 74 | 2c 20 61 6e 64 20 61 20 |r output|, and a |
|000016d0| 6c 69 73 74 0d 0a 6f 66 | 20 76 61 72 69 61 62 6c |list..of| variabl|
|000016e0| 65 73 2e 20 54 68 69 73 | 20 66 75 6e 63 74 69 6f |es. This| functio|
|000016f0| 6e 20 63 61 6c 6c 73 20 | 73 70 72 69 6e 74 66 28 |n calls |sprintf(|
|00001700| 29 20 74 6f 20 63 72 65 | 61 74 65 20 74 68 65 20 |) to cre|ate the |
|00001710| 73 74 72 69 6e 67 0d 0a | 69 6e 20 31 34 30 20 63 |string..|in 140 c|
|00001720| 68 61 72 61 63 74 65 72 | 20 62 75 66 66 65 72 2e |haracter| buffer.|
|00001730| 20 54 68 69 73 20 69 73 | 20 64 61 6e 67 65 72 6f | This is| dangero|
|00001740| 75 73 20 69 66 20 79 6f | 75 20 70 75 74 0d 0a 6d |us if yo|u put..m|
|00001750| 6f 72 65 20 74 68 61 6e | 20 31 34 30 20 63 68 61 |ore than| 140 cha|
|00001760| 72 61 63 74 65 72 73 20 | 66 6f 72 20 6f 75 74 70 |racters |for outp|
|00001770| 75 74 20 73 69 6e 63 65 | 20 79 6f 75 20 77 69 6c |ut since| you wil|
|00001780| 6c 20 6f 76 65 72 77 72 | 69 74 65 0d 0a 6d 65 6d |l overwr|ite..mem|
|00001790| 6f 72 79 20 69 6e 20 74 | 68 73 20 73 70 72 69 6e |ory in t|hs sprin|
|000017a0| 74 66 28 29 20 63 61 6c | 6c 2e 20 0d 0a 0d 0a 54 |tf() cal|l. ....T|
|000017b0| 68 65 20 64 61 74 61 20 | 69 73 20 73 74 6f 72 65 |he data |is store|
|000017c0| 64 20 69 6e 20 74 68 65 | 20 76 69 72 74 75 61 6c |d in the| virtual|
|000017d0| 20 6d 61 74 72 69 78 20 | 5c 76 65 72 62 2b 67 72 | matrix |\verb+gr|
|000017e0| 66 2b 0d 0a 5c 69 6e 64 | 65 78 7b 47 4d 61 74 72 |f+..\ind|ex{GMatr|
|000017f0| 69 78 21 67 72 66 7d 2e | 20 54 68 65 20 64 61 74 |ix!grf}.| The dat|
|00001800| 61 20 6d 61 74 72 69 78 | 20 68 61 73 20 34 20 63 |a matrix| has 4 c|
|00001810| 6f 6c 75 6d 6e 73 2e 20 | 54 68 65 20 66 69 72 73 |olumns. |The firs|
|00001820| 74 20 69 73 0d 0a 74 68 | 65 20 67 72 61 70 68 20 |t is..th|e graph |
|00001830| 6e 75 6d 62 65 72 2c 20 | 74 68 65 20 73 65 63 6f |number, |the seco|
|00001840| 6e 64 20 69 73 20 74 68 | 65 20 73 79 6d 62 6f 6c |nd is th|e symbol|
|00001850| 20 74 6f 20 62 65 20 75 | 73 65 64 20 66 6f 72 0d | to be u|sed for.|
|00001860| 0a 64 69 73 70 6c 61 79 | 69 6e 67 20 74 68 65 20 |.display|ing the |
|00001870| 67 72 61 70 68 2c 20 74 | 68 65 20 74 68 69 72 64 |graph, t|he third|
|00001880| 20 69 73 20 74 68 65 20 | 64 61 74 61 20 66 6f 72 | is the |data for|
|00001890| 20 74 68 65 20 78 20 61 | 78 69 73 2c 20 61 6e 64 | the x a|xis, and|
|000018a0| 0d 0a 74 68 65 20 66 6f | 75 72 74 68 20 69 73 20 |..the fo|urth is |
|000018b0| 74 68 65 20 64 61 74 61 | 20 66 6f 72 20 74 68 65 |the data| for the|
|000018c0| 20 79 2d 61 78 69 73 2e | 20 20 59 6f 75 20 63 61 | y-axis.| You ca|
|000018d0| 6e 20 68 61 76 65 20 61 | 73 20 6d 61 6e 79 0d 0a |n have a|s many..|
|000018e0| 67 72 61 70 68 73 20 73 | 74 6f 72 65 64 20 69 6e |graphs s|tored in|
|000018f0| 20 67 72 66 20 61 73 20 | 79 6f 75 20 77 61 6e 74 | grf as |you want|
|00001900| 2e 20 54 68 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 |. The nu|mber of |
|00001910| 67 72 61 70 68 73 20 69 | 73 20 73 74 6f 72 65 64 |graphs i|s stored|
|00001920| 0d 0a 69 6e 20 74 68 65 | 20 76 61 72 69 61 62 6c |..in the| variabl|
|00001930| 65 20 5c 76 65 72 62 2b | 67 72 66 6e 75 6d 2b 2e |e \verb+|grfnum+.|
|00001940| 5c 69 6e 64 65 78 7b 47 | 4d 61 74 72 69 78 21 67 |\index{G|Matrix!g|
|00001950| 72 66 6e 75 6d 7d 20 59 | 6f 75 20 61 64 64 0d 0a |rfnum} Y|ou add..|
|00001960| 74 68 65 6d 20 62 79 20 | 63 6f 6e 63 61 74 65 6e |them by |concaten|
|00001970| 61 74 69 6e 67 20 74 68 | 65 20 67 72 61 70 68 73 |ating th|e graphs|
|00001980| 20 76 65 72 74 69 63 61 | 6c 6c 79 2e 20 54 68 65 | vertica|lly. The|
|00001990| 72 65 20 69 73 20 61 20 | 70 75 62 6c 69 63 0d 0a |re is a |public..|
|000019a0| 6d 65 6d 62 65 72 20 66 | 75 6e 63 74 69 6f 6e 20 |member f|unction |
|000019b0| 66 6f 72 20 74 68 69 73 | 2e 20 54 68 65 20 64 61 |for this|. The da|
|000019c0| 74 61 20 66 6f 72 20 74 | 68 65 20 67 72 61 70 68 |ta for t|he graph|
|000019d0| 20 69 73 20 73 75 70 70 | 6c 69 65 64 20 69 6e 0d | is supp|lied in.|
|000019e0| 0a 61 20 6b 78 32 20 6d | 61 74 72 69 78 20 77 68 |.a kx2 m|atrix wh|
|000019f0| 65 72 65 20 74 68 65 20 | 66 69 72 73 74 20 63 6f |ere the |first co|
|00001a00| 6c 75 6d 6e 20 69 73 20 | 74 68 65 20 78 20 64 61 |lumn is |the x da|
|00001a10| 74 61 20 61 6e 64 20 74 | 68 65 20 73 65 63 6f 6e |ta and t|he secon|
|00001a20| 64 0d 0a 69 73 20 74 68 | 65 20 79 20 64 61 74 61 |d..is th|e y data|
|00001a30| 2e 20 54 68 65 20 73 79 | 6d 62 6f 6c 73 20 61 6e |. The sy|mbols an|
|00001a40| 64 20 67 72 61 70 68 20 | 63 6f 75 6e 74 73 20 61 |d graph |counts a|
|00001a50| 72 65 20 6d 61 69 6e 74 | 61 6e 65 64 0d 0a 61 75 |re maint|aned..au|
|00001a60| 74 6f 6d 61 74 69 63 61 | 6c 6c 79 2e 0d 0a 0d 0a |tomatica|lly.....|
|00001a70| 54 68 65 20 6c 61 73 74 | 20 66 75 6e 63 74 69 6f |The last| functio|
|00001a80| 6e 20 5c 76 65 72 62 2b | 70 6c 6f 74 70 6f 69 6e |n \verb+|plotpoin|
|00001a90| 74 28 29 2b 20 5c 69 6e | 64 65 78 7b 47 4d 61 74 |t()+ \in|dex{GMat|
|00001aa0| 72 69 78 21 70 6c 6f 74 | 70 6f 69 6e 74 28 29 7d |rix!plot|point()}|
|00001ab0| 0d 0a 70 75 74 73 20 61 | 20 73 79 6d 62 6f 6c 20 |..puts a| symbol |
|00001ac0| 61 74 20 70 6f 69 6e 74 | 20 5c 76 65 72 62 2b 28 |at point| \verb+(|
|00001ad0| 69 78 2c 69 79 29 2b 20 | 72 65 6c 61 74 69 76 65 |ix,iy)+ |relative|
|00001ae0| 20 74 6f 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | to the |current |
|00001af0| 76 69 65 77 70 6f 72 74 | 2e 20 0d 0a 0d 0a 5c 73 |viewport|. ....\s|
|00001b00| 75 62 73 65 63 74 69 6f | 6e 7b 54 68 65 20 50 75 |ubsectio|n{The Pu|
|00001b10| 62 6c 69 63 20 50 61 72 | 74 20 6f 66 20 47 4d 61 |blic Par|t of GMa|
|00001b20| 74 72 69 78 7d 0d 0a 0d | 0a 54 68 65 72 65 20 61 |trix}...|.There a|
|00001b30| 72 65 20 74 77 6f 20 63 | 6f 6e 73 74 72 75 63 74 |re two c|onstruct|
|00001b40| 6f 72 73 20 66 6f 72 20 | 74 68 65 20 47 4d 61 74 |ors for |the GMat|
|00001b50| 72 69 78 0d 0a 63 6c 61 | 73 73 5c 69 6e 64 65 78 |rix..cla|ss\index|
|00001b60| 7b 47 4d 61 74 72 69 78 | 21 63 6f 6e 73 74 72 75 |{GMatrix|!constru|
|00001b70| 63 74 6f 72 73 7d 2e 20 | 54 68 65 20 66 69 72 73 |ctors}. |The firs|
|00001b80| 74 20 74 61 6b 65 73 20 | 61 20 76 6f 69 64 0d 0a |t takes |a void..|
|00001b90| 61 72 67 75 6d 65 6e 74 | 20 77 68 69 63 68 20 69 |argument| which i|
|00001ba0| 73 20 75 73 65 66 75 6c | 20 77 68 65 6e 20 73 65 |s useful| when se|
|00001bb0| 74 74 69 6e 67 20 75 70 | 20 70 6f 69 6e 74 65 72 |tting up| pointer|
|00001bc0| 73 20 74 6f 20 47 4d 61 | 74 72 69 63 65 73 2e 0d |s to GMa|trices..|
|00001bd0| 0a 54 68 65 20 73 65 63 | 6f 6e 64 20 63 6f 6e 73 |.The sec|ond cons|
|00001be0| 74 72 75 63 74 6f 72 20 | 74 61 6b 65 73 20 6f 6e |tructor |takes on|
|00001bf0| 65 20 6f 72 20 74 77 6f | 20 61 72 67 75 6d 65 6e |e or two| argumen|
|00001c00| 74 73 2e 20 54 68 65 20 | 66 69 72 73 74 0d 0a 61 |ts. The |first..a|
|00001c10| 72 67 75 6d 65 6e 74 20 | 69 73 20 61 20 6b 78 32 |rgument |is a kx2|
|00001c20| 20 6d 61 74 72 69 78 20 | 77 68 65 72 65 20 6b 20 | matrix |where k |
|00001c30| 69 73 20 74 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |is the n|umber of|
|00001c40| 20 72 6f 77 73 2e 20 54 | 68 65 0d 0a 66 69 72 73 | rows. T|he..firs|
|00001c50| 74 20 63 6f 6c 75 6d 6e | 20 69 73 20 74 68 65 20 |t column| is the |
|00001c60| 78 20 64 61 74 61 20 61 | 6e 64 20 74 68 65 20 73 |x data a|nd the s|
|00001c70| 65 63 6f 6e 64 20 69 73 | 20 74 68 65 20 79 20 64 |econd is| the y d|
|00001c80| 61 74 61 2e 20 54 68 65 | 0d 0a 73 65 63 6f 6e 64 |ata. The|..second|
|00001c90| 20 61 72 67 75 6d 65 6e | 74 20 69 73 20 74 68 65 | argumen|t is the|
|00001ca0| 20 73 79 6d 62 6f 6c 20 | 74 6f 20 62 65 20 70 6c | symbol |to be pl|
|00001cb0| 6f 74 74 65 64 2e 20 54 | 68 65 20 70 6f 69 6e 74 |otted. T|he point|
|00001cc0| 73 20 6f 66 20 74 68 65 | 0d 0a 67 72 61 70 68 20 |s of the|..graph |
|00001cd0| 77 69 6c 6c 20 62 65 20 | 63 6f 6e 6e 65 63 74 65 |will be |connecte|
|00001ce0| 64 20 62 79 20 61 20 6c | 69 6e 65 20 69 66 20 74 |d by a l|ine if t|
|00001cf0| 68 65 20 73 79 6d 62 6f | 6c 20 68 61 73 20 61 20 |he symbo|l has a |
|00001d00| 6e 65 67 61 74 69 76 65 | 0d 0a 73 69 67 6e 2e 20 |negative|..sign. |
|00001d10| 49 74 20 77 69 6c 6c 20 | 62 65 20 6a 75 73 74 20 |It will |be just |
|00001d20| 74 68 65 20 73 79 6d 62 | 6f 6c 20 69 66 20 74 68 |the symb|ol if th|
|00001d30| 65 20 73 69 67 6e 20 69 | 73 20 70 6f 73 69 74 69 |e sign i|s positi|
|00001d40| 76 65 2e 0d 0a 5c 69 6e | 64 65 78 7b 47 4d 61 74 |ve...\in|dex{GMat|
|00001d50| 72 69 78 21 73 79 6d 62 | 6f 6c 7d 20 20 54 68 65 |rix!symb|ol} The|
|00001d60| 20 64 65 66 61 75 6c 74 | 20 73 79 6d 62 6f 6c 20 | default| symbol |
|00001d70| 70 72 6f 64 75 63 65 73 | 20 61 20 77 69 67 67 6c |produces| a wiggl|
|00001d80| 79 0d 0a 6c 69 6e 65 20 | 70 6c 6f 74 2e 0d 0a 0d |y..line |plot....|
|00001d90| 0a 54 68 65 20 53 68 6f | 77 20 66 75 6e 63 74 69 |.The Sho|w functi|
|00001da0| 6f 6e 20 69 73 20 66 61 | 69 72 6c 79 20 63 6f 6d |on is fa|irly com|
|00001db0| 70 6c 69 63 61 74 65 64 | 2c 20 73 6f 20 49 20 77 |plicated|, so I w|
|00001dc0| 69 6c 6c 20 64 65 76 6f | 74 65 20 61 0d 0a 73 65 |ill devo|te a..se|
|00001dd0| 63 74 69 6f 6e 20 74 6f | 20 69 74 20 6c 61 74 65 |ction to| it late|
|00001de0| 72 2e 0d 0a 0d 0a 54 68 | 65 20 66 75 6e 63 74 69 |r.....Th|e functi|
|00001df0| 6f 6e 20 5c 76 65 72 62 | 2b 41 64 64 56 65 63 28 |on \verb|+AddVec(|
|00001e00| 29 2b 5c 69 6e 64 65 78 | 7b 47 4d 61 74 72 69 78 |)+\index|{GMatrix|
|00001e10| 21 41 64 64 56 65 63 28 | 29 7d 20 6c 65 74 73 20 |!AddVec(|)} lets |
|00001e20| 79 6f 75 0d 0a 6f 76 65 | 72 6c 61 79 20 67 72 61 |you..ove|rlay gra|
|00001e30| 70 68 73 2e 20 49 74 20 | 61 63 74 75 61 6c 6c 79 |phs. It |actually|
|00001e40| 20 63 6f 6e 63 61 74 65 | 6e 61 74 65 73 20 74 68 | concate|nates th|
|00001e50| 65 20 6e 65 77 20 6d 61 | 74 72 69 78 20 61 6e 64 |e new ma|trix and|
|00001e60| 0d 0a 75 70 64 61 74 65 | 73 20 74 68 65 20 67 72 |..update|s the gr|
|00001e70| 61 70 68 20 6e 75 6d 62 | 65 72 20 61 6e 64 20 73 |aph numb|er and s|
|00001e80| 79 6d 62 6f 6c 2e 20 54 | 68 65 20 61 72 67 75 6d |ymbol. T|he argum|
|00001e90| 65 6e 74 73 20 61 72 65 | 20 74 68 65 20 73 61 6d |ents are| the sam|
|00001ea0| 65 0d 0a 61 73 20 74 68 | 65 20 63 6f 6e 73 74 72 |e..as th|e constr|
|00001eb0| 75 63 74 6f 72 20 61 62 | 6f 76 65 2e 20 0d 0a 0d |uctor ab|ove. ...|
|00001ec0| 0a 54 68 65 72 65 20 61 | 72 65 20 73 65 76 65 72 |.There a|re sever|
|00001ed0| 61 6c 20 77 61 79 73 20 | 74 6f 20 61 6e 6e 6f 74 |al ways |to annot|
|00001ee0| 61 74 65 20 74 68 65 20 | 67 72 61 70 68 2e 0d 0a |ate the |graph...|
|00001ef0| 5c 69 6e 64 65 78 7b 47 | 4d 61 74 72 69 78 21 61 |\index{G|Matrix!a|
|00001f00| 6e 6e 6f 74 61 74 69 6f | 6e 7d 20 54 68 65 72 65 |nnotatio|n} There|
|00001f10| 20 61 72 65 20 66 6f 75 | 72 20 73 74 72 74 79 70 | are fou|r strtyp|
|00001f20| 65 20 70 6f 69 6e 74 65 | 72 73 20 0d 0a 66 6f 72 |e pointe|rs ..for|
|00001f30| 20 6c 6f 63 61 74 69 6e | 67 20 74 65 78 74 2e 20 | locatin|g text. |
|00001f40| 54 68 65 20 74 77 6f 20 | 74 69 74 6c 65 73 2c 20 |The two |titles, |
|00001f50| 5c 76 65 72 62 2b 74 69 | 74 6c 65 2b 20 61 6e 64 |\verb+ti|tle+ and|
|00001f60| 0d 0a 5c 76 65 72 62 2b | 74 69 74 6c 65 32 2b 2c |..\verb+|title2+,|
|00001f70| 20 61 72 65 20 70 6c 61 | 63 65 64 20 6f 6e 20 74 | are pla|ced on t|
|00001f80| 68 65 20 74 6f 70 20 63 | 65 6e 74 65 72 20 6f 66 |he top c|enter of|
|00001f90| 20 74 68 65 20 73 63 72 | 65 65 6e 2e 20 54 68 65 | the scr|een. The|
|00001fa0| 0d 0a 5c 76 65 72 62 2b | 78 6e 61 6d 65 2b 20 69 |..\verb+|xname+ i|
|00001fb0| 73 20 74 68 65 20 78 2d | 61 78 69 73 20 6e 61 6d |s the x-|axis nam|
|00001fc0| 65 20 61 6e 64 20 69 73 | 20 70 6c 61 63 65 64 20 |e and is| placed |
|00001fd0| 61 74 20 74 68 65 0d 0a | 62 6f 74 74 6f 6d 20 63 |at the..|bottom c|
|00001fe0| 65 6e 74 65 72 20 62 65 | 6e 65 61 74 68 20 74 68 |enter be|neath th|
|00001ff0| 65 20 67 72 61 70 68 2e | 20 54 68 65 20 5c 76 65 |e graph.| The \ve|
|00002000| 72 62 2b 79 6e 61 6d 65 | 2b 20 69 73 20 74 68 65 |rb+yname|+ is the|
|00002010| 20 79 2d 61 78 69 73 0d | 0a 6e 61 6d 65 20 61 6e | y-axis.|.name an|
|00002020| 64 20 69 73 20 70 6c 61 | 63 65 64 20 61 62 6f 76 |d is pla|ced abov|
|00002030| 65 20 74 68 65 20 79 2d | 61 78 69 73 2e 20 4e 6f |e the y-|axis. No|
|00002040| 74 65 20 74 68 61 74 20 | 74 68 65 73 65 20 66 6f |te that |these fo|
|00002050| 72 0d 0a 70 61 72 61 6d | 65 74 65 72 73 20 61 72 |r..param|eters ar|
|00002060| 65 20 70 6f 69 6e 74 65 | 72 73 20 73 6f 20 74 68 |e pointe|rs so th|
|00002070| 65 20 6e 65 65 64 20 61 | 20 27 2a 27 20 69 6e 20 |e need a| '*' in |
|00002080| 66 72 6f 6e 74 20 6f 66 | 20 69 74 20 74 6f 0d 0a |front of| it to..|
|00002090| 73 74 6f 72 65 20 61 20 | 76 61 6c 75 65 2e 20 49 |store a |value. I|
|000020a0| 20 6d 61 64 65 20 74 68 | 65 6d 20 70 6f 69 6e 74 | made th|em point|
|000020b0| 65 72 73 20 73 6f 20 74 | 68 65 79 20 6f 6e 6c 79 |ers so t|hey only|
|000020c0| 20 74 61 6b 65 20 61 20 | 70 6f 69 6e 74 65 72 0d | take a |pointer.|
|000020d0| 0a 66 72 6f 6d 20 74 68 | 65 20 73 74 61 63 6b 20 |.from th|e stack |
|000020e0| 69 6e 73 74 65 61 64 20 | 6f 66 20 74 68 65 20 73 |instead |of the s|
|000020f0| 70 61 63 65 20 72 65 71 | 75 69 72 65 64 20 66 6f |pace req|uired fo|
|00002100| 72 20 61 20 66 75 6c 6c | 20 73 74 72 74 79 70 65 |r a full| strtype|
|00002110| 2e 0d 0a 54 68 65 73 65 | 20 73 74 72 69 6e 67 73 |...These| strings|
|00002120| 20 61 72 65 20 64 65 6c | 65 74 65 64 20 62 79 20 | are del|eted by |
|00002130| 74 68 65 20 64 65 73 74 | 72 75 63 74 6f 72 2e 0d |the dest|ructor..|
|00002140| 0a 0d 0a 54 68 65 72 65 | 20 61 72 65 20 74 68 72 |...There| are thr|
|00002150| 65 65 20 62 6f 6f 6c 65 | 61 6e 73 20 66 6f 72 20 |ee boole|ans for |
|00002160| 67 72 69 64 20 64 69 73 | 70 6c 61 79 20 6f 70 74 |grid dis|play opt|
|00002170| 69 6f 6e 73 2e 0d 0a 5c | 76 65 72 62 2b 52 65 63 |ions...\|verb+Rec|
|00002180| 74 61 6e 67 6c 65 4f 6e | 2b 20 64 65 74 65 72 6d |tangleOn|+ determ|
|00002190| 69 6e 65 73 20 77 68 65 | 74 68 65 72 20 6f 72 20 |ines whe|ther or |
|000021a0| 6e 6f 74 20 74 6f 20 64 | 72 61 77 20 61 20 72 65 |not to d|raw a re|
|000021b0| 63 74 61 6e 67 6c 65 0d | 0a 69 6e 73 74 65 61 64 |ctangle.|.instead|
|000021c0| 20 6f 66 20 6a 75 73 74 | 20 74 68 65 20 78 20 61 | of just| the x a|
|000021d0| 6e 64 20 79 20 61 78 65 | 73 2e 20 49 74 73 20 64 |nd y axe|s. Its d|
|000021e0| 65 66 61 75 6c 74 20 76 | 61 6c 75 65 20 69 73 20 |efault v|alue is |
|000021f0| 54 54 52 55 45 2e 0d 0a | 52 65 66 65 72 65 6e 63 |TTRUE...|Referenc|
|00002200| 65 20 6c 69 6e 65 73 20 | 6d 61 79 20 62 65 20 64 |e lines |may be d|
|00002210| 72 61 77 6e 20 61 74 20 | 74 68 65 20 74 69 63 6b |rawn at |the tick|
|00002220| 20 6d 61 72 6b 73 20 62 | 79 20 63 68 61 6e 67 69 | marks b|y changi|
|00002230| 6e 67 0d 0a 5c 76 65 72 | 62 2b 58 47 72 69 64 4f |ng..\ver|b+XGridO|
|00002240| 6e 2b 20 6f 72 20 5c 76 | 65 72 62 2b 59 47 72 69 |n+ or \v|erb+YGri|
|00002250| 64 4f 6e 2b 20 74 6f 20 | 54 54 52 55 45 2e 0d 0a |dOn+ to |TTRUE...|
|00002260| 0d 0a 48 6f 72 69 7a 6f | 6e 74 61 6c 20 61 6e 64 |..Horizo|ntal and|
|00002270| 20 76 65 72 74 69 63 61 | 6c 20 72 65 66 65 72 65 | vertica|l refere|
|00002280| 6e 63 65 20 6c 69 6e 65 | 73 20 6d 61 79 20 61 6c |nce line|s may al|
|00002290| 73 6f 20 62 65 20 70 6c | 61 63 65 64 20 61 74 0d |so be pl|aced at.|
|000022a0| 0a 61 72 62 69 74 72 61 | 72 79 20 6c 6f 63 61 74 |.arbitra|ry locat|
|000022b0| 69 6f 6e 73 20 75 73 69 | 6e 67 20 74 68 65 20 66 |ions usi|ng the f|
|000022c0| 75 6e 63 74 69 6f 6e 73 | 20 5c 76 65 72 62 2b 48 |unctions| \verb+H|
|000022d0| 72 65 66 28 29 2b 20 61 | 6e 64 0d 0a 5c 76 65 72 |ref()+ a|nd..\ver|
|000022e0| 62 2b 56 72 65 66 28 29 | 2b 2e 5c 69 6e 64 65 78 |b+Vref()|+.\index|
|000022f0| 7b 47 4d 61 74 72 69 78 | 21 48 72 65 66 28 29 2c |{GMatrix|!Href(),|
|00002300| 56 72 65 66 28 29 7d 20 | 54 68 65 20 75 73 65 72 |Vref()} |The user|
|00002310| 20 63 61 6e 20 0d 0a 73 | 70 65 63 69 66 79 20 61 | can ..s|pecify a|
|00002320| 74 20 6d 6f 73 74 20 32 | 30 20 72 65 66 65 72 65 |t most 2|0 refere|
|00002330| 6e 63 65 20 6c 69 6e 65 | 73 2e 20 20 54 68 65 20 |nce line|s. The |
|00002340| 6d 65 6d 62 65 72 73 20 | 61 72 65 20 73 74 6f 72 |members |are stor|
|00002350| 65 64 20 69 6e 20 61 0d | 0a 63 69 72 63 75 6c 61 |ed in a.|.circula|
|00002360| 72 20 66 61 73 68 69 6f | 6e 3a 20 74 68 65 20 32 |r fashio|n: the 2|
|00002370| 31 27 73 74 20 72 65 66 | 65 72 65 6e 63 65 20 6c |1'st ref|erence l|
|00002380| 69 6e 65 20 6f 76 65 72 | 77 72 69 74 65 73 20 74 |ine over|writes t|
|00002390| 68 65 20 31 27 73 74 0d | 0a 72 65 66 65 72 65 6e |he 1'st.|.referen|
|000023a0| 63 65 20 6c 69 6e 65 2e | 20 54 68 65 20 72 65 66 |ce line.| The ref|
|000023b0| 65 72 65 6e 63 65 20 6c | 69 6e 65 73 20 63 61 6e |erence l|ines can|
|000023c0| 20 62 65 20 63 6c 65 61 | 72 65 64 20 62 79 20 74 | be clea|red by t|
|000023d0| 68 65 0d 0a 66 75 6e 63 | 74 69 6f 6e 73 20 5c 76 |he..func|tions \v|
|000023e0| 65 72 62 2b 43 6c 65 61 | 72 48 72 65 66 28 29 2b |erb+Clea|rHref()+|
|000023f0| 20 61 6e 64 20 5c 76 65 | 72 62 2b 43 6c 65 61 72 | and \ve|rb+Clear|
|00002400| 56 72 65 66 28 29 2b 2e | 0d 0a 0d 0a 59 6f 75 20 |Vref()+.|....You |
|00002410| 63 61 6e 20 73 61 76 65 | 20 74 68 65 20 67 72 61 |can save| the gra|
|00002420| 70 68 20 6d 61 74 72 69 | 78 20 75 73 69 6e 67 20 |ph matri|x using |
|00002430| 74 68 65 20 5c 76 65 72 | 62 2b 53 61 76 65 47 72 |the \ver|b+SaveGr|
|00002440| 61 70 68 28 29 2b 0d 0a | 63 6f 6d 6d 61 6e 64 2e |aph()+..|command.|
|00002450| 20 5c 69 6e 64 65 78 7b | 47 4d 61 74 72 69 78 21 | \index{|GMatrix!|
|00002460| 53 61 76 65 47 72 61 70 | 68 28 29 7d 20 54 68 65 |SaveGrap|h()} The|
|00002470| 20 61 72 67 75 6d 65 6e | 74 20 69 73 20 61 20 66 | argumen|t is a f|
|00002480| 69 6c 65 0d 0a 6e 61 6d | 65 20 74 6f 20 77 72 69 |ile..nam|e to wri|
|00002490| 74 65 20 74 68 65 20 41 | 53 43 49 49 20 76 65 72 |te the A|SCII ver|
|000024a0| 73 69 6f 6e 20 6f 66 20 | 74 68 65 20 6d 61 74 72 |sion of |the matr|
|000024b0| 69 78 2e 20 59 6f 75 20 | 63 61 6e 20 74 68 65 6e |ix. You |can then|
|000024c0| 0d 0a 72 65 74 72 69 65 | 76 65 20 74 68 65 20 64 |..retrie|ve the d|
|000024d0| 61 74 61 20 69 6e 74 6f | 20 61 20 6d 6f 72 65 20 |ata into| a more |
|000024e0| 73 6f 70 68 69 73 74 69 | 63 61 74 65 64 20 67 72 |sophisti|cated gr|
|000024f0| 61 70 68 69 63 73 20 70 | 72 6f 67 72 61 6d 2e 0d |aphics p|rogram..|
|00002500| 0a 0d 0a 5c 73 65 63 74 | 69 6f 6e 7b 53 68 6f 77 |...\sect|ion{Show|
|00002510| 28 29 7d 0d 0a 0d 0a 54 | 68 65 20 73 68 6f 77 20 |()}....T|he show |
|00002520| 66 75 6e 63 74 69 6f 6e | 2c 20 5c 76 65 72 62 2b |function|, \verb+|
|00002530| 53 68 6f 77 28 29 2b 5c | 69 6e 64 65 78 7b 47 4d |Show()+\|index{GM|
|00002540| 61 74 72 69 78 21 53 68 | 6f 77 28 29 7d 2c 20 64 |atrix!Sh|ow()}, d|
|00002550| 69 73 70 6c 61 79 73 20 | 74 68 65 0d 0a 67 72 61 |isplays |the..gra|
|00002560| 70 68 2e 20 49 74 20 63 | 61 6c 6c 73 20 74 68 65 |ph. It c|alls the|
|00002570| 20 42 6f 72 6c 61 6e 64 | 20 42 47 49 20 66 75 6e | Borland| BGI fun|
|00002580| 63 74 69 6f 6e 73 2c 20 | 73 6f 20 69 74 20 6f 6e |ctions, |so it on|
|00002590| 6c 79 20 77 6f 72 6b 73 | 20 66 6f 72 0d 0a 74 68 |ly works| for..th|
|000025a0| 65 20 50 43 20 63 6c 61 | 73 73 20 76 69 64 65 6f |e PC cla|ss video|
|000025b0| 20 6d 6f 64 65 73 20 74 | 68 61 74 20 42 6f 72 6c | modes t|hat Borl|
|000025c0| 61 6e 64 20 73 75 70 70 | 6f 72 74 73 2e 20 5c 76 |and supp|orts. \v|
|000025d0| 65 72 62 2b 53 68 6f 77 | 28 29 2b 0d 0a 75 73 65 |erb+Show|()+..use|
|000025e0| 73 20 61 75 74 6f 64 65 | 74 65 63 74 69 6f 6e 20 |s autode|tection |
|000025f0| 61 6e 64 20 70 6f 73 69 | 74 69 6f 6e 73 20 74 68 |and posi|tions th|
|00002600| 65 20 67 72 61 70 68 20 | 61 75 74 6f 6d 61 74 69 |e graph |automati|
|00002610| 63 61 6c 6c 79 2e 20 54 | 68 65 72 65 0d 0a 69 73 |cally. T|here..is|
|00002620| 20 6e 6f 20 77 61 79 20 | 74 6f 20 73 61 76 65 20 | no way |to save |
|00002630| 74 68 65 20 67 72 61 70 | 68 69 63 73 20 69 6d 61 |the grap|hics ima|
|00002640| 67 65 2e 20 49 66 20 79 | 6f 75 20 77 61 6e 74 20 |ge. If y|ou want |
|00002650| 74 6f 20 73 61 76 65 20 | 69 74 2c 0d 0a 79 6f 75 |to save |it,..you|
|00002660| 20 6e 65 65 64 20 61 20 | 67 72 61 70 68 69 63 73 | need a |graphics|
|00002670| 20 73 63 72 65 65 6e 20 | 67 72 61 62 62 65 72 20 | screen |grabber |
|00002680| 70 72 6f 67 72 61 6d 20 | 73 75 63 68 20 61 73 20 |program |such as |
|00002690| 47 52 41 42 20 66 72 6f | 6d 0d 0a 57 6f 72 64 20 |GRAB fro|m..Word |
|000026a0| 50 65 72 66 65 63 74 20 | 43 6f 72 70 2e 20 20 59 |Perfect |Corp. Y|
|000026b0| 6f 75 20 72 65 61 6c 6c | 79 20 73 68 6f 75 6c 64 |ou reall|y should|
|000026c0| 20 77 72 69 74 65 20 6f | 75 74 20 74 68 65 20 67 | write o|ut the g|
|000026d0| 72 61 70 68 69 63 73 0d | 0a 6d 61 74 72 69 78 20 |raphics.|.matrix |
|000026e0| 61 6e 64 20 75 73 65 20 | 61 20 62 65 74 74 65 72 |and use |a better|
|000026f0| 20 67 72 61 70 68 69 63 | 73 20 70 72 6f 67 72 61 | graphic|s progra|
|00002700| 6d 20 66 6f 72 20 70 72 | 6f 66 65 73 73 69 6f 6e |m for pr|ofession|
|00002710| 61 6c 0d 0a 71 75 61 6c | 69 74 79 2e 20 0d 0a 0d |al..qual|ity. ...|
|00002720| 0a 5c 76 65 72 62 2b 53 | 68 6f 77 28 29 2b 20 69 |.\verb+S|how()+ i|
|00002730| 73 20 61 20 6c 6f 6e 67 | 20 72 6f 75 74 69 6e 65 |s a long| routine|
|00002740| 20 77 69 74 68 20 73 65 | 76 65 72 61 6c 20 6d 61 | with se|veral ma|
|00002750| 6a 6f 72 20 73 74 65 70 | 73 2e 20 54 68 65 20 73 |jor step|s. The s|
|00002760| 74 65 70 73 20 61 72 65 | 0d 0a 5c 62 65 67 69 6e |teps are|..\begin|
|00002770| 7b 69 74 65 6d 69 7a 65 | 7d 0d 0a 20 20 20 20 20 |{itemize|}.. |
|00002780| 20 20 20 5c 69 74 65 6d | 20 55 73 65 20 61 75 74 | \item| Use aut|
|00002790| 6f 2d 64 65 74 65 63 74 | 69 6f 6e 20 74 6f 20 66 |o-detect|ion to f|
|000027a0| 69 6e 64 20 74 68 65 20 | 67 72 61 70 68 69 63 73 |ind the |graphics|
|000027b0| 20 64 72 69 76 65 72 0d | 0a 0d 0a 20 20 20 20 20 | driver.|... |
|000027c0| 20 20 20 5c 69 74 65 6d | 20 49 6e 69 74 69 61 6c | \item| Initial|
|000027d0| 69 7a 65 20 74 68 65 20 | 67 72 61 70 68 69 63 73 |ize the |graphics|
|000027e0| 20 73 63 72 65 65 6e 20 | 61 74 20 69 74 73 20 68 | screen |at its h|
|000027f0| 69 67 68 65 73 74 20 72 | 65 73 6f 6c 75 74 69 6f |ighest r|esolutio|
|00002800| 6e 2c 20 20 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |n, .. | |
|00002810| 20 20 20 20 20 20 63 6c | 65 61 72 20 74 68 65 20 | cl|ear the |
|00002820| 73 63 72 65 65 6e 2c 20 | 73 65 74 20 74 68 65 20 |screen, |set the |
|00002830| 63 6f 6c 6f 72 20 74 6f | 20 74 68 65 20 68 69 67 |color to| the hig|
|00002840| 68 65 73 74 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |hest.. | |
|00002850| 20 20 20 20 20 20 63 6f | 6c 6f 72 2e 0d 0a 0d 0a | co|lor.....|
|00002860| 20 20 20 20 20 20 20 20 | 5c 69 74 65 6d 20 44 65 | |\item De|
|00002870| 74 65 72 6d 69 6e 65 20 | 74 68 65 20 73 63 72 65 |termine |the scre|
|00002880| 65 6e 20 64 69 6d 65 6e | 73 69 6f 6e 73 2c 20 61 |en dimen|sions, a|
|00002890| 6e 64 20 6c 69 6e 65 20 | 73 65 74 74 69 6e 67 73 |nd line |settings|
|000028a0| 2c 20 0d 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |, .. | |
|000028b0| 20 20 20 20 77 72 69 74 | 65 20 74 68 65 20 74 69 | writ|e the ti|
|000028c0| 74 6c 65 73 2c 20 61 6e | 64 20 64 65 74 65 72 6d |tles, an|d determ|
|000028d0| 69 6e 65 20 74 68 65 20 | 61 78 69 73 20 6d 61 72 |ine the |axis mar|
|000028e0| 67 69 6e 73 2e 0d 0a 20 | 20 20 20 20 20 20 20 20 |gins... | |
|000028f0| 20 20 20 20 20 20 20 44 | 72 61 77 20 72 65 63 74 | D|raw rect|
|00002900| 61 6e 67 6c 65 20 6f 6e | 20 74 68 65 20 67 72 61 |angle on| the gra|
|00002910| 70 68 20 6d 61 72 67 69 | 6e 73 2c 20 69 66 20 72 |ph margi|ns, if r|
|00002920| 65 71 75 65 73 74 65 64 | 2e 0d 0a 0d 0a 20 20 20 |equested|..... |
|00002930| 20 20 20 20 20 5c 69 74 | 65 6d 20 43 6f 6e 73 74 | \it|em Const|
|00002940| 72 75 63 74 20 61 6e 64 | 20 64 69 73 70 6c 61 79 |ruct and| display|
|00002950| 20 61 20 59 41 78 69 73 | 20 6f 62 6a 65 63 74 20 | a YAxis| object |
|00002960| 66 72 6f 6d 20 74 68 65 | 20 67 72 61 70 68 20 0d |from the| graph .|
|00002970| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00002980| 20 6d 61 74 72 69 78 20 | 61 6e 64 20 6d 61 72 67 | matrix |and marg|
|00002990| 69 6e 73 2e 0d 0a 0d 0a | 20 20 20 20 20 20 20 20 |ins.....| |
|000029a0| 5c 69 74 65 6d 20 43 6f | 6e 73 74 72 75 63 74 20 |\item Co|nstruct |
|000029b0| 61 6e 64 20 64 69 73 70 | 6c 61 79 20 61 20 58 41 |and disp|lay a XA|
|000029c0| 78 69 73 20 6f 62 6a 65 | 63 74 20 66 72 6f 6d 20 |xis obje|ct from |
|000029d0| 74 68 65 20 67 72 61 70 | 68 20 0d 0a 20 20 20 20 |the grap|h .. |
|000029e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 6d 61 74 72 | | matr|
|000029f0| 69 78 20 61 6e 64 20 6d | 61 72 67 69 6e 73 2e 0d |ix and m|argins..|
|00002a00| 0a 0d 0a 20 20 20 20 20 | 20 20 20 5c 69 74 65 6d |... | \item|
|00002a10| 20 50 6c 6f 74 20 74 68 | 65 20 64 61 74 61 2c 20 | Plot th|e data, |
|00002a20| 61 6e 64 20 63 6f 6e 6e | 65 63 74 20 74 68 65 20 |and conn|ect the |
|00002a30| 70 6f 69 6e 74 73 20 69 | 66 20 72 65 71 75 65 73 |points i|f reques|
|00002a40| 74 65 64 2e 20 0d 0a 20 | 20 20 20 20 20 20 20 20 |ted. .. | |
|00002a50| 20 20 20 20 20 20 20 44 | 72 61 77 20 74 68 65 20 | D|raw the |
|00002a60| 68 6f 72 69 7a 6f 6e 74 | 61 6c 20 61 6e 64 20 76 |horizont|al and v|
|00002a70| 65 72 74 69 63 61 6c 20 | 72 65 66 65 72 65 6e 63 |ertical |referenc|
|00002a80| 65 20 6c 69 6e 65 73 2e | 0d 0a 0d 0a 20 20 20 20 |e lines.|.... |
|00002a90| 20 20 20 20 5c 69 74 65 | 6d 20 44 72 61 77 20 74 | \ite|m Draw t|
|00002aa0| 68 65 20 61 78 69 73 20 | 6c 61 62 65 6c 73 2c 20 |he axis |labels, |
|00002ab0| 74 68 65 6e 20 63 6c 65 | 61 6e 20 75 70 20 74 68 |then cle|an up th|
|00002ac0| 65 20 70 6f 69 6e 74 65 | 72 73 2e 0d 0a 5c 65 6e |e pointe|rs...\en|
|00002ad0| 64 7b 69 74 65 6d 69 7a | 65 7d 0d 0a 0d 0a 54 68 |d{itemiz|e}....Th|
|00002ae0| 65 20 69 6e 74 65 72 65 | 73 74 69 6e 67 20 70 61 |e intere|sting pa|
|00002af0| 72 74 20 6f 66 20 5c 76 | 65 72 62 2b 53 68 6f 77 |rt of \v|erb+Show|
|00002b00| 28 29 2b 20 69 73 20 74 | 68 65 20 61 78 69 73 20 |()+ is t|he axis |
|00002b10| 6f 62 6a 65 63 74 73 2e | 20 54 68 65 0d 0a 61 78 |objects.| The..ax|
|00002b20| 65 73 20 77 69 6c 6c 20 | 63 6f 76 65 72 20 61 6c |es will |cover al|
|00002b30| 6c 20 6f 66 20 74 68 65 | 20 64 61 74 61 2c 20 61 |l of the| data, a|
|00002b40| 6e 64 20 70 72 65 73 65 | 6e 74 20 6e 65 61 74 20 |nd prese|nt neat |
|00002b50| 61 78 69 73 20 6e 75 6d | 62 65 72 73 2e 0d 0a 54 |axis num|bers...T|
|00002b60| 68 65 20 74 69 63 6b 20 | 6d 61 72 6b 73 2c 20 70 |he tick |marks, p|
|00002b70| 6f 73 69 74 69 6f 6e 73 | 2c 20 61 6e 64 20 76 61 |ositions|, and va|
|00002b80| 6c 75 65 73 20 61 72 65 | 20 63 61 6c 63 75 6c 61 |lues are| calcula|
|00002b90| 74 65 64 20 62 79 20 41 | 70 70 6c 69 65 64 0d 0a |ted by A|pplied..|
|00002ba0| 53 74 61 74 69 73 74 69 | 63 73 20 41 6c 67 6f 72 |Statisti|cs Algor|
|00002bb0| 69 74 68 6d 20 31 38 33 | 2e 20 49 74 20 69 73 20 |ithm 183|. It is |
|00002bc0| 61 20 74 72 61 6e 73 6c | 61 74 65 64 20 46 4f 52 |a transl|ated FOR|
|00002bd0| 54 52 41 4e 20 70 72 6f | 67 72 61 6d 20 66 6f 72 |TRAN pro|gram for|
|00002be0| 0d 0a 63 61 6c 63 75 6c | 61 74 69 6e 67 20 74 68 |..calcul|ating th|
|00002bf0| 65 20 73 63 61 6c 65 2c | 20 61 6e 64 20 76 61 6c |e scale,| and val|
|00002c00| 75 65 73 20 66 6f 72 20 | 61 6e 20 61 78 69 73 2e |ues for |an axis.|
|00002c10| 20 54 68 69 73 20 72 6f | 75 74 69 6e 65 20 69 73 | This ro|utine is|
|00002c20| 0d 0a 66 61 69 72 6c 79 | 20 63 6f 6d 70 6c 69 63 |..fairly| complic|
|00002c30| 61 74 65 64 2c 20 73 6f | 20 49 20 77 69 6c 6c 20 |ated, so| I will |
|00002c40| 72 65 66 65 72 20 79 6f | 75 20 74 6f 20 74 68 65 |refer yo|u to the|
|00002c50| 20 6c 69 74 65 72 61 74 | 75 72 65 20 66 6f 72 0d | literat|ure for.|
|00002c60| 0a 69 74 2e 20 49 74 20 | 68 61 73 20 74 68 72 65 |.it. It |has thre|
|00002c70| 65 20 62 61 73 69 63 20 | 72 65 73 70 6f 6e 73 69 |e basic |responsi|
|00002c80| 62 69 6c 69 74 69 65 73 | 3a 20 63 61 6c 63 75 6c |bilities|: calcul|
|00002c90| 61 74 65 20 74 68 65 20 | 72 61 6e 67 65 20 66 6f |ate the |range fo|
|00002ca0| 72 0d 0a 74 68 65 20 61 | 78 69 73 20 6c 61 62 65 |r..the a|xis labe|
|00002cb0| 6c 73 2c 20 70 72 6f 64 | 75 63 65 20 6e 65 61 74 |ls, prod|uce neat|
|00002cc0| 20 76 61 6c 75 65 73 2c | 20 61 6e 64 20 66 69 78 | values,| and fix|
|00002cd0| 20 75 70 2e 20 54 68 65 | 20 41 78 69 73 20 77 69 | up. The| Axis wi|
|00002ce0| 6c 6c 0d 0a 72 65 73 63 | 61 6c 65 20 74 68 65 20 |ll..resc|ale the |
|00002cf0| 64 61 74 61 20 62 79 20 | 61 6e 20 6f 66 66 73 65 |data by |an offse|
|00002d00| 74 20 61 6e 64 20 70 6f | 77 65 72 20 73 6f 20 74 |t and po|wer so t|
|00002d10| 68 61 74 20 74 68 65 20 | 61 78 69 73 20 76 61 6c |hat the |axis val|
|00002d20| 75 65 73 0d 0a 77 69 6c | 6c 20 62 65 20 6e 65 61 |ues..wil|l be nea|
|00002d30| 74 2e 20 54 68 69 73 20 | 69 6e 66 6f 72 6d 61 74 |t. This |informat|
|00002d40| 69 6f 6e 20 77 69 6c 6c | 20 61 70 70 65 61 72 20 |ion will| appear |
|00002d50| 6e 65 78 74 20 74 6f 20 | 74 68 65 20 61 78 69 73 |next to |the axis|
|00002d60| 0d 0a 6c 61 62 65 6c 20 | 69 66 20 69 74 20 77 61 |..label |if it wa|
|00002d70| 73 20 72 65 71 75 69 72 | 65 64 2e 0d 0a 0d 0a 54 |s requir|ed.....T|
|00002d80| 68 65 20 41 78 69 73 20 | 63 6c 61 73 73 2c 20 0d |he Axis |class, .|
|00002d90| 0a 5c 76 65 72 62 2b 41 | 78 69 73 2b 5c 69 6e 64 |.\verb+A|xis+\ind|
|00002da0| 65 78 7b 47 4d 61 74 72 | 69 78 21 41 78 69 73 2c |ex{GMatr|ix!Axis,|
|00002db0| 20 58 41 78 69 73 2c 20 | 59 41 78 69 73 20 6f 62 | XAxis, |YAxis ob|
|00002dc0| 6a 65 63 74 73 7d 2c 20 | 20 69 73 20 61 0d 0a 62 |jects}, | is a..b|
|00002dd0| 61 73 65 20 63 6c 61 73 | 73 20 66 6f 72 20 74 68 |ase clas|s for th|
|00002de0| 65 20 5c 76 65 72 62 2b | 58 41 78 69 73 2b 20 61 |e \verb+|XAxis+ a|
|00002df0| 6e 64 20 5c 76 65 72 62 | 2b 59 41 78 69 73 2b 20 |nd \verb|+YAxis+ |
|00002e00| 63 6c 61 73 73 65 73 2e | 20 41 78 69 73 2c 0d 0a |classes.| Axis,..|
|00002e10| 73 75 70 70 6c 69 65 73 | 20 61 20 76 69 72 74 75 |supplies| a virtu|
|00002e20| 61 6c 20 64 69 73 70 6c | 61 79 20 66 75 6e 63 74 |al displ|ay funct|
|00002e30| 69 6f 6e 20 74 68 61 74 | 20 69 73 20 6f 76 65 72 |ion that| is over|
|00002e40| 6c 6f 61 64 65 64 20 69 | 6e 20 74 68 65 20 0d 0a |loaded i|n the ..|
|00002e50| 58 41 78 69 73 20 61 6e | 64 20 59 41 78 69 73 20 |XAxis an|d YAxis |
|00002e60| 6f 62 6a 65 63 74 73 2e | 20 54 68 65 73 65 20 6f |objects.| These o|
|00002e70| 62 6a 65 63 74 73 20 61 | 72 65 20 64 65 72 69 76 |bjects a|re deriv|
|00002e80| 65 64 20 66 72 6f 6d 20 | 41 78 69 73 2c 20 73 6f |ed from |Axis, so|
|00002e90| 0d 0a 74 68 65 20 41 78 | 69 73 20 66 75 6e 63 74 |..the Ax|is funct|
|00002ea0| 69 6f 6e 73 20 63 6f 6d | 6d 6f 6e 20 74 6f 20 74 |ions com|mon to t|
|00002eb0| 68 65 20 58 2d 59 20 61 | 78 65 73 20 61 72 65 20 |he X-Y a|xes are |
|00002ec0| 70 65 72 66 6f 72 6d 65 | 64 20 64 75 72 69 6e 67 |performe|d during|
|00002ed0| 0d 0a 74 68 65 20 63 6f | 6e 73 74 72 75 63 74 6f |..the co|nstructo|
|00002ee0| 72 20 63 61 6c 6c 2e 20 | 54 68 65 20 64 65 72 69 |r call. |The deri|
|00002ef0| 76 65 64 20 63 6c 61 73 | 73 65 73 27 20 6d 61 69 |ved clas|ses' mai|
|00002f00| 6e 20 72 65 73 70 6f 6e | 73 69 62 69 6c 69 74 79 |n respon|sibility|
|00002f10| 0d 0a 69 73 20 74 6f 20 | 70 75 74 20 74 68 65 20 |..is to |put the |
|00002f20| 61 78 69 73 20 6f 6e 20 | 74 68 65 20 73 63 72 65 |axis on |the scre|
|00002f30| 65 6e 2e 20 54 68 65 20 | 74 69 63 6b 73 20 61 6e |en. The |ticks an|
|00002f40| 64 20 76 61 6c 75 65 73 | 20 61 72 65 20 64 72 61 |d values| are dra|
|00002f50| 77 6e 0d 0a 72 65 6c 61 | 74 69 76 65 20 74 6f 20 |wn..rela|tive to |
|00002f60| 74 68 65 20 76 69 65 77 | 70 6f 72 74 73 20 66 6f |the view|ports fo|
|00002f70| 72 20 74 68 65 20 64 69 | 66 66 65 72 65 6e 74 20 |r the di|fferent |
|00002f80| 61 78 65 73 2e 5c 66 6f | 6f 74 6e 6f 74 65 7b 0d |axes.\fo|otnote{.|
|00002f90| 0a 54 68 69 73 20 69 73 | 20 61 6e 20 65 78 61 6d |.This is| an exam|
|00002fa0| 70 6c 65 20 6f 66 20 74 | 68 65 20 64 65 73 69 67 |ple of t|he desig|
|00002fb0| 6e 20 62 79 20 64 69 66 | 66 65 72 65 6e 63 65 73 |n by dif|ferences|
|00002fc0| 20 63 6f 6e 63 65 70 74 | 20 74 68 61 74 20 69 73 | concept| that is|
|00002fd0| 0d 0a 6d 61 6b 69 6e 67 | 20 43 2b 2b 20 73 6f 20 |..making| C++ so |
|00002fe0| 70 6f 70 75 6c 61 72 7d | 0d 0a |popular}|.. |
+--------+-------------------------+-------------------------+--------+--------+