home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / c / amivogl-1.03.lzh / vogl / docs / vogl.tex < prev   
LaTeX Document  |  1994-12-20  |  36.1 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

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

You can browse this item here: vogl.tex

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX document, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 64 6f 63 75 6d 65 6e | 74 73 74 79 6c 65 5b 31 |\documen|tstyle[1|
|00000010| 32 70 74 5d 7b 61 72 74 | 69 63 6c 65 7d 0a 5c 70 |2pt]{art|icle}.\p|
|00000020| 61 67 65 73 74 79 6c 65 | 7b 6d 79 68 65 61 64 69 |agestyle|{myheadi|
|00000030| 6e 67 73 7d 0a 0a 5c 6d | 61 72 6b 72 69 67 68 74 |ngs}..\m|arkright|
|00000040| 7b 5c 68 66 69 6c 6c 20 | 56 4f 47 4c 5c 68 66 69 |{\hfill |VOGL\hfi|
|00000050| 6c 6c 5c 74 6f 64 61 79 | 5c 68 66 69 6c 6c 7d 0a |ll\today|\hfill}.|
|00000060| 5c 6d 61 6b 65 69 6e 64 | 65 78 0a 0a 5c 74 69 74 |\makeind|ex..\tit|
|00000070| 6c 65 7b 7b 5c 62 66 20 | 56 20 4f 20 47 20 4c 7d |le{{\bf |V O G L}|
|00000080| 20 5c 5c 0a 5c 6e 6f 72 | 6d 61 6c 73 69 7a 65 5c | \\.\nor|malsize\|
|00000090| 62 66 20 41 20 76 65 72 | 79 20 6f 72 64 69 6e 61 |bf A ver|y ordina|
|000000a0| 72 79 20 47 4c 20 4c 69 | 62 72 61 72 79 7d 0a 0a |ry GL Li|brary}..|
|000000b0| 5c 61 75 74 68 6f 72 7b | 45 72 69 63 20 48 2e 20 |\author{|Eric H. |
|000000c0| 45 63 68 69 64 6e 61 7d | 0a 0a 25 20 41 62 62 72 |Echidna}|..% Abbr|
|000000d0| 65 76 69 61 74 69 6f 6e | 73 0a 5c 6e 65 77 63 6f |eviation|s.\newco|
|000000e0| 6d 6d 61 6e 64 7b 5c 46 | 4f 52 54 52 41 4e 7d 7b |mmand{\F|ORTRAN}{|
|000000f0| 7b 5c 73 6d 61 6c 6c 20 | 46 4f 52 54 52 41 4e 7d |{\small |FORTRAN}|
|00000100| 7d 0a 5c 6e 65 77 63 6f | 6d 6d 61 6e 64 7b 5c 4e |}.\newco|mmand{\N|
|00000110| 55 4c 4c 7d 7b 7b 5c 73 | 6d 61 6c 6c 20 4e 55 4c |ULL}{{\s|mall NUL|
|00000120| 4c 7d 7d 0a 5c 6e 65 77 | 63 6f 6d 6d 61 6e 64 7b |L}}.\new|command{|
|00000130| 5c 56 44 45 56 49 43 45 | 7d 7b 7b 5c 73 6d 61 6c |\VDEVICE|}{{\smal|
|00000140| 6c 20 56 44 45 56 49 43 | 45 7d 7d 0a 5c 6e 65 77 |l VDEVIC|E}}.\new|
|00000150| 63 6f 6d 6d 61 6e 64 7b | 5c 56 4f 47 4c 7d 7b 7b |command{|\VOGL}{{|
|00000160| 5c 73 6d 61 6c 6c 20 56 | 4f 47 4c 7d 7d 0a 5c 6e |\small V|OGL}}.\n|
|00000170| 65 77 74 68 65 6f 72 65 | 6d 7b 61 6c 67 7d 7b 41 |ewtheore|m{alg}{A|
|00000180| 6c 67 6f 72 69 74 68 6d | 7d 0a 0a 25 20 48 79 70 |lgorithm|}..% Hyp|
|00000190| 68 65 6e 61 74 69 6f 6e | 20 43 6f 6e 74 72 6f 6c |henation| Control|
|000001a0| 20 43 65 6e 74 65 72 0a | 5c 68 79 70 68 65 6e 61 | Center.|\hyphena|
|000001b0| 74 69 6f 6e 7b 53 63 72 | 65 65 6e 2d 63 6f 6f 72 |tion{Scr|een-coor|
|000001c0| 64 7d 0a 0a 25 20 4d 61 | 6b 65 20 74 68 65 20 74 |d}..% Ma|ke the t|
|000001d0| 65 78 74 20 61 20 62 69 | 74 20 77 69 64 65 72 20 |ext a bi|t wider |
|000001e0| 74 68 61 6e 20 64 65 66 | 61 75 6c 74 0a 5c 6e 65 |than def|ault.\ne|
|000001f0| 77 63 6f 6d 6d 61 6e 64 | 7b 5c 77 69 64 65 70 61 |wcommand|{\widepa|
|00000200| 67 65 7d 7b 0a 20 5c 73 | 65 74 6c 65 6e 67 74 68 |ge}{. \s|etlength|
|00000210| 7b 5c 66 6f 6f 74 68 65 | 69 67 68 74 7d 7b 30 69 |{\foothe|ight}{0i|
|00000220| 6e 7d 0a 20 5c 73 65 74 | 6c 65 6e 67 74 68 7b 5c |n}. \set|length{\|
|00000230| 74 6f 70 6d 61 72 67 69 | 6e 7d 7b 30 2e 30 69 6e |topmargi|n}{0.0in|
|00000240| 7d 0a 20 5c 73 65 74 6c | 65 6e 67 74 68 7b 5c 6f |}. \setl|ength{\o|
|00000250| 64 64 73 69 64 65 6d 61 | 72 67 69 6e 7d 7b 30 69 |ddsidema|rgin}{0i|
|00000260| 6e 7d 0a 20 5c 73 65 74 | 6c 65 6e 67 74 68 7b 5c |n}. \set|length{\|
|00000270| 74 65 78 74 77 69 64 74 | 68 7d 7b 36 2e 35 69 6e |textwidt|h}{6.5in|
|00000280| 7d 0a 20 5c 73 65 74 6c | 65 6e 67 74 68 7b 5c 74 |}. \setl|ength{\t|
|00000290| 65 78 74 68 65 69 67 68 | 74 7d 7b 39 2e 30 69 6e |extheigh|t}{9.0in|
|000002a0| 7d 0a 20 7d 0a 5c 77 69 | 64 65 70 61 67 65 0a 0a |}. }.\wi|depage..|
|000002b0| 5c 62 65 67 69 6e 7b 64 | 6f 63 75 6d 65 6e 74 7d |\begin{d|ocument}|
|000002c0| 0a 0a 5c 6d 61 6b 65 74 | 69 74 6c 65 0a 0a 5c 62 |..\maket|itle..\b|
|000002d0| 65 67 69 6e 7b 61 62 73 | 74 72 61 63 74 7d 0a 0a |egin{abs|tract}..|
|000002e0| 20 20 20 20 20 5c 56 4f | 47 4c 5c 20 69 73 20 61 | \VO|GL\ is a|
|000002f0| 20 6c 69 62 72 61 72 79 | 20 6f 66 20 43 20 72 6f | library| of C ro|
|00000300| 75 74 69 6e 65 73 20 77 | 68 69 63 68 20 74 72 79 |utines w|hich try|
|00000310| 20 74 6f 20 20 61 6c 6c | 6f 77 20 20 61 20 20 70 | to all|ow a p|
|00000320| 72 6f 67 72 61 6d 6d 65 | 72 20 20 74 6f 0a 20 20 |rogramme|r to. |
|00000330| 20 20 20 77 72 69 74 65 | 20 20 70 72 6f 67 72 61 | write| progra|
|00000340| 6d 73 20 20 77 68 69 63 | 68 20 63 61 6e 20 62 65 |ms whic|h can be|
|00000350| 20 6d 6f 76 65 64 20 74 | 6f 20 6d 61 63 68 69 6e | moved t|o machin|
|00000360| 65 73 20 77 68 69 63 68 | 20 68 61 76 65 20 74 68 |es which| have th|
|00000370| 65 20 53 69 6c 69 63 6f | 6e 0a 20 20 20 20 20 47 |e Silico|n. G|
|00000380| 72 61 70 68 69 63 73 20 | 47 4c 20 6c 69 62 72 61 |raphics |GL libra|
|00000390| 72 79 20 6f 6e 20 20 74 | 68 65 6d 2e 20 20 49 74 |ry on t|hem. It|
|000003a0| 20 20 69 73 20 62 61 73 | 65 64 20 20 65 6e 74 69 | is bas|ed enti|
|000003b0| 72 65 6c 79 20 20 6f 6e | 20 20 74 68 65 20 20 7b |rely on| the {|
|000003c0| 5c 73 6d 61 6c 6c 0a 20 | 20 20 20 20 56 4f 47 4c |\small. | VOGL|
|000003d0| 45 7d 20 20 67 72 61 70 | 68 69 63 73 20 20 6c 69 |E} grap|hics li|
|000003e0| 62 72 61 72 79 2c 20 61 | 6e 64 20 61 73 20 61 20 |brary, a|nd as a |
|000003f0| 72 65 73 75 6c 74 20 20 | 63 61 6e 20 20 68 61 6e |result |can han|
|00000400| 64 6c 65 20 20 63 69 72 | 63 6c 65 73 2c 20 63 75 |dle cir|cles, cu|
|00000410| 72 76 65 73 2c 0a 20 20 | 20 20 20 61 72 63 73 2c |rves,. | arcs,|
|00000420| 20 20 70 61 74 63 68 65 | 73 2c 20 20 61 6e 64 20 | patche|s, and |
|00000430| 70 6f 6c 79 67 6f 6e 73 | 20 69 6e 20 61 20 64 65 |polygons| in a de|
|00000440| 76 69 63 65 20 69 6e 64 | 65 70 65 6e 64 65 6e 74 |vice ind|ependent|
|00000450| 20 66 61 73 68 69 6f 6e | 2e 20 20 53 69 6d 70 6c | fashion|. Simpl|
|00000460| 65 0a 20 20 20 20 20 68 | 69 64 64 65 6e 20 6c 69 |e. h|idden li|
|00000470| 6e 65 20 72 65 6d 6f 76 | 61 6c 20 69 73 20 61 6c |ne remov|al is al|
|00000480| 73 6f 20 61 76 61 69 6c | 61 62 6c 65 20 76 69 61 |so avail|able via|
|00000490| 20 70 6f 6c 79 67 6f 6e | 20 62 61 63 6b 66 61 63 | polygon| backfac|
|000004a0| 69 6e 67 2e 20 20 41 63 | 63 65 73 73 20 20 74 6f |ing. Ac|cess to|
|000004b0| 0a 20 20 20 20 20 68 61 | 72 64 77 61 72 65 20 20 |. ha|rdware |
|000004c0| 74 65 78 74 20 20 61 6e | 64 20 20 64 6f 75 62 6c |text an|d doubl|
|000004d0| 65 20 62 75 66 66 65 72 | 69 6e 67 20 6f 66 20 64 |e buffer|ing of d|
|000004e0| 72 61 77 69 6e 67 73 20 | 64 65 70 65 6e 64 73 20 |rawings |depends |
|000004f0| 6f 6e 20 74 68 65 20 64 | 72 69 76 65 72 2e 0a 20 |on the d|river.. |
|00000500| 20 20 20 20 54 68 65 72 | 65 20 69 73 20 61 6c 73 | Ther|e is als|
|00000510| 6f 20 61 20 5c 46 4f 52 | 54 52 41 4e 5c 20 69 6e |o a \FOR|TRAN\ in|
|00000520| 74 65 72 66 61 63 65 20 | 20 62 75 74 20 20 61 73 |terface | but as|
|00000530| 20 20 69 74 20 67 6f 65 | 73 20 74 68 72 6f 75 67 | it goe|s throug|
|00000540| 68 20 20 74 68 65 20 20 | 43 0a 20 20 20 20 20 72 |h the |C. r|
|00000550| 6f 75 74 69 6e 65 73 20 | 5c 46 4f 52 54 52 41 4e |outines |\FORTRAN|
|00000560| 5c 20 75 73 65 72 73 20 | 61 72 65 20 77 61 72 6e |\ users |are warn|
|00000570| 65 64 20 74 68 61 74 20 | 61 72 72 61 79 73 20 61 |ed that |arrays a|
|00000580| 72 65 20 69 6e 20 72 6f | 77 2d 63 6f 6c 75 6d 6e |re in ro|w-column|
|00000590| 20 6f 72 64 65 72 20 69 | 6e 0a 20 20 20 20 20 43 | order i|n. C|
|000005a0| 2e 20 42 6f 74 68 20 74 | 68 65 20 20 6c 6f 6e 67 |. Both t|he long|
|000005b0| 20 20 5c 46 4f 52 54 52 | 41 4e 5c 20 6e 61 6d 65 | \FORTR|AN\ name|
|000005c0| 73 20 20 61 6e 64 20 20 | 74 68 65 20 73 68 6f 72 |s and |the shor|
|000005d0| 74 65 6e 65 64 20 73 69 | 78 20 63 68 61 72 61 63 |tened si|x charac|
|000005e0| 74 65 72 20 6e 61 6d 65 | 73 0a 20 20 20 20 20 61 |ter name|s. a|
|000005f0| 72 65 20 73 75 70 70 6f | 72 74 65 64 2e 20 20 50 |re suppo|rted. P|
|00000600| 65 6f 70 6c 65 20 69 6e | 74 65 72 65 73 74 65 64 |eople in|terested|
|00000610| 20 69 6e 20 75 73 69 6e | 67 20 20 73 6f 66 74 77 | in usin|g softw|
|00000620| 61 72 65 20 74 65 78 74 | 20 20 73 68 6f 75 6c 64 |are text| should|
|00000630| 20 20 73 65 65 0a 20 20 | 20 20 20 74 68 65 20 68 | see. | the h|
|00000640| 65 72 73 68 65 79 20 6c | 69 62 72 61 72 79 2c 20 |ershey l|ibrary, |
|00000650| 7b 5c 73 6d 61 6c 6c 20 | 48 45 52 53 48 45 59 7d |{\small |HERSHEY}|
|00000660| 28 33 29 2e 20 20 4d 6f | 72 65 20 69 6e 66 6f 72 |(3). Mo|re infor|
|00000670| 6d 61 74 69 6f 6e 20 6f | 6e 20 74 68 65 20 5c 46 |mation o|n the \F|
|00000680| 4f 52 54 52 41 4e 5c 20 | 0a 20 20 20 20 20 69 6e |ORTRAN\ |. in|
|00000690| 74 65 72 66 61 63 65 20 | 69 73 20 63 6f 6e 74 61 |terface |is conta|
|000006a0| 69 6e 65 64 20 69 6e 20 | 7b 5c 65 6d 20 76 6f 67 |ined in |{\em vog|
|000006b0| 6c 2e 64 6f 63 7d 3b 20 | 74 68 65 20 69 6e 74 65 |l.doc}; |the inte|
|000006c0| 72 66 61 63 65 20 64 65 | 73 63 72 69 62 65 64 20 |rface de|scribed |
|000006d0| 68 65 72 65 69 6e 0a 20 | 20 20 20 20 69 73 20 74 |herein. | is t|
|000006e0| 68 65 20 43 20 69 6e 74 | 65 72 66 61 63 65 2e 0a |he C int|erface..|
|000006f0| 0a 20 20 20 20 20 53 6f | 6d 65 20 72 6f 75 74 69 |. So|me routi|
|00000700| 6e 65 73 20 61 72 65 20 | 6f 6e 6c 79 20 61 76 61 |nes are |only ava|
|00000710| 69 6c 61 62 6c 65 20 69 | 6e 20 5c 56 4f 47 4c 2e |ilable i|n \VOGL.|
|00000720| 20 20 49 66 20 20 79 6f | 75 20 20 69 6e 63 6c 75 | If yo|u inclu|
|00000730| 64 65 0a 20 20 20 20 20 | 74 68 65 6d 20 20 69 6e |de. |them in|
|00000740| 20 20 70 72 6f 67 72 61 | 6d 73 20 20 69 74 20 20 | progra|ms it |
|00000750| 69 73 20 20 61 64 76 69 | 73 61 62 6c 65 20 74 6f |is advi|sable to|
|00000760| 20 70 75 74 20 5c 76 65 | 72 62 5e 23 69 66 64 65 | put \ve|rb^#ifde|
|00000770| 66 20 56 4f 47 4c 5e 20 | 2e 2e 2e 0a 20 20 20 20 |f VOGL^ |.... |
|00000780| 20 5c 23 65 6e 64 69 66 | 20 61 72 6f 75 6e 64 20 | \#endif| around |
|00000790| 74 68 65 6d 2e 20 54 68 | 65 20 63 6f 6e 73 74 61 |them. Th|e consta|
|000007a0| 6e 74 20 5c 76 65 72 62 | 5e 56 4f 47 4c 5e 20 69 |nt \verb|^VOGL^ i|
|000007b0| 73 20 64 65 66 69 6e 65 | 64 20 77 68 65 6e 65 76 |s define|d whenev|
|000007c0| 65 72 20 20 61 0a 20 20 | 20 20 20 5c 56 4f 47 4c |er a. | \VOGL|
|000007d0| 5c 20 68 65 61 64 65 72 | 20 66 69 6c 65 20 69 73 |\ header| file is|
|000007e0| 20 69 6e 63 6c 75 64 65 | 64 2e 0a 0a 20 20 20 20 | include|d... |
|000007f0| 20 49 74 20 73 68 6f 75 | 6c 64 20 62 65 20 6e 6f | It shou|ld be no|
|00000800| 74 65 64 20 74 68 61 74 | 20 74 68 65 72 65 20 61 |ted that| there a|
|00000810| 72 65 20 61 20 6e 75 6d | 62 65 72 20 6f 66 20 72 |re a num|ber of r|
|00000820| 6f 75 74 69 6e 65 73 20 | 20 74 68 61 74 0a 20 20 |outines | that. |
|00000830| 20 20 20 74 61 6b 65 20 | 74 68 65 20 74 79 70 65 | take |the type|
|00000840| 20 41 6e 67 6c 65 20 66 | 6f 72 20 73 6f 6d 65 20 | Angle f|or some |
|00000850| 6f 66 20 74 68 65 69 72 | 20 70 61 72 61 6d 65 74 |of their| paramet|
|00000860| 65 72 73 2e 20 41 6c 6c | 20 61 6e 67 6c 65 73 0a |ers. All| angles.|
|00000870| 20 20 20 20 20 73 70 65 | 63 69 66 69 65 64 20 74 | spe|cified t|
|00000880| 68 69 73 20 77 61 79 20 | 61 72 65 20 61 63 74 75 |his way |are actu|
|00000890| 61 6c 6c 79 20 49 6e 74 | 65 67 65 72 20 54 65 6e |ally Int|eger Ten|
|000008a0| 74 68 73 20 20 4f 66 20 | 20 44 65 67 72 65 65 73 |ths Of | Degrees|
|000008b0| 2e 0a 20 20 20 20 20 28 | 44 6f 6e 27 74 20 61 73 |.. (|Don't as|
|000008c0| 6b 21 29 0a 0a 5c 65 6e | 64 7b 61 62 73 74 72 61 |k!)..\en|d{abstra|
|000008d0| 63 74 7d 0a 0a 5c 6e 65 | 77 70 61 67 65 0a 5c 73 |ct}..\ne|wpage.\s|
|000008e0| 65 74 63 6f 75 6e 74 65 | 72 7b 70 61 67 65 7d 7b |etcounte|r{page}{|
|000008f0| 31 7d 0a 5c 72 65 6e 65 | 77 63 6f 6d 6d 61 6e 64 |1}.\rene|wcommand|
|00000900| 7b 5c 74 68 65 70 61 67 | 65 7d 7b 5c 72 6f 6d 61 |{\thepag|e}{\roma|
|00000910| 6e 7b 70 61 67 65 7d 7d | 0a 0a 5c 73 6d 61 6c 6c |n{page}}|..\small|
|00000920| 0a 5c 74 61 62 6c 65 6f | 66 63 6f 6e 74 65 6e 74 |.\tableo|fcontent|
|00000930| 73 0a 5c 6e 6f 72 6d 61 | 6c 73 69 7a 65 0a 5c 6e |s.\norma|lsize.\n|
|00000940| 65 77 70 61 67 65 0a 5c | 73 65 74 63 6f 75 6e 74 |ewpage.\|setcount|
|00000950| 65 72 7b 70 61 67 65 7d | 7b 31 7d 0a 5c 72 65 6e |er{page}|{1}.\ren|
|00000960| 65 77 63 6f 6d 6d 61 6e | 64 7b 5c 74 68 65 70 61 |ewcomman|d{\thepa|
|00000970| 67 65 7d 7b 5c 61 72 61 | 62 69 63 7b 70 61 67 65 |ge}{\ara|bic{page|
|00000980| 7d 7d 0a 0a 5c 73 65 63 | 74 69 6f 6e 7b 49 6e 63 |}}..\sec|tion{Inc|
|00000990| 6c 75 64 65 20 46 69 6c | 65 73 7d 0a 20 20 20 20 |lude Fil|es}. |
|000009a0| 20 54 68 65 72 65 20 61 | 72 65 20 74 77 6f 20 69 | There a|re two i|
|000009b0| 6e 63 6c 75 64 65 20 66 | 69 6c 65 73 20 70 72 6f |nclude f|iles pro|
|000009c0| 76 69 64 65 64 20 77 69 | 74 68 20 76 6f 67 6c 3a |vided wi|th vogl:|
|000009d0| 20 20 5c 76 65 72 62 60 | 76 6f 67 6c 2e 68 60 20 | \verb`|vogl.h` |
|000009e0| 20 61 6e 64 0a 20 20 20 | 20 20 5c 76 65 72 62 60 | and. | \verb`|
|000009f0| 76 6f 64 65 76 69 63 65 | 2e 68 60 2e 20 20 20 54 |vodevice|.h`. T|
|00000a00| 68 65 20 20 66 69 6c 65 | 20 20 5c 76 65 72 62 60 |he file| \verb`|
|00000a10| 76 6f 67 6c 2e 68 60 20 | 68 61 73 20 74 68 65 20 |vogl.h` |has the |
|00000a20| 74 79 70 65 20 64 65 66 | 69 6e 69 74 69 6f 6e 73 |type def|initions|
|00000a30| 20 61 6e 64 0a 20 20 20 | 20 20 66 75 6e 63 74 69 | and. | functi|
|00000a40| 6f 6e 20 69 6e 74 65 72 | 66 61 63 65 73 2c 20 69 |on inter|faces, i|
|00000a50| 64 65 61 6c 6c 79 20 69 | 74 20 69 73 20 69 6e 63 |deally i|t is inc|
|00000a60| 6c 75 64 65 64 20 77 68 | 65 72 65 20 79 6f 75 20 |luded wh|ere you |
|00000a70| 20 77 6f 75 6c 64 20 6f | 74 68 65 72 77 69 73 65 | would o|therwise|
|00000a80| 0a 20 20 20 20 20 69 6e | 63 6c 75 64 65 20 20 5c |. in|clude \|
|00000a90| 76 65 72 62 60 67 6c 2e | 68 60 20 6f 6e 20 61 6e |verb`gl.|h` on an|
|00000aa0| 20 53 47 49 2e 20 54 68 | 65 20 66 69 6c 65 20 5c | SGI. Th|e file \|
|00000ab0| 76 65 72 62 60 76 6f 64 | 65 76 69 63 65 2e 68 60 |verb`vod|evice.h`|
|00000ac0| 20 68 61 73 20 74 68 65 | 20 64 65 76 69 63 65 73 | has the| devices|
|00000ad0| 0a 20 20 20 20 20 69 6e | 20 69 74 2c 20 61 6e 64 |. in| it, and|
|00000ae0| 20 69 74 20 69 73 20 69 | 6e 63 6c 75 64 65 64 20 | it is i|ncluded |
|00000af0| 77 68 65 72 65 20 79 6f | 75 20 77 6f 75 6c 64 20 |where yo|u would |
|00000b00| 20 69 6e 63 6c 75 64 65 | 20 20 5c 76 65 72 62 60 | include| \verb`|
|00000b10| 64 65 76 69 63 65 2e 68 | 60 0a 20 20 20 20 20 6f |device.h|`. o|
|00000b20| 6e 20 61 6e 20 53 47 49 | 2e 0a 0a 20 20 20 20 20 |n an SGI|... |
|00000b30| 54 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 69 73 |The foll|owing is|
|00000b40| 20 61 20 62 72 69 65 66 | 20 73 75 6d 6d 61 72 79 | a brief| summary|
|00000b50| 20 6f 66 20 74 68 65 20 | 5c 56 4f 47 4c 5c 20 73 | of the |\VOGL\ s|
|00000b60| 75 62 72 6f 75 74 69 6e | 65 73 2e 0a 0a 0a 5c 73 |ubroutin|es....\s|
|00000b70| 65 63 74 69 6f 6e 7b 44 | 65 76 69 63 65 20 72 6f |ection{D|evice ro|
|00000b80| 75 74 69 6e 65 73 7d 0a | 0a 20 20 5c 62 65 67 69 |utines}.|. \begi|
|00000b90| 6e 7b 64 65 73 63 72 69 | 70 74 69 6f 6e 7d 0a 20 |n{descri|ption}. |
|00000ba0| 20 20 20 20 5c 69 74 65 | 6d 5b 76 6f 69 64 20 76 | \ite|m[void v|
|00000bb0| 69 6e 69 74 5d 7b 28 5c | 73 6d 61 6c 6c 20 63 68 |init]{(\|small ch|
|00000bc0| 61 72 20 2a 64 65 76 69 | 63 65 29 7d 20 5c 5c 0a |ar *devi|ce)} \\.|
|00000bd0| 20 20 20 20 20 5c 69 6e | 64 65 78 7b 76 69 6e 69 | \in|dex{vini|
|00000be0| 74 7d 0a 20 20 20 20 20 | 20 20 20 20 20 54 65 6c |t}. | Tel|
|00000bf0| 6c 20 5c 56 4f 47 4c 5c | 20 77 68 61 74 20 74 68 |l \VOGL\| what th|
|00000c00| 65 20 64 65 76 69 63 65 | 20 69 73 2e 20 54 68 69 |e device| is. Thi|
|00000c10| 73 20 72 6f 75 74 69 6e | 65 20 6e 65 65 64 73 20 |s routin|e needs |
|00000c20| 74 6f 20 20 62 65 0a 20 | 20 20 20 20 20 20 20 20 |to be. | |
|00000c30| 20 63 61 6c 6c 65 64 20 | 20 69 66 20 20 74 68 65 | called | if the|
|00000c40| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 20 76 61 72 | environ|ment var|
|00000c50| 69 61 62 6c 65 20 5c 56 | 44 45 56 49 43 45 5c 20 |iable \V|DEVICE\ |
|00000c60| 69 73 6e 27 74 20 73 65 | 74 2c 0a 20 20 20 20 20 |isn't se|t,. |
|00000c70| 20 20 20 20 20 6f 72 20 | 69 66 20 74 68 65 20 76 | or |if the v|
|00000c80| 61 6c 75 65 20 69 6e 20 | 5c 56 44 45 56 49 43 45 |alue in |\VDEVICE|
|00000c90| 5c 20 69 73 20 6e 6f 74 | 20 74 6f 20 62 65 20 75 |\ is not| to be u|
|00000ca0| 73 65 64 2e 0a 0a 20 20 | 20 20 20 20 20 5c 62 65 |sed... | \be|
|00000cb0| 67 69 6e 7b 65 6e 75 6d | 65 72 61 74 65 7d 0a 20 |gin{enum|erate}. |
|00000cc0| 20 20 20 20 20 20 20 20 | 5c 69 74 65 6d 20 43 75 | |\item Cu|
|00000cd0| 72 72 65 6e 74 20 61 76 | 61 69 6c 61 62 6c 65 20 |rrent av|ailable |
|00000ce0| 64 65 76 69 63 65 73 20 | 61 72 65 3a 0a 20 20 20 |devices |are:. |
|00000cf0| 20 20 20 20 20 20 20 20 | 5c 62 65 67 69 6e 7b 64 | |\begin{d|
|00000d00| 65 73 63 72 69 70 74 69 | 6f 6e 7d 0a 20 20 20 20 |escripti|on}. |
|00000d10| 20 20 20 20 20 20 20 20 | 20 5c 69 74 65 6d 5b 61 | | \item[a|
|00000d20| 6d 69 67 61 5d 20 20 20 | 20 41 6d 69 67 61 20 67 |miga] | Amiga g|
|00000d30| 72 61 70 68 69 63 73 20 | 7b 5c 69 74 20 69 6d 70 |raphics |{\it imp|
|00000d40| 6c 65 6d 65 6e 74 65 64 | 20 62 79 20 44 72 2e 7e |lemented| by Dr.~|
|00000d50| 43 68 61 72 6c 65 73 0a | 20 20 20 20 20 20 20 20 |Charles.| |
|00000d60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000d70| 20 20 20 20 20 45 2e 20 | 43 61 6d 70 62 65 6c 6c | E. |Campbell|
|00000d80| 2c 20 4a 72 2e 7d 0a 20 | 20 20 20 20 20 20 20 20 |, Jr.}. | |
|00000d90| 20 20 20 20 5c 69 74 65 | 6d 5b 61 70 6f 6c 6c 6f | \ite|m[apollo|
|00000da0| 5d 20 20 20 41 70 6f 6c | 6c 6f 20 77 6f 72 6b 73 |] Apol|lo works|
|00000db0| 74 61 74 69 6f 6e 73 0a | 20 20 20 20 20 20 20 20 |tations.| |
|00000dc0| 20 20 20 20 20 5c 69 74 | 65 6d 5b 63 67 61 5d 20 | \it|em[cga] |
|00000dd0| 20 20 20 20 20 49 42 4d | 20 50 43 20 63 67 61 20 | IBM| PC cga |
|00000de0| 67 72 61 70 68 69 63 73 | 20 63 61 72 64 0a 20 20 |graphics| card. |
|00000df0| 20 20 20 20 20 20 20 20 | 20 20 20 5c 69 74 65 6d | | \item|
|00000e00| 5b 64 65 63 58 31 31 5d | 20 20 20 54 68 65 20 64 |[decX11]| The d|
|00000e10| 65 63 73 74 61 74 69 6f | 6e 20 28 6f 6c 64 29 20 |ecstatio|n (old) |
|00000e20| 77 69 6e 64 6f 77 20 6d | 61 6e 61 67 65 72 2e 0a |window m|anager..|
|00000e30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 54 68 69 | | Thi|
|00000e50| 73 20 69 73 20 6f 6e 6c | 79 20 69 6e 63 6c 75 64 |s is onl|y includ|
|00000e60| 65 64 20 69 6e 20 63 61 | 73 65 20 79 6f 75 20 6e |ed in ca|se you n|
|00000e70| 65 65 64 20 69 74 2e 0a | 20 20 20 20 20 20 20 20 |eed it..| |
|00000e80| 20 20 20 20 20 5c 69 74 | 65 6d 5b 64 78 79 5d 20 | \it|em[dxy] |
|00000e90| 20 20 20 20 20 52 6f 6c | 61 6e 64 20 44 58 59 20 | Rol|and DXY |
|00000ea0| 70 6c 6f 74 74 65 72 20 | 6c 61 6e 67 75 61 67 65 |plotter |language|
|00000eb0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 5c 69 |. | \i|
|00000ec0| 74 65 6d 5b 65 67 61 5d | 20 20 20 20 20 20 49 42 |tem[ega]| IB|
|00000ed0| 4d 20 50 43 20 65 67 61 | 20 67 72 61 70 68 69 63 |M PC ega| graphic|
|00000ee0| 73 20 63 61 72 64 0a 20 | 20 20 20 20 20 20 20 20 |s card. | |
|00000ef0| 20 20 20 20 5c 69 74 65 | 6d 5b 68 65 72 63 75 6c | \ite|m[hercul|
|00000f00| 65 73 5d 20 49 42 4d 20 | 50 43 20 68 65 72 63 75 |es] IBM |PC hercu|
|00000f10| 6c 65 73 20 67 72 61 70 | 68 69 63 73 20 63 61 72 |les grap|hics car|
|00000f20| 64 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 5c |d. | \|
|00000f30| 69 74 65 6d 5b 68 70 67 | 6c 5d 20 20 20 20 20 48 |item[hpg|l] H|
|00000f40| 50 20 47 72 61 70 68 69 | 63 73 20 6c 61 6e 67 75 |P Graphi|cs langu|
|00000f50| 61 67 65 20 61 6e 64 20 | 63 6f 6d 70 61 74 69 62 |age and |compatib|
|00000f60| 6c 65 73 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |les. | |
|00000f70| 20 5c 69 74 65 6d 5b 4e | 65 58 54 5d 20 20 20 20 | \item[N|eXT] |
|00000f80| 20 4e 65 58 54 53 74 65 | 70 0a 20 20 20 20 20 20 | NeXTSte|p. |
|00000f90| 20 20 20 20 20 20 20 5c | 69 74 65 6d 5b 70 6f 73 | \|item[pos|
|00000fa0| 74 73 63 72 69 70 74 5d | 20 20 70 6f 73 74 73 63 |tscript]| postsc|
|00000fb0| 72 69 70 74 20 64 65 76 | 69 63 65 73 0a 20 20 20 |ript dev|ices. |
|00000fc0| 20 20 20 20 20 20 20 20 | 20 20 5c 69 74 65 6d 5b | | \item[|
|00000fd0| 70 70 6f 73 74 73 63 72 | 69 70 74 5d 20 70 6f 73 |ppostscr|ipt] pos|
|00000fe0| 74 73 63 72 69 70 74 20 | 64 65 76 69 63 65 73 20 |tscript |devices |
|00000ff0| 28 70 6f 72 74 72 61 69 | 74 20 6d 6f 64 65 29 0a |(portrai|t mode).|
|00001000| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 5c 69 74 | | \it|
|00001010| 65 6d 5b 73 69 67 6d 61 | 5d 20 20 20 20 49 42 4d |em[sigma|] IBM|
|00001020| 20 50 43 20 73 69 67 6d | 61 20 67 72 61 70 68 69 | PC sigm|a graphi|
|00001030| 63 73 20 63 61 72 64 2e | 0a 20 20 20 20 20 20 20 |cs card.|. |
|00001040| 20 20 20 20 20 20 5c 69 | 74 65 6d 5b 73 75 6e 5d | \i|tem[sun]|
|00001050| 20 20 20 20 20 20 53 75 | 6e 20 77 6f 72 6b 73 74 | Su|n workst|
|00001060| 61 74 69 6f 6e 73 20 72 | 75 6e 6e 69 6e 67 20 73 |ations r|unning s|
|00001070| 75 6e 76 69 65 77 0a 20 | 20 20 20 20 20 20 20 20 |unview. | |
|00001080| 20 20 20 20 5c 69 74 65 | 6d 5b 74 65 6b 5d 20 20 | \ite|m[tek] |
|00001090| 20 20 20 20 54 65 6b 74 | 72 6f 6e 69 78 20 34 30 | Tekt|ronix 40|
|000010a0| 31 30 20 61 6e 64 20 63 | 6f 6d 70 61 74 69 62 6c |10 and c|ompatibl|
|000010b0| 65 73 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |es. | |
|000010c0| 5c 69 74 65 6d 5b 76 67 | 61 5d 20 20 20 20 20 20 |\item[vg|a] |
|000010d0| 49 42 4d 20 50 43 20 76 | 67 61 20 67 72 61 70 68 |IBM PC v|ga graph|
|000010e0| 69 63 73 20 63 61 72 64 | 0a 20 20 20 20 20 20 20 |ics card|. |
|000010f0| 20 20 20 20 20 20 5c 69 | 74 65 6d 5b 58 31 31 5d | \i|tem[X11]|
|00001100| 20 20 20 20 20 20 58 20 | 77 69 6e 64 6f 77 73 20 | X |windows |
|00001110| 28 53 55 4e 27 73 20 4f | 70 65 6e 77 69 6e 64 6f |(SUN's O|penwindo|
|00001120| 77 73 20 65 74 63 20 65 | 74 63 29 0a 20 20 20 20 |ws etc e|tc). |
|00001130| 20 20 20 20 20 20 20 5c | 65 6e 64 7b 64 65 73 63 | \|end{desc|
|00001140| 72 69 70 74 69 6f 6e 7d | 0a 0a 20 20 20 20 20 20 |ription}|.. |
|00001150| 20 20 20 20 20 53 75 6e | 2c 20 58 31 31 2c 20 64 | Sun|, X11, d|
|00001160| 65 63 58 31 31 2c 20 61 | 70 6f 6c 6c 6f 2c 20 68 |ecX11, a|pollo, h|
|00001170| 65 72 63 75 6c 65 73 2c | 20 63 67 61 20 61 6e 64 |ercules,| cga and|
|00001180| 20 65 67 61 20 73 75 70 | 70 6f 72 74 20 64 6f 75 | ega sup|port dou|
|00001190| 62 6c 65 20 62 75 66 66 | 65 72 69 6e 67 2e 0a 0a |ble buff|ering...|
|000011a0| 20 20 20 20 20 20 20 20 | 20 5c 69 74 65 6d 20 49 | | \item I|
|000011b0| 66 20 64 65 76 69 63 65 | 20 69 73 20 61 20 5c 4e |f device| is a \N|
|000011c0| 55 4c 4c 5c 20 6f 72 20 | 61 20 6e 75 6c 6c 20 73 |ULL\ or |a null s|
|000011d0| 74 72 69 6e 67 20 74 68 | 65 20 76 61 6c 75 65 0a |tring th|e value.|
|000011e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000011f0| 20 20 20 20 6f 66 20 74 | 68 65 20 65 6e 76 69 72 | of t|he envir|
|00001200| 6f 6e 6d 65 6e 74 20 76 | 61 72 69 61 62 6c 65 20 |onment v|ariable |
|00001210| 5c 56 44 45 56 49 43 45 | 5c 20 69 73 20 74 61 6b |\VDEVICE|\ is tak|
|00001220| 65 6e 20 61 73 20 74 68 | 65 0a 20 20 20 20 20 20 |en as th|e. |
|00001230| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 64 65 | | de|
|00001240| 76 69 63 65 20 74 79 70 | 65 20 74 6f 20 62 65 20 |vice typ|e to be |
|00001250| 6f 70 65 6e 65 64 2e 0a | 0a 20 20 20 20 20 20 20 |opened..|. |
|00001260| 20 20 5c 69 74 65 6d 20 | 61 66 74 65 72 20 69 6e | \item |after in|
|00001270| 69 74 20 69 74 20 69 73 | 20 77 69 73 65 20 74 6f |it it is| wise to|
|00001280| 20 65 78 70 6c 69 63 69 | 74 6c 79 20 63 6c 65 61 | explici|tly clea|
|00001290| 72 20 74 68 65 20 73 63 | 72 65 65 6e 2e 0a 20 20 |r the sc|reen.. |
|000012a0| 20 20 20 20 20 20 20 20 | 20 5c 62 65 67 69 6e 7b | | \begin{|
|000012b0| 76 65 72 62 61 74 69 6d | 7d 0a 20 20 20 20 20 20 |verbatim|}. |
|000012c0| 20 20 20 20 20 20 20 63 | 6f 6c 6f 72 28 42 4c 41 | c|olor(BLA|
|000012d0| 43 4b 29 3b 0a 20 20 20 | 20 20 20 20 20 20 20 20 |CK);. | |
|000012e0| 20 20 63 6c 65 61 72 28 | 29 3b 0a 20 20 20 20 20 | clear(|);. |
|000012f0| 20 20 20 20 20 20 5c 65 | 6e 64 7b 76 65 72 62 61 | \e|nd{verba|
|00001300| 74 69 6d 7d 0a 20 20 20 | 20 20 20 20 20 20 5c 65 |tim}. | \e|
|00001310| 6e 64 7b 65 6e 75 6d 65 | 72 61 74 65 7d 0a 0a 0a |nd{enume|rate}...|
|00001320| 20 20 20 20 20 5c 69 74 | 65 6d 5b 76 6f 69 64 20 | \it|em[void |
|00001330| 67 69 6e 69 74 5d 28 29 | 20 5c 5c 20 5c 69 6e 64 |ginit]()| \\ \ind|
|00001340| 65 78 7b 67 69 6e 69 74 | 7d 0a 09 20 20 20 20 20 |ex{ginit|}.. |
|00001350| 20 4f 70 65 6e 20 74 68 | 65 20 67 72 61 70 68 69 | Open th|e graphi|
|00001360| 63 73 20 64 65 76 69 63 | 65 20 61 6e 64 20 64 6f |cs devic|e and do|
|00001370| 20 74 68 65 20 20 62 61 | 73 69 63 20 20 69 6e 69 | the ba|sic ini|
|00001380| 74 69 61 6c 69 73 61 74 | 69 6f 6e 2e 20 54 68 69 |tialisat|ion. Thi|
|00001390| 73 0a 09 20 20 20 20 20 | 20 72 6f 75 74 69 6e 65 |s.. | routine|
|000013a0| 20 69 73 20 6d 61 72 6b | 65 64 20 66 6f 72 20 6f | is mark|ed for o|
|000013b0| 62 73 6f 6c 65 73 63 65 | 6e 63 65 2e 20 54 68 65 |bsolesce|nce. The|
|000013c0| 20 72 6f 75 74 69 6e 65 | 20 77 69 6e 6f 70 65 6e | routine| winopen|
|000013d0| 20 28 73 65 65 20 62 65 | 6c 6f 77 29 0a 09 20 20 | (see be|low).. |
|000013e0| 20 20 20 20 73 68 6f 75 | 6c 64 20 62 65 20 75 73 | shou|ld be us|
|000013f0| 65 64 20 69 6e 73 74 65 | 61 64 2e 0a 0a 20 20 20 |ed inste|ad... |
|00001400| 20 20 5c 69 74 65 6d 5b | 6c 6f 6e 67 20 77 69 6e | \item[|long win|
|00001410| 6f 70 65 6e 5d 7b 5c 73 | 6d 61 6c 6c 20 28 63 68 |open]{\s|mall (ch|
|00001420| 61 72 20 2a 74 69 74 6c | 65 29 7d 20 5c 5c 20 5c |ar *titl|e)} \\ \|
|00001430| 69 6e 64 65 78 7b 77 69 | 6e 6f 70 65 6e 7d 0a 20 |index{wi|nopen}. |
|00001440| 20 20 20 20 20 20 20 20 | 20 4f 70 65 6e 20 74 68 | | Open th|
|00001450| 65 20 67 72 61 70 68 69 | 63 73 20 64 65 76 69 63 |e graphi|cs devic|
|00001460| 65 20 61 6e 64 20 64 6f | 20 74 68 65 20 20 62 61 |e and do| the ba|
|00001470| 73 69 63 20 20 69 6e 69 | 74 69 61 6c 69 73 61 74 |sic ini|tialisat|
|00001480| 69 6f 6e 2e 0a 20 20 20 | 20 20 20 20 20 20 20 54 |ion.. | T|
|00001490| 68 69 73 20 72 6f 75 74 | 69 6e 65 20 73 68 6f 75 |his rout|ine shou|
|000014a0| 6c 64 20 62 65 20 75 73 | 65 64 20 69 6e 73 74 65 |ld be us|ed inste|
|000014b0| 61 64 20 6f 66 20 67 69 | 6e 69 74 2e 0a 0a 0a 20 |ad of gi|nit.... |
|000014c0| 20 20 20 20 5c 69 74 65 | 6d 5b 76 6f 69 64 20 67 | \ite|m[void g|
|000014d0| 65 78 69 74 5d 7b 5c 73 | 6d 61 6c 6c 20 28 29 7d |exit]{\s|mall ()}|
|000014e0| 20 5c 5c 20 5c 69 6e 64 | 65 78 7b 67 65 78 69 74 | \\ \ind|ex{gexit|
|000014f0| 7d 0a 20 20 20 20 20 20 | 20 20 20 20 52 65 73 65 |}. | Rese|
|00001500| 74 20 74 68 65 20 77 69 | 6e 64 6f 77 2f 74 65 72 |t the wi|ndow/ter|
|00001510| 6d 69 6e 61 6c 20 28 6d | 75 73 74 20 62 65 20 74 |minal (m|ust be t|
|00001520| 68 65 20 6c 61 73 74 20 | 20 5c 56 4f 47 4c 5c 20 |he last | \VOGL\ |
|00001530| 20 72 6f 75 0a 20 20 20 | 20 20 20 20 20 20 20 74 | rou. | t|
|00001540| 69 6e 65 20 63 61 6c 6c | 65 64 29 0a 0a 20 20 20 |ine call|ed).. |
|00001550| 20 20 5c 69 74 65 6d 5b | 76 6f 69 64 20 76 6f 75 | \item[|void vou|
|00001560| 74 70 75 74 5d 7b 5c 73 | 6d 61 6c 6c 20 28 63 68 |tput]{\s|mall (ch|
|00001570| 61 72 20 2a 70 61 74 68 | 29 7d 20 5c 5c 20 5c 69 |ar *path|)} \\ \i|
|00001580| 6e 64 65 78 7b 76 6f 75 | 74 70 75 74 7d 0a 20 20 |ndex{vou|tput}. |
|00001590| 20 20 20 20 20 20 20 20 | 52 65 64 69 72 65 63 74 | |Redirect|
|000015a0| 20 6f 75 74 70 75 74 20 | 66 72 6f 6d 20 7b 5c 65 | output |from {\e|
|000015b0| 6d 20 6e 65 78 74 7d 20 | 20 67 69 6e 69 74 20 20 |m next} | ginit |
|000015c0| 74 6f 20 20 66 69 6c 65 | 20 20 67 69 76 65 6e 20 |to file| given |
|000015d0| 20 62 79 0a 20 20 20 20 | 20 20 20 20 20 20 70 61 | by. | pa|
|000015e0| 74 68 2e 20 54 68 69 73 | 20 72 6f 75 74 69 6e 65 |th. This| routine|
|000015f0| 20 6f 6e 6c 79 20 61 70 | 70 6c 69 65 73 20 74 6f | only ap|plies to|
|00001600| 20 64 65 76 69 63 65 73 | 20 64 72 69 76 65 72 73 | devices| drivers|
|00001610| 20 74 68 61 74 0a 20 20 | 20 20 20 20 20 20 20 20 | that. | |
|00001620| 77 72 69 74 65 20 74 6f | 20 73 74 64 6f 75 74 20 |write to| stdout |
|00001630| 65 2e 67 2e 20 70 6f 73 | 74 73 63 72 69 70 74 20 |e.g. pos|tscript |
|00001640| 61 6e 64 20 68 70 67 6c | 2e 0a 0a 0a 20 20 20 20 |and hpgl|.... |
|00001650| 20 5c 69 74 65 6d 5b 76 | 6f 69 64 20 76 6e 65 77 | \item[v|oid vnew|
|00001660| 64 65 76 5d 7b 5c 73 6d | 61 6c 6c 20 28 63 68 61 |dev]{\sm|all (cha|
|00001670| 72 20 2a 64 65 76 69 63 | 65 29 7d 20 5c 5c 20 5c |r *devic|e)} \\ \|
|00001680| 69 6e 64 65 78 7b 76 6e | 65 77 64 65 76 7d 0a 20 |index{vn|ewdev}. |
|00001690| 20 20 20 20 20 20 20 20 | 20 52 65 69 6e 69 74 69 | | Reiniti|
|000016a0| 61 6c 69 7a 65 20 5c 56 | 4f 47 4c 5c 20 74 6f 20 |alize \V|OGL\ to |
|000016b0| 75 73 65 20 61 20 6e 65 | 77 20 64 65 76 69 63 65 |use a ne|w device|
|000016c0| 20 77 69 74 68 6f 75 74 | 20 20 63 68 61 6e 67 69 | without| changi|
|000016d0| 6e 67 0a 20 20 20 20 20 | 20 20 20 20 20 61 74 74 |ng. | att|
|000016e0| 72 69 62 75 74 65 73 2c | 20 20 76 69 65 77 70 6f |ributes,| viewpo|
|000016f0| 72 74 20 20 65 74 63 2e | 20 20 20 28 65 67 2e 20 |rt etc.| (eg. |
|00001700| 20 77 69 6e 64 6f 77 20 | 61 6e 64 20 76 69 65 77 | window |and view|
|00001710| 70 6f 72 74 0a 20 20 20 | 20 20 20 20 20 20 20 73 |port. | s|
|00001720| 70 65 63 69 66 69 63 61 | 74 69 6f 6e 73 29 0a 0a |pecifica|tions)..|
|00001730| 20 20 20 20 20 5c 69 74 | 65 6d 5b 69 6e 74 20 67 | \it|em[int g|
|00001740| 65 74 70 6c 61 6e 65 73 | 5d 7b 5c 73 6d 61 6c 6c |etplanes|]{\small|
|00001750| 20 28 29 7d 20 5c 5c 20 | 5c 69 6e 64 65 78 7b 67 | ()} \\ |\index{g|
|00001760| 65 74 70 6c 61 6e 65 73 | 7d 0a 20 20 20 20 20 20 |etplanes|}. |
|00001770| 20 20 20 20 52 65 74 75 | 72 6e 73 20 74 68 65 20 | Retu|rns the |
|00001780| 6e 75 6d 62 65 72 20 6f | 66 20 62 69 74 20 70 6c |number o|f bit pl|
|00001790| 61 6e 65 73 20 28 6f 72 | 20 20 63 6f 6c 6f 72 0a |anes (or| color.|
|000017a0| 20 20 20 20 20 20 20 20 | 20 20 70 6c 61 6e 65 73 | | planes|
|000017b0| 29 20 20 66 6f 72 20 20 | 61 20 70 61 72 74 69 63 |) for |a partic|
|000017c0| 75 6c 61 72 20 64 65 76 | 69 63 65 2e 20 54 68 65 |ular dev|ice. The|
|000017d0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 63 6f 6c 6f 72 | number |of color|
|000017e0| 73 0a 20 20 20 20 20 20 | 20 20 20 20 64 69 73 70 |s. | disp|
|000017f0| 6c 61 79 61 62 6c 65 20 | 62 79 20 74 68 65 20 64 |layable |by the d|
|00001800| 65 76 69 63 65 20 69 73 | 20 74 68 65 6e 20 24 32 |evice is| then $2|
|00001810| 5e 7b 28 6e 70 6c 61 6e | 65 73 2d 31 29 7d 24 0a |^{(nplan|es-1)}$.|
|00001820| 20 20 5c 65 6e 64 7b 64 | 65 73 63 72 69 70 74 69 | \end{d|escripti|
|00001830| 6f 6e 7d 0a 0a 0a 5c 73 | 65 63 74 69 6f 6e 7b 52 |on}...\s|ection{R|
|00001840| 6f 75 74 69 6e 65 73 20 | 46 6f 72 20 53 65 74 74 |outines |For Sett|
|00001850| 69 6e 67 20 55 70 20 57 | 69 6e 64 6f 77 73 7d 0a |ing Up W|indows}.|
|00001860| 0a 20 20 20 20 20 53 6f | 6d 65 20 64 65 76 69 63 |. So|me devic|
|00001870| 65 73 20 61 72 65 20 62 | 61 73 69 63 61 6c 6c 79 |es are b|asically|
|00001880| 20 77 69 6e 64 6f 77 20 | 6f 72 69 65 6e 74 61 74 | window |orientat|
|00001890| 65 64 20 2d 20 6c 69 6b | 65 20 20 73 75 6e 76 69 |ed - lik|e sunvi|
|000018a0| 65 77 0a 20 20 20 20 20 | 61 6e 64 20 58 31 31 2e |ew. |and X11.|
|000018b0| 20 59 6f 75 20 63 61 6e | 20 67 69 76 65 20 5c 56 | You can| give \V|
|000018c0| 4f 47 4c 5c 20 73 6f 6d | 65 20 69 6e 66 6f 72 6d |OGL\ som|e inform|
|000018d0| 61 74 69 6f 6e 20 61 62 | 6f 75 74 20 74 68 65 20 |ation ab|out the |
|000018e0| 77 69 6e 64 6f 77 0a 20 | 20 20 20 20 74 68 61 74 |window. | that|
|000018f0| 20 69 74 20 77 69 6c 6c | 20 75 73 65 20 77 69 74 | it will| use wit|
|00001900| 68 20 74 68 65 73 65 20 | 72 6f 75 74 69 6e 65 73 |h these |routines|
|00001910| 2e 20 20 54 68 65 73 65 | 20 63 61 6e 20 20 6d 61 |. These| can ma|
|00001920| 6b 65 20 20 79 6f 75 72 | 0a 20 20 20 20 20 63 6f |ke your|. co|
|00001930| 64 65 20 20 76 65 72 79 | 20 20 64 65 76 69 63 65 |de very| device|
|00001940| 20 20 64 65 70 65 6e 64 | 65 6e 74 2e 20 20 42 6f | depend|ent. Bo|
|00001950| 74 68 20 72 6f 75 74 69 | 6e 65 73 20 74 61 6b 65 |th routi|nes take|
|00001960| 20 61 72 67 75 6d 65 6e | 74 73 0a 20 20 20 20 20 | argumen|ts. |
|00001970| 77 68 69 63 68 20 61 72 | 65 20 69 6e 20 64 65 76 |which ar|e in dev|
|00001980| 69 63 65 20 73 70 61 63 | 65 2e 20 28 30 2c 20 30 |ice spac|e. (0, 0|
|00001990| 29 20 69 73 20 74 68 65 | 20 20 62 6f 74 74 6f 6d |) is the| bottom|
|000019a0| 20 20 6c 65 66 74 20 20 | 68 61 6e 64 0a 20 20 20 | left |hand. |
|000019b0| 20 20 63 6f 72 6e 65 72 | 20 20 69 6e 20 20 64 65 | corner| in de|
|000019c0| 76 69 63 65 20 20 73 70 | 61 63 65 2e 20 54 6f 20 |vice sp|ace. To |
|000019d0| 68 61 76 65 20 61 6e 79 | 20 65 66 66 65 63 74 20 |have any| effect |
|000019e0| 74 68 65 73 65 20 72 6f | 75 74 69 6e 65 73 0a 20 |these ro|utines. |
|000019f0| 20 20 20 20 6d 75 73 74 | 20 62 65 20 63 61 6c 6c | must| be call|
|00001a00| 65 64 20 62 65 66 6f 72 | 65 20 67 69 6e 69 74 20 |ed befor|e ginit |
|00001a10| 6f 72 20 77 69 6e 6f 70 | 65 6e 2e 20 20 46 6f 72 |or winop|en. For|
|00001a20| 20 74 68 65 20 58 31 31 | 20 64 65 76 69 63 65 2c | the X11| device,|
|00001a30| 0a 20 20 20 20 20 61 6e | 20 20 65 6e 74 72 79 20 |. an| entry |
|00001a40| 20 6d 61 79 20 20 62 65 | 20 20 6d 61 64 65 20 69 | may be| made i|
|00001a50| 6e 20 79 6f 75 72 20 2e | 58 64 65 66 61 75 6c 74 |n your .|Xdefault|
|00001a60| 73 20 66 69 6c 65 20 6f | 66 20 74 68 65 20 66 6f |s file o|f the fo|
|00001a70| 72 6d 0a 20 20 20 20 20 | 24 76 6f 67 6c 2e 47 65 |rm. |$vogl.Ge|
|00001a80| 6f 6d 65 74 72 79 20 20 | 3d 31 35 30 78 35 30 30 |ometry |=150x500|
|00001a90| 2b 35 35 30 2b 35 30 24 | 20 28 77 68 65 72 65 20 |+550+50$| (where |
|00001aa0| 20 79 6f 75 20 20 20 73 | 70 65 63 69 66 79 20 20 | you s|pecify |
|00001ab0| 20 79 6f 75 72 0a 20 20 | 20 20 20 67 65 6f 6d 65 | your. | geome|
|00001ac0| 74 72 79 20 61 73 20 79 | 6f 75 20 70 6c 65 61 73 |try as y|ou pleas|
|00001ad0| 65 29 2e 0a 0a 20 20 20 | 20 20 5c 62 65 67 69 6e |e)... | \begin|
|00001ae0| 7b 64 65 73 63 72 69 70 | 74 69 6f 6e 7d 0a 20 20 |{descrip|tion}. |
|00001af0| 20 20 20 5c 69 74 65 6d | 5b 76 6f 69 64 20 70 72 | \item|[void pr|
|00001b00| 65 66 70 6f 73 69 74 69 | 6f 6e 5d 7b 5c 73 6d 61 |efpositi|on]{\sma|
|00001b10| 6c 6c 20 28 6c 6f 6e 67 | 20 78 31 2c 20 6c 6f 6e |ll (long| x1, lon|
|00001b20| 67 20 79 31 2c 20 6c 6f | 6e 67 20 78 32 2c 20 6c |g y1, lo|ng x2, l|
|00001b30| 6f 6e 67 20 79 32 29 7d | 20 5c 5c 0a 20 20 20 20 |ong y2)}| \\. |
|00001b40| 20 5c 69 6e 64 65 78 7b | 70 72 65 66 70 6f 73 69 | \index{|prefposi|
|00001b50| 74 69 6f 6e 7d 0a 20 20 | 20 20 20 20 20 20 20 20 |tion}. | |
|00001b60| 53 70 65 63 69 66 79 20 | 74 68 65 20 70 72 65 66 |Specify |the pref|
|00001b70| 65 72 72 65 64 20 70 6f | 73 69 74 69 6f 6e 20 6f |erred po|sition o|
|00001b80| 66 20 74 68 65 20 77 69 | 6e 64 6f 77 20 6f 70 65 |f the wi|ndow ope|
|00001b90| 6e 65 64 20 20 62 79 0a | 20 20 20 20 20 20 20 20 |ned by.| |
|00001ba0| 20 20 74 68 65 20 7b 5c | 65 6d 20 6e 65 78 74 7d | the {\|em next}|
|00001bb0| 20 77 69 6e 6f 70 65 6e | 2e 0a 0a 20 20 20 20 20 | winopen|... |
|00001bc0| 5c 69 74 65 6d 5b 76 6f | 69 64 20 70 72 65 66 73 |\item[vo|id prefs|
|00001bd0| 69 7a 65 5d 7b 5c 73 6d | 61 6c 6c 20 28 6c 6f 6e |ize]{\sm|all (lon|
|00001be0| 67 20 77 69 64 74 68 2c | 6c 6f 6e 67 20 68 65 69 |g width,|long hei|
|00001bf0| 67 68 74 29 7d 20 5c 5c | 0a 20 20 20 20 20 5c 69 |ght)} \\|. \i|
|00001c00| 6e 64 65 78 7b 70 72 65 | 66 73 69 7a 65 7d 0a 20 |ndex{pre|fsize}. |
|00001c10| 20 20 20 20 20 20 20 20 | 20 53 70 65 63 69 66 79 | | Specify|
|00001c20| 20 74 68 65 20 70 72 65 | 66 65 72 72 65 64 20 77 | the pre|ferred w|
|00001c30| 69 64 74 68 20 61 6e 64 | 20 68 65 69 67 68 74 20 |idth and| height |
|00001c40| 20 6f 66 20 20 74 68 65 | 20 20 77 69 6e 64 6f 77 | of the| window|
|00001c50| 0a 20 20 20 20 20 20 20 | 20 20 20 6f 70 65 6e 65 |. | opene|
|00001c60| 64 20 62 79 20 74 68 65 | 20 2a 6e 65 78 74 2a 20 |d by the| *next* |
|00001c70| 77 69 6e 6f 70 65 6e 2e | 0a 0a 20 20 20 20 20 5c |winopen.|.. \|
|00001c80| 69 74 65 6d 5b 76 6f 69 | 64 20 72 65 73 68 61 70 |item[voi|d reshap|
|00001c90| 65 76 69 65 77 70 6f 72 | 74 5d 7b 5c 73 6d 61 6c |eviewpor|t]{\smal|
|00001ca0| 6c 20 28 29 7d 20 5c 5c | 0a 20 20 20 20 20 5c 69 |l ()} \\|. \i|
|00001cb0| 6e 64 65 78 7b 72 65 73 | 68 61 70 65 76 69 65 77 |ndex{res|hapeview|
|00001cc0| 70 6f 72 74 7d 0a 20 20 | 20 20 20 20 20 20 20 20 |port}. | |
|00001cd0| 54 68 69 73 20 69 73 20 | 6f 63 63 61 73 69 6f 6e |This is |occasion|
|00001ce0| 61 6c 6c 79 20 75 73 65 | 64 20 69 6e 20 49 72 69 |ally use|d in Iri|
|00001cf0| 73 20 47 4c 20 69 66 20 | 61 20 7b 5c 73 6d 61 6c |s GL if |a {\smal|
|00001d00| 6c 20 52 45 44 52 41 57 | 7d 20 20 65 76 65 6e 74 |l REDRAW|} event|
|00001d10| 0a 20 20 20 20 20 20 20 | 20 20 20 72 6f 6c 6c 73 |. | rolls|
|00001d20| 20 20 75 70 2e 20 20 57 | 68 69 6c 65 20 20 5c 56 | up. W|hile \V|
|00001d30| 4f 47 4c 5c 20 69 73 20 | 20 75 6e 6c 69 6b 65 6c |OGL\ is | unlikel|
|00001d40| 79 20 74 6f 20 65 76 65 | 72 20 70 72 6f 76 69 64 |y to eve|r provid|
|00001d50| 65 20 61 0a 20 20 20 20 | 20 20 20 20 20 20 7b 5c |e a. | {\|
|00001d60| 73 6d 61 6c 6c 20 52 45 | 44 52 41 57 7d 20 65 76 |small RE|DRAW} ev|
|00001d70| 65 6e 74 20 74 68 65 20 | 63 61 6c 6c 20 69 73 20 |ent the |call is |
|00001d80| 70 72 6f 76 69 64 65 64 | 20 66 6f 72 20 63 6f 6d |provided| for com|
|00001d90| 70 61 74 69 62 69 6c 69 | 74 79 2e 0a 20 20 20 20 |patibili|ty.. |
|00001da0| 20 5c 65 6e 64 7b 64 65 | 73 63 72 69 70 74 69 6f | \end{de|scriptio|
|00001db0| 6e 7d 0a 0a 0a 5c 73 65 | 63 74 69 6f 6e 7b 47 65 |n}...\se|ction{Ge|
|00001dc0| 6e 65 72 61 6c 20 52 6f | 75 74 69 6e 65 73 7d 0a |neral Ro|utines}.|
|00001dd0| 0a 20 20 20 20 20 5c 62 | 65 67 69 6e 7b 64 65 73 |. \b|egin{des|
|00001de0| 63 72 69 70 74 69 6f 6e | 7d 0a 20 20 20 20 20 5c |cription|}. \|
|00001df0| 69 74 65 6d 5b 76 6f 69 | 64 20 63 6c 65 61 72 5d |item[voi|d clear]|
|00001e00| 7b 5c 73 6d 61 6c 6c 20 | 28 29 7d 20 5c 5c 0a 20 |{\small |()} \\. |
|00001e10| 20 20 20 20 5c 69 6e 64 | 65 78 7b 63 6c 65 61 72 | \ind|ex{clear|
|00001e20| 7d 0a 20 20 20 20 20 20 | 20 20 20 20 43 6c 65 61 |}. | Clea|
|00001e30| 72 73 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 76 |rs the c|urrent v|
|00001e40| 69 65 77 70 6f 72 74 20 | 74 6f 20 74 68 65 20 63 |iewport |to the c|
|00001e50| 75 72 72 65 6e 74 20 63 | 6f 6c 6f 72 2e 0a 0a 20 |urrent c|olor... |
|00001e60| 20 20 20 20 5c 69 74 65 | 6d 5b 76 6f 69 64 20 63 | \ite|m[void c|
|00001e70| 6f 6c 6f 72 5d 7b 5c 73 | 6d 61 6c 6c 20 28 43 6f |olor]{\s|mall (Co|
|00001e80| 6c 6f 72 69 6e 64 65 78 | 20 63 6f 6c 29 7d 20 5c |lorindex| col)} \|
|00001e90| 5c 0a 20 20 20 20 20 5c | 69 6e 64 65 78 7b 63 6f |\. \|index{co|
|00001ea0| 6c 6f 72 7d 0a 20 20 20 | 20 20 20 20 20 20 20 53 |lor}. | S|
|00001eb0| 65 74 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 63 |et the c|urrent c|
|00001ec0| 6f 6c 6f 72 2e 20 54 68 | 65 20 73 74 61 6e 64 61 |olor. Th|e standa|
|00001ed0| 72 64 20 63 6f 6c 6f 72 | 73 20 61 72 65 20 61 73 |rd color|s are as|
|00001ee0| 20 66 6f 6c 6c 6f 77 73 | 3a 0a 0a 20 20 20 20 20 | follows|:.. |
|00001ef0| 20 20 20 20 20 5c 62 65 | 67 69 6e 7b 63 65 6e 74 | \be|gin{cent|
|00001f00| 65 72 7d 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |er}. | |
|00001f10| 5c 62 65 67 69 6e 7b 74 | 61 62 75 6c 61 72 7d 7b |\begin{t|abular}{|
|00001f20| 7c 7c 6c 63 63 7c 6c 63 | 63 7c 6c 63 63 7c 6c 63 |||lcc|lc|c|lcc|lc|
|00001f30| 63 7c 7c 7d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |c||}. | |
|00001f40| 20 5c 68 6c 69 6e 65 5c | 68 6c 69 6e 65 0a 20 20 | \hline\|hline. |
|00001f50| 20 20 20 20 20 20 20 20 | 20 20 62 6c 61 63 6b 20 | | black |
|00001f60| 26 20 3d 20 26 20 30 20 | 26 20 72 65 64 20 20 20 |& = & 0 |& red |
|00001f70| 20 20 26 20 3d 20 26 20 | 31 20 26 20 67 72 65 65 | & = & |1 & gree|
|00001f80| 6e 20 26 20 3d 20 26 20 | 32 20 26 20 79 65 6c 6c |n & = & |2 & yell|
|00001f90| 6f 77 20 26 20 3d 20 26 | 20 33 20 5c 5c 0a 20 20 |ow & = &| 3 \\. |
|00001fa0| 20 20 20 20 20 20 20 20 | 20 20 62 6c 75 65 20 20 | | blue |
|00001fb0| 26 20 3d 20 26 20 34 20 | 26 20 6d 61 67 65 6e 74 |& = & 4 |& magent|
|00001fc0| 61 20 26 20 3d 20 26 20 | 35 20 26 20 63 79 61 6e |a & = & |5 & cyan|
|00001fd0| 20 20 26 20 3d 20 26 20 | 36 20 26 20 77 68 69 74 | & = & |6 & whit|
|00001fe0| 65 20 20 26 20 3d 20 26 | 20 37 20 5c 5c 0a 20 20 |e & = &| 7 \\. |
|00001ff0| 20 20 20 20 20 20 20 20 | 20 20 5c 68 6c 69 6e 65 | | \hline|
|00002000| 5c 68 6c 69 6e 65 0a 20 | 20 20 20 20 20 20 20 20 |\hline. | |
|00002010| 20 20 20 5c 65 6e 64 7b | 74 61 62 75 6c 61 72 7d | \end{|tabular}|
|00002020| 0a 20 20 20 20 20 20 20 | 20 20 20 5c 65 6e 64 7b |. | \end{|
|00002030| 63 65 6e 74 65 72 7d 0a | 0a 20 20 20 20 20 20 20 |center}.|. |
|00002040| 20 20 20 54 68 65 73 65 | 20 61 72 65 20 69 6e 63 | These| are inc|
|00002050| 6c 75 64 65 64 20 69 6e | 20 5c 76 65 72 62 60 76 |luded in| \verb`v|
|00002060| 6f 67 6c 2e 68 60 20 61 | 73 3a 0a 20 20 20 20 20 |ogl.h` a|s:. |
|00002070| 20 20 20 20 20 7b 5c 73 | 6d 61 6c 6c 20 42 4c 41 | {\s|mall BLA|
|00002080| 43 4b 7d 2c 20 7b 5c 73 | 6d 61 6c 6c 20 52 45 44 |CK}, {\s|mall RED|
|00002090| 7d 2c 20 7b 5c 73 6d 61 | 6c 6c 20 47 52 45 45 4e |}, {\sma|ll GREEN|
|000020a0| 7d 2c 20 7b 5c 73 6d 61 | 6c 6c 20 59 45 4c 4c 4f |}, {\sma|ll YELLO|
|000020b0| 57 7d 2c 0a 20 20 20 20 | 20 20 20 20 20 20 7b 5c |W},. | {\|
|000020c0| 73 6d 61 6c 6c 20 42 4c | 55 45 7d 2c 20 7b 5c 73 |small BL|UE}, {\s|
|000020d0| 6d 61 6c 6c 20 4d 41 47 | 45 4e 54 41 7d 2c 20 7b |mall MAG|ENTA}, {|
|000020e0| 5c 73 6d 61 6c 6c 20 43 | 59 41 4e 7d 20 61 6e 64 |\small C|YAN} and|
|000020f0| 20 7b 5c 73 6d 61 6c 6c | 20 57 48 49 54 45 7d 2e | {\small| WHITE}.|
|00002100| 0a 0a 20 20 20 20 20 5c | 69 74 65 6d 5b 76 6f 69 |.. \|item[voi|
|00002110| 64 20 63 6f 6c 6f 72 66 | 5d 7b 5c 73 6d 61 6c 6c |d colorf|]{\small|
|00002120| 20 28 66 6c 6f 61 74 20 | 63 6f 6c 29 7d 20 5c 5c | (float |col)} \\|
|00002130| 0a 20 20 20 20 20 5c 69 | 6e 64 65 78 7b 63 6f 6c |. \i|ndex{col|
|00002140| 6f 72 66 7d 0a 20 20 20 | 20 20 20 20 20 20 20 53 |orf}. | S|
|00002150| 61 6d 65 20 61 73 20 63 | 6f 6c 6f 72 20 6f 6e 6c |ame as c|olor onl|
|00002160| 79 20 69 74 20 74 61 6b | 65 73 20 61 20 66 6c 6f |y it tak|es a flo|
|00002170| 61 74 69 6e 67 20 70 6f | 69 6e 74 20 20 61 72 67 |ating po|int arg|
|00002180| 75 6d 65 6e 74 2e 0a 20 | 20 20 20 20 20 20 20 20 |ument.. | |
|00002190| 20 49 6e 20 20 49 72 69 | 73 20 20 47 4c 20 74 68 | In Iri|s GL th|
|000021a0| 65 72 65 20 61 72 65 20 | 73 6f 6d 65 74 69 6d 65 |ere are |sometime|
|000021b0| 73 20 67 6f 6f 64 20 72 | 65 61 73 6f 6e 73 20 66 |s good r|easons f|
|000021c0| 6f 72 20 75 73 69 6e 67 | 0a 20 20 20 20 20 20 20 |or using|. |
|000021d0| 20 20 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 20 | this |routine |
|000021e0| 6f 76 65 72 20 63 6f 6c | 6f 72 2e 20 53 65 65 20 |over col|or. See |
|000021f0| 74 68 65 20 20 47 4c 20 | 20 6d 61 6e 75 61 6c 20 |the GL | manual |
|00002200| 20 66 6f 72 20 20 6d 6f | 72 65 0a 20 20 20 20 20 | for mo|re. |
|00002210| 20 20 20 20 20 64 65 74 | 61 69 6c 73 2e 0a 0a 20 | det|ails... |
|00002220| 20 20 20 5c 69 74 65 6d | 5b 76 6f 69 64 20 6d 61 | \item|[void ma|
|00002230| 70 63 6f 6c 6f 72 5d 7b | 5c 73 6d 61 6c 6c 20 28 |pcolor]{|\small (|
|00002240| 43 6f 6c 6f 72 69 6e 64 | 65 78 20 69 6e 64 78 2c |Colorind|ex indx,|
|00002250| 73 68 6f 72 74 20 72 65 | 64 2c 73 68 6f 72 74 20 |short re|d,short |
|00002260| 67 72 65 65 6e 2c 73 68 | 6f 72 74 20 62 6c 75 65 |green,sh|ort blue|
|00002270| 29 7d 20 5c 5c 0a 20 20 | 20 20 20 5c 69 6e 64 65 |)} \\. | \inde|
|00002280| 78 7b 6d 61 70 63 6f 6c | 6f 72 7d 0a 20 20 20 20 |x{mapcol|or}. |
|00002290| 20 20 20 20 20 20 53 65 | 74 20 74 68 65 20 63 6f | Se|t the co|
|000022a0| 6c 6f 72 20 6d 61 70 20 | 69 6e 64 65 78 20 69 6e |lor map |index in|
|000022b0| 64 78 20 74 6f 20 74 68 | 65 20 20 63 6f 6c 6f 72 |dx to th|e color|
|000022c0| 20 20 72 65 70 72 65 73 | 65 6e 74 65 64 0a 20 20 | repres|ented. |
|000022d0| 20 20 20 20 20 20 20 20 | 62 79 20 20 28 72 65 64 | |by (red|
|000022e0| 2c 20 67 72 65 65 6e 2c | 20 62 6c 75 65 29 2e 20 |, green,| blue). |
|000022f0| 20 49 66 20 74 68 65 20 | 64 65 76 69 63 65 20 68 | If the |device h|
|00002300| 61 73 20 6e 6f 20 63 6f | 6c 6f 72 20 6d 61 70 0a |as no co|lor map.|
|00002310| 20 20 20 20 20 20 20 20 | 20 20 74 68 69 73 20 63 | | this c|
|00002320| 61 6c 6c 20 64 6f 65 73 | 20 6e 6f 74 68 69 6e 67 |all does| nothing|
|00002330| 2e 0a 0a 20 20 20 20 20 | 5c 69 74 65 6d 5b 76 6f |... |\item[vo|
|00002340| 69 64 20 64 65 66 62 61 | 73 69 73 5d 7b 5c 73 6d |id defba|sis]{\sm|
|00002350| 61 6c 6c 20 28 73 68 6f | 72 74 20 69 64 2c 20 4d |all (sho|rt id, M|
|00002360| 61 74 72 69 78 20 6d 61 | 74 29 7d 20 5c 5c 0a 20 |atrix ma|t)} \\. |
|00002370| 20 20 20 20 5c 69 6e 64 | 65 78 7b 64 65 66 62 61 | \ind|ex{defba|
|00002380| 73 69 73 7d 0a 20 20 20 | 20 20 20 20 20 20 20 44 |sis}. | D|
|00002390| 65 66 69 6e 65 20 62 61 | 73 69 73 20 6e 75 6d 62 |efine ba|sis numb|
|000023a0| 65 72 20 69 64 20 74 6f | 20 62 65 20 74 68 65 20 |er id to| be the |
|000023b0| 6d 61 74 72 69 78 20 6d | 61 74 2e 0a 0a 20 20 20 |matrix m|at... |
|000023c0| 20 20 5c 69 74 65 6d 5b | 76 6f 69 64 20 70 6f 6c | \item[|void pol|
|000023d0| 79 6d 6f 64 65 5d 7b 5c | 73 6d 61 6c 6c 20 28 6c |ymode]{\|small (l|
|000023e0| 6f 6e 67 20 6d 6f 64 65 | 29 7d 20 5c 5c 0a 20 20 |ong mode|)} \\. |
|000023f0| 20 20 20 5c 69 6e 64 65 | 78 7b 70 6f 6c 79 6d 6f | \inde|x{polymo|
|00002400| 64 65 7d 0a 20 20 20 20 | 09 20 20 7b 5c 73 6d 61 |de}. |. {\sma|
|00002410| 6c 6c 20 4e 4f 54 45 7d | 3a 20 46 6f 72 20 74 68 |ll NOTE}|: For th|
|00002420| 69 73 20 63 61 6c 6c 20 | 74 6f 20 68 61 76 65 20 |is call |to have |
|00002430| 61 6e 79 20 65 66 66 65 | 63 74 20 20 69 74 20 20 |any effe|ct it |
|00002440| 6d 75 73 74 20 20 68 61 | 76 65 20 62 65 65 6e 0a |must ha|ve been.|
|00002450| 20 20 20 20 09 20 20 63 | 6f 6e 64 69 74 69 6f 6e | . c|ondition|
|00002460| 61 6c 6c 79 20 20 63 6f | 6d 70 69 6c 69 65 64 20 |ally co|mpilied |
|00002470| 20 69 6e 74 6f 20 20 74 | 68 65 20 6c 69 62 72 61 | into t|he libra|
|00002480| 72 79 2e 20 28 53 65 65 | 20 5c 76 65 72 62 60 70 |ry. (See| \verb`p|
|00002490| 6f 6c 79 67 6f 6e 73 2e | 63 60 20 66 6f 72 0a 20 |olygons.|c` for. |
|000024a0| 20 20 20 09 20 20 64 65 | 74 61 69 6c 73 29 20 20 | . de|tails) |
|000024b0| 43 6f 6e 74 72 6f 6c 20 | 20 20 74 68 65 20 20 20 |Control | the |
|000024c0| 66 69 6c 6c 69 6e 67 20 | 20 20 6f 66 20 70 6f 6c |filling | of pol|
|000024d0| 79 67 6f 6e 73 2e 20 20 | 54 68 65 20 5c 76 65 72 |ygons. |The \ver|
|000024e0| 62 60 6d 6f 64 65 60 0a | 20 20 20 20 09 20 20 6d |b`mode`.| . m|
|000024f0| 75 73 74 20 62 65 20 7b | 5c 73 6d 61 6c 6c 20 50 |ust be {|\small P|
|00002500| 59 4d 5c 5f 4c 49 4e 45 | 7d 2c 20 77 68 69 63 68 |YM\_LINE|}, which|
|00002510| 20 6d 65 61 6e 73 20 6f | 6e 6c 79 20 74 68 65 20 | means o|nly the |
|00002520| 65 64 67 65 73 0a 20 20 | 20 20 09 20 20 6f 66 20 |edges. | . of |
|00002530| 74 68 65 20 70 6f 6c 79 | 67 6f 6e 20 77 69 6c 6c |the poly|gon will|
|00002540| 20 62 65 20 64 72 61 77 | 6e 2c 20 6f 72 20 7b 5c | be draw|n, or {\|
|00002550| 73 6d 61 6c 6c 20 50 59 | 4d 5c 5f 46 49 4c 4c 7d |small PY|M\_FILL}|
|00002560| 2c 20 77 68 69 63 68 20 | 20 6d 65 61 6e 73 0a 20 |, which | means. |
|00002570| 20 20 20 09 20 20 66 69 | 6c 6c 20 74 68 65 20 20 | . fi|ll the |
|00002580| 70 6f 6c 79 67 6f 6e 20 | 20 28 74 68 65 20 64 65 |polygon | (the de|
|00002590| 66 61 75 6c 74 29 2e 20 | 7b 5c 73 6d 61 6c 6c 20 |fault). |{\small |
|000025a0| 50 59 4d 3d 5c 5f 50 4f | 49 4e 54 7d 20 61 6e 64 |PYM=\_PO|INT} and|
|000025b0| 20 7b 5c 73 6d 61 6c 6c | 0a 20 20 20 20 09 20 20 | {\small|. . |
|000025c0| 50 59 4d 5c 5f 48 4f 4c | 4c 4f 57 7d 20 61 72 65 |PYM\_HOL|LOW} are|
|000025d0| 20 61 6c 73 6f 20 20 72 | 65 63 6f 67 6e 69 73 65 | also r|ecognise|
|000025e0| 64 20 62 75 74 20 74 68 | 65 79 20 64 6f 6e 27 74 |d but th|ey don't|
|000025f0| 20 62 65 68 61 76 65 20 | 71 75 69 74 65 20 61 73 | behave |quite as|
|00002600| 20 74 68 65 79 0a 20 20 | 20 20 09 20 20 77 6f 75 | they. | . wou|
|00002610| 6c 64 20 77 69 74 68 20 | 7b 5c 73 6d 61 6c 6c 20 |ld with |{\small |
|00002620| 53 47 49 20 47 4c 7d 2e | 0a 20 20 20 20 20 20 5c |SGI GL}.|. \|
|00002630| 65 6e 64 7b 64 65 73 63 | 72 69 70 74 69 6f 6e 7d |end{desc|ription}|
|00002640| 0a 0a 0a 5c 73 65 63 74 | 69 6f 6e 7b 54 68 65 20 |...\sect|ion{The |
|00002650| 44 65 76 69 63 65 20 51 | 75 65 75 65 20 61 6e 64 |Device Q|ueue and|
|00002660| 20 56 61 6c 75 61 74 6f | 72 20 52 6f 75 74 69 6e | Valuato|r Routin|
|00002670| 65 73 7d 0a 0a 20 20 20 | 20 20 54 68 65 20 61 76 |es}.. | The av|
|00002680| 61 69 6c 61 62 6c 65 20 | 20 64 65 76 69 63 65 73 |ailable | devices|
|00002690| 20 20 61 72 65 20 20 64 | 65 66 69 6e 65 64 20 20 | are d|efined |
|000026a0| 69 6e 20 20 74 68 65 20 | 20 68 65 61 64 65 72 20 |in the | header |
|000026b0| 20 66 69 6c 65 73 0a 20 | 20 20 20 20 7b 5c 65 6d | files. | {\em|
|000026c0| 20 76 6f 64 65 76 69 63 | 65 2e 68 7d 2e 0a 0a 20 | vodevic|e.h}... |
|000026d0| 20 20 20 20 5c 62 65 67 | 69 6e 7b 64 65 73 63 72 | \beg|in{descr|
|000026e0| 69 70 74 69 6f 6e 7d 0a | 20 20 20 20 20 5c 69 74 |iption}.| \it|
|000026f0| 65 6d 5b 76 6f 69 64 20 | 71 64 65 76 69 63 65 5d |em[void |qdevice]|
|00002700| 7b 5c 73 6d 61 6c 6c 20 | 28 44 65 76 69 63 65 20 |{\small |(Device |
|00002710| 64 65 76 29 7d 20 5c 5c | 0a 20 20 20 20 20 5c 69 |dev)} \\|. \i|
|00002720| 6e 64 65 78 7b 71 64 65 | 76 69 63 65 7d 0a 20 20 |ndex{qde|vice}. |
|00002730| 20 20 20 20 20 20 20 20 | 45 6e 61 62 6c 65 20 61 | |Enable a|
|00002740| 20 64 65 76 69 63 65 2e | 20 4e 6f 74 65 3a 20 69 | device.| Note: i|
|00002750| 6e 20 5c 56 4f 47 4c 5c | 20 74 68 65 20 71 75 65 |n \VOGL\| the que|
|00002760| 75 65 20 69 73 20 6f 66 | 20 6c 65 6e 67 74 68 20 |ue is of| length |
|00002770| 31 2e 0a 0a 20 20 20 20 | 20 5c 69 74 65 6d 5b 76 |1... | \item[v|
|00002780| 6f 69 64 20 75 6e 71 64 | 65 76 69 63 65 5d 7b 5c |oid unqd|evice]{\|
|00002790| 73 6d 61 6c 6c 20 28 44 | 65 76 69 63 65 20 64 65 |small (D|evice de|
|000027a0| 76 29 7d 20 5c 5c 0a 20 | 20 20 20 20 5c 69 6e 64 |v)} \\. | \ind|
|000027b0| 65 78 7b 75 6e 71 64 65 | 76 69 63 65 7d 0a 20 20 |ex{unqde|vice}. |
|000027c0| 20 20 20 20 20 20 20 20 | 44 69 73 61 62 6c 65 20 | |Disable |
|000027d0| 61 20 64 65 76 69 63 65 | 2e 0a 0a 20 20 20 20 20 |a device|... |
|000027e0| 5c 69 74 65 6d 5b 6c 6f | 6e 67 20 71 72 65 61 64 |\item[lo|ng qread|
|000027f0| 5d 7b 5c 73 6d 61 6c 6c | 20 28 73 68 6f 72 74 20 |]{\small| (short |
|00002800| 2a 64 61 74 61 29 7d 20 | 5c 5c 0a 20 20 20 20 20 |*data)} |\\. |
|00002810| 5c 69 6e 64 65 78 7b 71 | 72 65 61 64 7d 0a 20 20 |\index{q|read}. |
|00002820| 20 20 20 20 20 20 20 20 | 52 65 61 64 20 61 6e 20 | |Read an |
|00002830| 65 76 65 6e 74 20 66 72 | 6f 6d 20 20 74 68 65 20 |event fr|om the |
|00002840| 20 64 65 76 69 63 65 20 | 20 71 75 65 75 65 2e 20 | device | queue. |
|00002850| 20 54 68 69 73 20 20 72 | 6f 75 74 69 6e 65 73 0a | This r|outines.|
|00002860| 20 20 20 20 20 20 20 20 | 20 20 62 6c 6f 63 6b 73 | | blocks|
|00002870| 20 20 75 6e 74 69 6c 20 | 20 73 6f 6d 65 74 68 69 | until | somethi|
|00002880| 6e 67 20 68 61 70 70 65 | 6e 73 2e 20 4e 6f 74 65 |ng happe|ns. Note|
|00002890| 3a 20 69 74 20 69 73 20 | 69 6d 70 6f 72 74 61 6e |: it is |importan|
|000028a0| 74 0a 20 20 20 20 20 20 | 20 20 20 20 74 6f 20 68 |t. | to h|
|000028b0| 61 76 65 20 63 61 6c 6c | 65 64 20 71 64 65 76 69 |ave call|ed qdevi|
|000028c0| 63 65 20 62 65 66 6f 72 | 65 20 64 6f 69 6e 67 20 |ce befor|e doing |
|000028d0| 74 68 69 73 2e 0a 0a 20 | 20 20 20 20 5c 69 74 65 |this... | \ite|
|000028e0| 6d 5b 42 6f 6f 6c 65 61 | 6e 20 69 73 71 75 65 75 |m[Boolea|n isqueu|
|000028f0| 65 64 5d 7b 5c 73 6d 61 | 6c 6c 20 28 44 65 76 69 |ed]{\sma|ll (Devi|
|00002900| 63 65 20 64 65 76 29 7d | 20 5c 5c 0a 20 20 20 20 |ce dev)}| \\. |
|00002910| 20 5c 69 6e 64 65 78 7b | 69 73 71 75 65 75 65 64 | \index{|isqueued|
|00002920| 7d 0a 20 20 20 20 20 20 | 20 20 20 20 43 68 65 63 |}. | Chec|
|00002930| 6b 20 74 6f 20 73 65 65 | 20 69 66 20 64 65 76 69 |k to see| if devi|
|00002940| 63 65 20 64 65 76 20 69 | 73 20 65 6e 61 62 6c 65 |ce dev i|s enable|
|00002950| 64 20 66 6f 72 20 71 75 | 65 75 65 69 6e 67 2e 0a |d for qu|eueing..|
|00002960| 0a 20 20 20 20 20 5c 69 | 74 65 6d 5b 42 6f 6f 6c |. \i|tem[Bool|
|00002970| 65 61 6e 20 71 74 65 73 | 74 5d 7b 5c 73 6d 61 6c |ean qtes|t]{\smal|
|00002980| 6c 20 28 29 7d 20 5c 5c | 0a 20 20 20 20 20 5c 69 |l ()} \\|. \i|
|00002990| 6e 64 65 78 7b 71 74 65 | 73 74 7d 0a 20 20 20 20 |ndex{qte|st}. |
|000029a0| 20 20 20 20 20 20 43 68 | 65 63 6b 20 69 66 20 74 | Ch|eck if t|
|000029b0| 68 65 72 65 20 69 73 20 | 61 6e 79 74 68 69 6e 67 |here is |anything|
|000029c0| 20 69 6e 20 74 68 65 20 | 71 75 65 75 65 2e 20 4e | in the |queue. N|
|000029d0| 6f 74 65 3a 20 69 6e 20 | 20 56 4f 47 4c 0a 20 20 |ote: in | VOGL. |
|000029e0| 20 20 20 20 20 20 20 20 | 74 68 65 20 71 75 65 75 | |the queu|
|000029f0| 65 20 69 73 20 6f 6e 6c | 79 20 31 20 65 6e 74 72 |e is onl|y 1 entr|
|00002a00| 79 20 64 65 65 70 2e 0a | 0a 20 20 20 20 20 5c 69 |y deep..|. \i|
|00002a10| 74 65 6d 5b 76 6f 69 64 | 20 71 72 65 73 65 74 5d |tem[void| qreset]|
|00002a20| 7b 5c 73 6d 61 6c 6c 20 | 28 29 7d 20 5c 5c 0a 20 |{\small |()} \\. |
|00002a30| 20 20 20 20 5c 69 6e 64 | 65 78 7b 71 72 65 73 65 | \ind|ex{qrese|
|00002a40| 74 7d 0a 20 20 20 20 20 | 20 20 20 20 20 52 65 73 |t}. | Res|
|00002a50| 65 74 20 74 68 65 20 64 | 65 76 69 63 65 20 71 75 |et the d|evice qu|
|00002a60| 65 75 65 2e 20 54 68 69 | 73 20 77 69 6c 6c 20 67 |eue. Thi|s will g|
|00002a70| 65 74 20 72 69 64 20 6f | 66 20 61 6e 79 20 20 70 |et rid o|f any p|
|00002a80| 65 6e 64 69 6e 67 20 65 | 76 65 6e 74 73 2e 0a 0a |ending e|vents...|
|00002a90| 20 20 20 20 20 5c 69 74 | 65 6d 5b 42 6f 6f 6c 65 | \it|em[Boole|
|00002aa0| 61 6e 20 67 65 74 62 75 | 74 74 6f 6e 5d 7b 5c 73 |an getbu|tton]{\s|
|00002ab0| 6d 61 6c 6c 20 28 44 65 | 76 69 63 65 20 64 65 76 |mall (De|vice dev|
|00002ac0| 29 7d 20 5c 5c 0a 20 20 | 20 20 20 5c 69 6e 64 65 |)} \\. | \inde|
|00002ad0| 78 7b 67 65 74 62 75 74 | 74 6f 6e 7d 0a 20 20 20 |x{getbut|ton}. |
|00002ae0| 20 20 20 20 20 20 20 52 | 65 74 75 72 6e 73 20 74 | R|eturns t|
|00002af0| 68 65 20 75 70 20 28 30 | 29 20 6f 72 20 64 6f 77 |he up (0|) or dow|
|00002b00| 6e 20 28 31 29 20 73 74 | 61 74 65 20 6f 66 20 61 |n (1) st|ate of a|
|00002b10| 20 62 75 74 74 6f 6e 2e | 0a 0a 20 20 20 20 20 5c | button.|.. \|
|00002b20| 69 74 65 6d 5b 6c 6f 6e | 67 20 67 65 74 76 61 6c |item[lon|g getval|
|00002b30| 75 61 74 6f 72 5d 7b 5c | 73 6d 61 6c 6c 20 28 44 |uator]{\|small (D|
|00002b40| 65 76 69 63 65 20 64 65 | 76 29 7d 20 5c 5c 0a 20 |evice de|v)} \\. |
|00002b50| 20 20 20 20 5c 69 6e 64 | 65 78 7b 67 65 74 76 61 | \ind|ex{getva|
|00002b60| 6c 75 61 74 6f 72 7d 0a | 20 20 20 20 20 20 20 20 |luator}.| |
|00002b70| 20 20 52 65 74 75 72 6e | 20 74 68 65 20 63 75 72 | Return| the cur|
|00002b80| 72 65 6e 74 20 76 61 6c | 75 65 20 6f 66 20 74 68 |rent val|ue of th|
|00002b90| 65 20 76 61 6c 75 61 74 | 6f 72 2e 20 43 75 72 72 |e valuat|or. Curr|
|00002ba0| 65 6e 74 6c 79 20 74 68 | 65 0a 20 20 20 20 20 20 |ently th|e. |
|00002bb0| 20 20 20 20 6f 6e 6c 79 | 20 76 61 6c 75 61 74 6f | only| valuato|
|00002bc0| 72 73 20 73 75 70 70 6f | 72 74 65 64 20 61 72 65 |rs suppo|rted are|
|00002bd0| 20 7b 5c 73 6d 61 6c 6c | 20 4d 4f 55 53 45 58 7d | {\small| MOUSEX}|
|00002be0| 20 61 6e 64 20 7b 5c 73 | 6d 61 6c 6c 20 4d 4f 55 | and {\s|mall MOU|
|00002bf0| 53 45 59 7d 2e 0a 20 20 | 20 20 20 5c 65 6e 64 7b |SEY}.. | \end{|
|00002c00| 64 65 73 63 72 69 70 74 | 69 6f 6e 7d 0a 0a 0a 5c |descript|ion}...\|
|00002c10| 73 65 63 74 69 6f 6e 7b | 56 69 65 77 70 6f 72 74 |section{|Viewport|
|00002c20| 20 52 6f 75 74 69 6e 65 | 73 7d 0a 0a 20 20 20 20 | Routine|s}.. |
|00002c30| 20 5c 62 65 67 69 6e 7b | 64 65 73 63 72 69 70 74 | \begin{|descript|
|00002c40| 69 6f 6e 7d 0a 20 20 20 | 20 20 5c 69 74 65 6d 5b |ion}. | \item[|
|00002c50| 76 6f 69 64 20 76 69 65 | 77 70 6f 72 74 5d 20 7b |void vie|wport] {|
|00002c60| 5c 73 6d 61 6c 6c 20 28 | 53 63 72 65 65 6e 63 6f |\small (|Screenco|
|00002c70| 6f 72 64 20 6c 65 66 74 | 2c 20 53 63 72 65 65 6e |ord left|, Screen|
|00002c80| 63 6f 6f 72 64 20 72 69 | 67 68 74 2c 0a 20 20 20 |coord ri|ght,. |
|00002c90| 20 20 5c 69 6e 64 65 78 | 7b 76 69 65 77 70 6f 72 | \index|{viewpor|
|00002ca0| 74 7d 0a 20 20 20 20 20 | 20 20 53 63 72 65 65 6e |t}. | Screen|
|00002cb0| 63 6f 6f 72 64 20 62 6f | 74 74 6f 6d 2c 20 53 63 |coord bo|ttom, Sc|
|00002cc0| 72 65 65 6e 63 6f 6f 72 | 64 20 74 6f 70 29 7d 20 |reencoor|d top)} |
|00002cd0| 5c 5c 0a 20 20 20 20 20 | 20 20 20 20 20 53 70 65 |\\. | Spe|
|00002ce0| 63 69 66 79 20 77 68 69 | 63 68 20 70 61 72 74 20 |cify whi|ch part |
|00002cf0| 6f 66 20 74 68 65 20 20 | 73 63 72 65 65 6e 20 20 |of the |screen |
|00002d00| 74 6f 20 20 64 72 61 77 | 20 20 69 6e 2e 20 20 4c |to draw| in. L|
|00002d10| 65 66 74 2c 0a 20 20 20 | 20 20 20 20 20 20 20 72 |eft,. | r|
|00002d20| 69 67 68 74 2c 20 20 62 | 6f 74 74 6f 6d 2c 20 20 |ight, b|ottom, |
|00002d30| 61 6e 64 20 20 74 6f 70 | 20 20 61 72 65 20 69 6e |and top| are in|
|00002d40| 74 65 67 65 72 20 76 61 | 6c 75 65 73 20 69 6e 20 |teger va|lues in |
|00002d50| 73 63 72 65 65 6e 0a 20 | 20 20 20 20 20 20 20 20 |screen. | |
|00002d60| 20 63 6f 6f 72 64 69 6e | 61 74 65 73 2e 0a 0a 20 | coordin|ates... |
|00002d70| 20 20 20 20 5c 69 74 65 | 6d 5b 76 6f 69 64 20 70 | \ite|m[void p|
|00002d80| 75 73 68 76 69 65 77 70 | 6f 72 74 5d 7b 5c 73 6d |ushviewp|ort]{\sm|
|00002d90| 61 6c 6c 20 28 29 7d 20 | 5c 5c 0a 20 20 20 20 20 |all ()} |\\. |
|00002da0| 5c 69 6e 64 65 78 7b 70 | 75 73 68 76 69 65 77 70 |\index{p|ushviewp|
|00002db0| 6f 72 74 7d 0a 20 20 20 | 20 20 20 20 20 20 20 53 |ort}. | S|
|00002dc0| 61 76 65 20 63 75 72 72 | 65 6e 74 20 76 69 65 77 |ave curr|ent view|
|00002dd0| 70 6f 72 74 20 6f 6e 20 | 74 68 65 20 76 69 65 77 |port on |the view|
|00002de0| 70 6f 72 74 20 73 74 61 | 63 6b 2e 0a 0a 20 20 20 |port sta|ck... |
|00002df0| 20 20 5c 69 74 65 6d 5b | 76 6f 69 64 20 70 6f 70 | \item[|void pop|
|00002e00| 76 69 65 77 70 6f 72 74 | 5d 7b 5c 73 6d 61 6c 6c |viewport|]{\small|
|00002e10| 20 28 29 7d 20 5c 5c 0a | 20 20 20 20 20 5c 69 6e | ()} \\.| \in|
|00002e20| 64 65 78 7b 70 6f 70 76 | 69 65 77 70 6f 72 74 7d |dex{popv|iewport}|
|00002e30| 0a 20 20 20 20 20 20 20 | 20 20 20 52 65 74 72 69 |. | Retri|
|00002e40| 65 76 65 20 6c 61 73 74 | 20 70 75 73 68 65 64 20 |eve last| pushed |
|00002e50| 76 69 65 77 70 6f 72 74 | 2e 0a 0a 20 20 20 20 20 |viewport|... |
|00002e60| 5c 69 74 65 6d 5b 76 6f | 69 64 20 67 65 74 76 69 |\item[vo|id getvi|
|00002e70| 65 77 70 6f 72 74 5d 7b | 5c 73 6d 61 6c 6c 20 28 |ewport]{|\small (|
|00002e80| 53 63 72 65 65 6e 63 6f | 6f 72 64 20 2a 6c 65 66 |Screenco|ord *lef|
|00002e90| 74 2c 20 53 63 72 65 65 | 6e 63 6f 6f 72 64 20 2a |t, Scree|ncoord *|
|00002ea0| 72 69 67 68 74 2c 0a 20 | 20 20 20 20 5c 69 6e 64 |right,. | \ind|
|00002eb0| 65 78 7b 67 65 74 76 69 | 65 77 70 6f 72 74 7d 0a |ex{getvi|ewport}.|
|00002ec0| 20 20 20 20 20 20 20 53 | 63 72 65 65 6e 63 6f 6f | S|creencoo|
|00002ed0| 72 64 20 2a 62 6f 74 74 | 6f 6d 2c 20 53 63 72 65 |rd *bott|om, Scre|
|00002ee0| 65 6e 63 6f 6f 72 64 20 | 2a 74 6f 70 29 7d 20 5c |encoord |*top)} \|
|00002ef0| 5c 0a 20 20 20 20 20 20 | 20 20 20 20 52 65 74 75 |\. | Retu|
|00002f00| 72 6e 73 20 74 68 65 20 | 6c 65 66 74 2c 20 72 69 |rns the |left, ri|
|00002f10| 67 68 74 2c 20 62 6f 74 | 74 6f 6d 20 61 6e 64 20 |ght, bot|tom and |
|00002f20| 74 6f 70 20 6c 69 6d 69 | 74 73 20 20 6f 66 20 20 |top limi|ts of |
|00002f30| 74 68 65 0a 20 20 20 20 | 20 20 20 20 20 20 63 75 |the. | cu|
|00002f40| 72 72 65 6e 74 20 76 69 | 65 77 70 6f 72 74 20 69 |rrent vi|ewport i|
|00002f50| 6e 20 73 63 72 65 65 6e | 20 63 6f 6f 72 64 69 6e |n screen| coordin|
|00002f60| 61 74 65 73 2e 0a 20 20 | 20 20 20 5c 65 6e 64 7b |ates.. | \end{|
|00002f70| 64 65 73 63 72 69 70 74 | 69 6f 6e 7d 0a 0a 0a 5c |descript|ion}...\|
|00002f80| 73 65 63 74 69 6f 6e 7b | 41 74 74 72 69 62 75 74 |section{|Attribut|
|00002f90| 65 20 53 74 61 63 6b 20 | 52 6f 75 74 69 6e 65 73 |e Stack |Routines|
|00002fa0| 7d 0a 20 20 20 20 20 54 | 68 65 20 61 74 74 72 69 |}. T|he attri|
|00002fb0| 62 75 74 65 20 73 74 61 | 63 6b 20 63 6f 6e 74 61 |bute sta|ck conta|
|00002fc0| 69 6e 73 20 64 65 74 61 | 69 6c 73 20 73 75 63 68 |ins deta|ils such|
|00002fd0| 20 61 73 20 63 75 72 72 | 65 6e 74 20 20 63 6f 6c | as curr|ent col|
|00002fe0| 6f 72 2c 0a 20 20 20 20 | 20 61 6e 64 20 20 74 68 |or,. | and th|
|00002ff0| 65 20 20 63 75 72 72 65 | 6e 74 20 66 6f 6e 74 20 |e curre|nt font |
|00003000| 6e 75 6d 62 65 72 2e 20 | 49 66 20 79 6f 75 20 6e |number. |If you n|
|00003010| 65 65 64 20 74 6f 20 70 | 72 65 76 65 6e 74 20 6f |eed to p|revent o|
|00003020| 62 6a 65 63 74 0a 20 20 | 20 20 20 63 61 6c 6c 73 |bject. | calls|
|00003030| 20 66 6f 72 6d 20 63 68 | 61 6e 67 69 6e 67 20 74 | form ch|anging t|
|00003040| 68 65 73 65 2c 20 20 75 | 73 65 20 20 70 75 73 68 |hese, u|se push|
|00003050| 61 74 74 72 69 62 75 74 | 65 73 20 20 62 65 66 6f |attribut|es befo|
|00003060| 72 65 20 20 74 68 65 0a | 20 20 20 20 20 63 61 6c |re the.| cal|
|00003070| 6c 20 61 6e 64 20 70 6f | 70 61 74 74 72 69 62 75 |l and po|pattribu|
|00003080| 74 65 73 20 61 66 74 65 | 72 2e 0a 0a 20 20 20 20 |tes afte|r... |
|00003090| 20 5c 62 65 67 69 6e 7b | 64 65 73 63 72 69 70 74 | \begin{|descript|
|000030a0| 69 6f 6e 7d 0a 20 20 20 | 20 20 5c 69 74 65 6d 5b |ion}. | \item[|
|000030b0| 76 6f 69 64 20 70 75 73 | 68 61 74 74 72 69 62 75 |void pus|hattribu|
|000030c0| 74 65 73 5d 7b 5c 73 6d | 61 6c 6c 20 28 29 7d 20 |tes]{\sm|all ()} |
|000030d0| 5c 5c 0a 20 20 20 20 20 | 5c 69 6e 64 65 78 7b 70 |\\. |\index{p|
|000030e0| 75 73 68 61 74 74 72 69 | 62 75 74 65 73 7d 0a 20 |ushattri|butes}. |
|000030f0| 20 20 20 20 20 20 20 20 | 20 53 61 76 65 20 74 68 | | Save th|
|00003100| 65 20 63 75 72 72 65 6e | 74 20 61 74 74 72 69 62 |e curren|t attrib|
|00003110| 75 74 65 73 20 6f 6e 20 | 74 68 65 20 61 74 74 72 |utes on |the attr|
|00003120| 69 62 75 74 65 20 73 74 | 61 63 6b 2e 0a 0a 20 20 |ibute st|ack... |
|00003130| 20 20 20 5c 69 74 65 6d | 5b 76 6f 69 64 20 70 6f | \item|[void po|
|00003140| 70 61 74 74 72 69 62 75 | 74 65 73 5d 7b 5c 73 6d |pattribu|tes]{\sm|
|00003150| 61 6c 6c 20 28 29 7d 20 | 5c 5c 0a 20 20 20 20 20 |all ()} |\\. |
|00003160| 5c 69 6e 64 65 78 7b 70 | 6f 70 61 74 74 72 69 62 |\index{p|opattrib|
|00003170| 75 74 65 73 7d 0a 20 20 | 20 20 20 20 20 20 20 20 |utes}. | |
|00003180| 52 65 73 74 6f 72 65 20 | 74 68 65 20 61 74 74 72 |Restore |the attr|
|00003190| 69 62 75 74 65 73 20 74 | 6f 20 77 68 61 74 20 74 |ibutes t|o what t|
|000031a0| 68 65 79 20 77 65 72 65 | 20 20 61 74 20 20 74 68 |hey were| at th|
|000031b0| 65 20 20 6c 61 73 74 0a | 20 20 20 20 20 20 20 20 |e last.| |
|000031c0| 20 20 70 75 73 68 61 74 | 74 72 69 62 75 74 65 28 | pushat|tribute(|
|000031d0| 29 2e 0a 20 20 20 20 20 | 5c 65 6e 64 7b 64 65 73 |).. |\end{des|
|000031e0| 63 72 69 70 74 69 6f 6e | 7d 0a 0a 0a 5c 73 65 63 |cription|}...\sec|
|000031f0| 74 69 6f 6e 7b 50 72 6f | 6a 65 63 74 69 6f 6e 20 |tion{Pro|jection |
|00003200| 52 6f 75 74 69 6e 65 73 | 7d 0a 0a 20 20 20 20 20 |Routines|}.. |
|00003210| 41 6c 6c 20 74 68 65 20 | 70 72 6f 6a 65 63 74 69 |All the |projecti|
|00003220| 6f 6e 20 20 72 6f 75 74 | 69 6e 65 73 20 20 64 65 |on rout|ines de|
|00003230| 66 69 6e 65 20 20 61 20 | 20 6e 65 77 20 20 74 72 |fine a | new tr|
|00003240| 61 6e 73 66 6f 72 6d 61 | 74 69 6f 6e 20 6d 61 74 |ansforma|tion mat|
|00003250| 72 69 78 2c 20 20 61 6e | 64 0a 20 20 20 20 20 63 |rix, an|d. c|
|00003260| 6f 6e 73 65 71 75 65 6e | 74 6c 79 20 74 68 65 20 |onsequen|tly the |
|00003270| 77 6f 72 6c 64 20 75 6e | 69 74 73 2e 20 50 61 72 |world un|its. Par|
|00003280| 61 6c 6c 65 6c 20 70 72 | 6f 6a 65 63 74 69 6f 6e |allel pr|ojection|
|00003290| 73 20 61 72 65 20 64 65 | 66 69 6e 65 64 20 62 79 |s are de|fined by|
|000032a0| 20 6f 72 74 68 6f 0a 20 | 20 20 20 20 6f 72 20 20 | ortho. | or |
|000032b0| 6f 72 74 68 6f 32 2e 20 | 20 50 65 72 73 70 65 63 |ortho2. | Perspec|
|000032c0| 74 69 76 65 20 20 70 72 | 6f 6a 65 63 74 69 6f 6e |tive pr|ojection|
|000032d0| 73 20 20 63 61 6e 20 62 | 65 20 20 64 65 66 69 6e |s can b|e defin|
|000032e0| 65 64 20 62 79 20 70 65 | 72 73 70 65 63 74 69 76 |ed by pe|rspectiv|
|000032f0| 65 20 61 6e 64 0a 20 20 | 20 20 20 77 69 6e 64 6f |e and. | windo|
|00003300| 77 2e 20 20 4e 6f 74 65 | 20 74 68 65 20 74 79 70 |w. Note| the typ|
|00003310| 65 73 20 41 6e 67 6c 65 | 2c 20 65 74 63 2c 20 61 |es Angle|, etc, a|
|00003320| 72 65 20 64 65 66 69 6e | 65 64 20 69 6e 20 76 6f |re defin|ed in vo|
|00003330| 67 6c 2e 68 2e 20 52 65 | 6d 65 6d 62 65 72 20 61 |gl.h. Re|member a|
|00003340| 6e 67 6c 65 73 0a 20 20 | 20 20 20 61 72 65 20 69 |ngles. | are i|
|00003350| 6e 20 74 65 6e 74 68 73 | 20 6f 66 20 64 65 67 72 |n tenths| of degr|
|00003360| 65 65 73 2e 0a 0a 20 20 | 20 20 20 5c 62 65 67 69 |ees... | \begi|
|00003370| 6e 7b 64 65 73 63 72 69 | 70 74 69 6f 6e 7d 0a 20 |n{descri|ption}. |
|00003380| 20 20 20 20 5c 69 74 65 | 6d 5b 76 6f 69 64 20 6f | \ite|m[void o|
|00003390| 72 74 68 6f 5d 7b 5c 73 | 6d 61 6c 6c 20 28 43 6f |rtho]{\s|mall (Co|
|000033a0| 6f 72 64 20 6c 65 66 74 | 2c 20 43 6f 6f 72 64 20 |ord left|, Coord |
|000033b0| 72 69 67 68 74 2c 20 43 | 6f 6f 72 64 20 62 6f 74 |right, C|oord bot|
|000033c0| 74 6f 6d 2c 20 43 6f 6f | 72 64 20 74 6f 70 2c 0a |tom, Coo|rd top,.|
|000033d0| 20 20 20 20 20 5c 69 6e | 64 65 78 7b 6f 72 74 68 | \in|dex{orth|
|000033e0| 6f 7d 0a 20 20 20 20 20 | 20 20 43 6f 6f 72 64 20 |o}. | Coord |
|000033f0| 6e 65 61 72 5c 5f 66 64 | 2c 43 6f 6f 72 64 20 66 |near\_fd|,Coord f|
|00003400| 61 72 5c 5f 64 29 7d 20 | 5c 5c 0a 20 20 20 20 20 |ar\_d)} |\\. |
|00003410| 20 20 20 20 20 44 65 66 | 69 6e 65 20 78 20 28 6c | Def|ine x (l|
|00003420| 65 66 74 2c 20 72 69 67 | 68 74 29 2c 20 79 20 28 |eft, rig|ht), y (|
|00003430| 62 6f 74 74 6f 6d 2c 20 | 74 6f 70 29 2c 20 61 6e |bottom, |top), an|
|00003440| 64 20 20 7a 20 20 28 6e | 65 61 72 2c 0a 20 20 20 |d z (n|ear,. |
|00003450| 20 20 20 20 20 20 20 66 | 61 72 29 20 20 63 6c 69 | f|ar) cli|
|00003460| 70 70 69 6e 67 20 70 6c | 61 6e 65 73 2e 20 54 68 |pping pl|anes. Th|
|00003470| 65 20 6e 65 61 72 20 61 | 6e 64 20 66 61 72 20 63 |e near a|nd far c|
|00003480| 6c 69 70 70 69 6e 67 20 | 70 6c 61 6e 65 73 0a 20 |lipping |planes. |
|00003490| 20 20 20 20 20 20 20 20 | 20 61 72 65 20 61 63 74 | | are act|
|000034a0| 75 61 6c 6c 79 20 73 70 | 65 63 69 66 69 65 64 20 |ually sp|ecified |
|000034b0| 61 73 20 64 69 73 74 61 | 6e 63 65 73 20 61 6c 6f |as dista|nces alo|
|000034c0| 6e 67 20 74 68 65 20 20 | 6c 69 6e 65 20 20 6f 66 |ng the |line of|
|000034d0| 0a 20 20 20 20 20 20 20 | 20 20 20 73 69 67 68 74 |. | sight|
|000034e0| 2e 20 20 54 68 65 73 65 | 20 20 64 69 73 74 61 6e |. These| distan|
|000034f0| 63 65 73 20 20 63 61 6e | 20 20 61 6c 73 6f 20 20 |ces can| also |
|00003500| 62 65 20 20 6e 65 67 61 | 74 69 76 65 2e 20 20 54 |be nega|tive. T|
|00003510| 68 65 0a 20 20 20 20 20 | 20 20 20 20 20 61 63 74 |he. | act|
|00003520| 75 61 6c 20 6c 6f 63 61 | 74 69 6f 6e 20 6f 66 20 |ual loca|tion of |
|00003530| 74 68 65 20 63 6c 69 70 | 70 69 6e 67 20 70 6c 61 |the clip|ping pla|
|00003540| 6e 65 73 20 69 73 20 7a | 20 20 3d 20 20 2d 6e 65 |nes is z| = -ne|
|00003550| 61 72 5c 5f 64 0a 20 20 | 20 20 20 20 20 20 20 20 |ar\_d. | |
|00003560| 61 6e 64 20 7a 20 3d 20 | 2d 66 61 72 5c 5f 64 2e |and z = |-far\_d.|
|00003570| 0a 0a 20 20 20 20 20 5c | 69 74 65 6d 5b 76 6f 69 |.. \|item[voi|
|00003580| 64 20 6f 72 74 68 6f 32 | 5d 7b 5c 73 6d 61 6c 6c |d ortho2|]{\small|
|00003590| 20 28 43 6f 6f 72 64 20 | 6c 65 66 74 2c 43 6f 6f | (Coord |left,Coo|
|000035a0| 72 64 20 72 69 67 68 74 | 2c 43 6f 6f 72 64 20 62 |rd right|,Coord b|
|000035b0| 6f 74 74 6f 6d 2c 43 6f | 6f 72 64 20 74 6f 70 29 |ottom,Co|ord top)|
|000035c0| 7d 20 5c 5c 0a 20 20 20 | 20 20 5c 69 6e 64 65 78 |} \\. | \index|
|000035d0| 7b 6f 72 74 68 6f 32 7d | 0a 20 20 20 20 20 20 20 |{ortho2}|. |
|000035e0| 20 20 20 44 65 66 69 6e | 65 20 78 20 28 6c 65 66 | Defin|e x (lef|
|000035f0| 74 2c 20 72 69 67 68 74 | 29 2c 20 61 6e 64 20 79 |t, right|), and y|
|00003600| 20 20 28 62 6f 74 74 6f | 6d 2c 20 20 74 6f 70 29 | (botto|m, top)|
|00003610| 20 20 63 6c 69 70 70 69 | 6e 67 0a 20 20 20 20 20 | clippi|ng. |
|00003620| 20 20 20 20 20 70 6c 61 | 6e 65 73 2e 0a 0a 20 20 | pla|nes... |
|00003630| 20 20 20 5c 69 74 65 6d | 5b 76 6f 69 64 20 70 65 | \item|[void pe|
|00003640| 72 73 70 65 63 74 69 76 | 65 5d 7b 5c 73 6d 61 6c |rspectiv|e]{\smal|
|00003650| 6c 20 28 41 6e 67 6c 65 | 20 66 6f 76 2c 66 6c 6f |l (Angle| fov,flo|
|00003660| 61 74 20 61 73 70 65 63 | 74 2c 43 6f 6f 72 64 20 |at aspec|t,Coord |
|00003670| 6e 65 61 72 2c 43 6f 6f | 72 64 20 66 61 72 29 7d |near,Coo|rd far)}|
|00003680| 20 5c 5c 0a 20 20 20 20 | 20 5c 69 6e 64 65 78 7b | \\. | \index{|
|00003690| 70 65 72 73 70 65 63 74 | 69 76 65 7d 0a 09 20 20 |perspect|ive}.. |
|000036a0| 53 70 65 63 69 66 79 20 | 61 20 70 65 72 73 70 65 |Specify |a perspe|
|000036b0| 63 74 69 76 65 20 76 69 | 65 77 69 6e 67 20 70 79 |ctive vi|ewing py|
|000036c0| 72 61 6d 69 64 20 69 6e | 20 77 6f 72 6c 64 20 20 |ramid in| world |
|000036d0| 63 6f 6f 72 64 69 6e 61 | 74 65 73 20 20 62 79 0a |coordina|tes by.|
|000036e0| 09 20 20 67 69 76 69 6e | 67 20 61 20 66 69 65 6c |. givin|g a fiel|
|000036f0| 64 20 6f 66 20 76 69 65 | 77 2c 20 61 73 70 65 63 |d of vie|w, aspec|
|00003700| 74 20 72 61 74 69 6f 20 | 61 6e 64 20 74 68 65 20 |t ratio |and the |
|00003710| 64 69 73 74 61 6e 63 65 | 20 66 72 6f 6d 20 74 68 |distance| from th|
|00003720| 65 20 65 79 65 0a 09 20 | 20 6f 66 20 20 74 68 65 |e eye.. | of the|
|00003730| 20 20 6e 65 61 72 20 20 | 61 6e 64 20 20 66 61 72 | near |and far|
|00003740| 20 20 63 6c 69 70 70 69 | 6e 67 20 70 6c 61 6e 65 | clippi|ng plane|
|00003750| 2e 0a 0a 20 20 20 20 20 | 5c 69 74 65 6d 5b 76 6f |... |\item[vo|
|00003760| 69 64 20 77 69 6e 64 6f | 77 5d 7b 5c 73 6d 61 6c |id windo|w]{\smal|
|00003770| 6c 20 28 43 6f 6f 72 64 | 20 6c 65 66 74 2c 43 6f |l (Coord| left,Co|
|00003780| 6f 72 64 20 72 69 67 68 | 74 2c 43 6f 6f 72 64 20 |ord righ|t,Coord |
|00003790| 62 6f 74 2c 43 6f 6f 72 | 64 20 74 6f 70 2c 0a 20 |bot,Coor|d top,. |
|000037a0| 20 20 20 20 5c 69 6e 64 | 65 78 7b 77 69 6e 64 6f | \ind|ex{windo|
|000037b0| 77 7d 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |w}. | |
|000037c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000037d0| 43 6f 6f 72 64 20 6e 65 | 61 72 2c 43 6f 6f 72 64 |Coord ne|ar,Coord|
|000037e0| 20 66 61 72 29 7d 20 5c | 5c 0a 20 20 20 20 20 20 | far)} \|\. |
|000037f0| 20 20 20 20 53 70 65 63 | 69 66 79 20 61 20 70 65 | Spec|ify a pe|
|00003800| 72 73 70 65 63 74 69 76 | 65 20 76 69 65 77 69 6e |rspectiv|e viewin|
|00003810| 67 20 70 79 72 61 6d 69 | 64 20 69 6e 20 77 6f 72 |g pyrami|d in wor|
|00003820| 6c 64 20 63 6f 6f 72 64 | 69 6e 61 74 65 73 20 62 |ld coord|inates b|
|00003830| 79 0a 20 20 20 20 20 20 | 20 20 20 20 67 69 76 69 |y. | givi|
|00003840| 6e 67 20 74 68 65 20 72 | 65 63 74 61 6e 67 6c 65 |ng the r|ectangle|
|00003850| 20 63 6c 6f 73 65 73 74 | 20 74 6f 20 74 68 65 20 | closest| to the |
|00003860| 65 79 65 20 28 69 65 2e | 20 61 74 20 74 68 65 20 |eye (ie.| at the |
|00003870| 6e 65 61 72 20 63 6c 69 | 70 70 69 6e 67 0a 20 20 |near cli|pping. |
|00003880| 20 20 20 20 20 20 20 20 | 70 6c 61 6e 65 29 20 61 | |plane) a|
|00003890| 6e 64 20 74 68 65 20 64 | 69 73 74 61 6e 63 65 73 |nd the d|istances|
|000038a0| 20 74 6f 20 74 68 65 20 | 6e 65 61 72 20 61 6e 64 | to the |near and|
|000038b0| 20 66 61 72 20 63 6c 69 | 70 70 69 6e 67 20 70 6c | far cli|pping pl|
|000038c0| 61 6e 65 73 2e 0a 20 20 | 20 20 20 5c 65 6e 64 7b |anes.. | \end{|
|000038d0| 64 65 73 63 72 69 70 74 | 69 6f 6e 7d 0a 0a 0a 5c |descript|ion}...\|
|000038e0| 73 65 63 74 69 6f 6e 7b | 4d 61 74 72 69 78 20 53 |section{|Matrix S|
|000038f0| 74 61 63 6b 20 52 6f 75 | 74 69 6e 65 73 7d 0a 0a |tack Rou|tines}..|
|00003900| 20 20 20 20 20 5c 62 65 | 67 69 6e 7b 64 65 73 63 | \be|gin{desc|
|00003910| 72 69 70 74 69 6f 6e 7d | 0a 20 20 20 20 20 5c 69 |ription}|. \i|
|00003920| 74 65 6d 5b 76 6f 69 64 | 20 70 75 73 68 6d 61 74 |tem[void| pushmat|
|00003930| 72 69 78 5d 7b 5c 73 6d | 61 6c 6c 20 28 29 7d 20 |rix]{\sm|all ()} |
|00003940| 5c 5c 0a 20 20 20 20 20 | 5c 69 6e 64 65 78 7b 70 |\\. |\index{p|
|00003950| 75 73 68 6d 61 74 72 69 | 78 7d 0a 20 20 20 20 20 |ushmatri|x}. |
|00003960| 20 20 20 20 20 53 61 76 | 65 20 74 68 65 20 63 75 | Sav|e the cu|
|00003970| 72 72 65 6e 74 20 74 72 | 61 6e 73 66 6f 72 6d 61 |rrent tr|ansforma|
|00003980| 74 69 6f 6e 20 6d 61 74 | 72 69 78 20 20 6f 6e 20 |tion mat|rix on |
|00003990| 20 74 68 65 20 20 6d 61 | 74 72 69 78 0a 20 20 20 | the ma|trix. |
|000039a0| 20 20 20 20 20 20 20 73 | 74 61 63 6b 2e 0a 0a 20 | s|tack... |
|000039b0| 20 20 20 20 5c 69 74 65 | 6d 5b 76 6f 69 64 20 70 | \ite|m[void p|
|000039c0| 6f 70 6d 61 74 72 69 78 | 5d 7b 5c 73 6d 61 6c 6c |opmatrix|]{\small|
|000039d0| 20 28 29 7d 20 5c 5c 0a | 20 20 20 20 20 5c 69 6e | ()} \\.| \in|
|000039e0| 64 65 78 7b 70 6f 70 6d | 61 74 72 69 78 7d 0a 20 |dex{popm|atrix}. |
|000039f0| 20 20 20 20 20 20 20 20 | 20 52 65 74 72 69 65 76 | | Retriev|
|00003a00| 65 20 74 68 65 20 6c 61 | 73 74 20 6d 61 74 72 69 |e the la|st matri|
|00003a10| 78 20 70 75 73 68 65 64 | 20 61 6e 64 20 6d 61 6b |x pushed| and mak|
|00003a20| 65 20 69 74 20 74 68 65 | 20 63 75 72 72 65 6e 74 |e it the| current|
|00003a30| 0a 20 20 20 20 20 20 20 | 20 20 20 74 72 61 6e 73 |. | trans|
|00003a40| 66 6f 72 6d 61 74 69 6f | 6e 20 6d 61 74 72 69 78 |formatio|n matrix|
|00003a50| 2e 0a 20 20 20 20 20 5c | 65 6e 64 7b 64 65 73 63 |.. \|end{desc|
|00003a60| 72 69 70 74 69 6f 6e 7d | 0a 0a 0a 5c 73 65 63 74 |ription}|...\sect|
|00003a70| 69 6f 6e 7b 56 69 65 77 | 70 6f 69 6e 74 20 52 6f |ion{View|point Ro|
|00003a80| 75 74 69 6e 65 73 7d 0a | 0a 20 20 20 20 20 56 69 |utines}.|. Vi|
|00003a90| 65 77 70 6f 69 6e 74 20 | 72 6f 75 74 69 6e 65 73 |ewpoint |routines|
|00003aa0| 20 61 6c 74 65 72 20 74 | 68 65 20 63 75 72 72 65 | alter t|he curre|
|00003ab0| 6e 74 20 74 72 61 6e 66 | 6f 72 6d 61 74 69 6f 6e |nt tranf|ormation|
|00003ac0| 20 6d 61 74 72 69 78 2e | 0a 0a 20 20 20 20 20 5c | matrix.|.. \|
|00003ad0| 62 65 67 69 6e 7b 64 65 | 73 63 72 69 70 74 69 6f |begin{de|scriptio|
|00003ae0| 6e 7d 0a 20 20 20 20 20 | 5c 69 74 65 6d 5b 76 6f |n}. |\item[vo|
|00003af0| 69 64 20 70 6f 6c 61 72 | 76 69 65 77 5d 7b 5c 73 |id polar|view]{\s|
|00003b00| 6d 61 6c 6c 20 28 43 6f | 6f 72 64 20 64 69 73 74 |mall (Co|ord dist|
|00003b10| 2c 41 6e 67 6c 65 20 61 | 7a 69 6d 2c 41 6e 67 6c |,Angle a|zim,Angl|
|00003b20| 65 20 69 6e 63 2c 41 6e | 67 6c 65 20 74 77 69 73 |e inc,An|gle twis|
|00003b30| 74 29 7d 20 5c 5c 0a 20 | 20 20 20 20 5c 69 6e 64 |t)} \\. | \ind|
|00003b40| 65 78 7b 70 6f 6c 61 72 | 76 69 65 77 7d 0a 20 20 |ex{polar|view}. |
|00003b50| 20 20 20 20 20 20 20 20 | 53 70 65 63 69 66 79 20 | |Specify |
|00003b60| 74 68 65 20 76 69 65 77 | 65 72 27 73 20 70 6f 73 |the view|er's pos|
|00003b70| 69 74 69 6f 6e 20 69 6e | 20 70 6f 6c 61 72 20 20 |ition in| polar |
|00003b80| 63 6f 6f 72 64 69 6e 61 | 74 65 73 20 20 62 79 0a |coordina|tes by.|
|00003b90| 20 20 20 20 20 20 20 20 | 20 20 67 69 76 69 6e 67 | | giving|
|00003ba0| 20 20 74 68 65 20 20 64 | 69 73 74 61 6e 63 65 20 | the d|istance |
|00003bb0| 20 66 72 6f 6d 20 20 74 | 68 65 20 76 69 65 77 70 | from t|he viewp|
|00003bc0| 6f 69 6e 74 20 74 6f 20 | 74 68 65 20 77 6f 72 6c |oint to |the worl|
|00003bd0| 64 0a 20 20 20 20 20 20 | 20 20 20 20 6f 72 69 67 |d. | orig|
|00003be0| 69 6e 2c 20 74 68 65 20 | 61 7a 69 6d 75 74 68 61 |in, the |azimutha|
|00003bf0| 6c 20 61 6e 67 6c 65 20 | 69 6e 20 74 68 65 20 78 |l angle |in the x|
|00003c00| 2d 79 20 70 6c 61 6e 65 | 2c 20 20 6d 65 61 73 75 |-y plane|, measu|
|00003c10| 72 65 64 0a 20 20 20 20 | 20 20 20 20 20 20 66 72 |red. | fr|
|00003c20| 6f 6d 20 20 74 68 65 20 | 79 2d 61 78 69 73 2c 20 |om the |y-axis, |
|00003c30| 74 68 65 20 69 6e 63 69 | 64 65 6e 63 65 20 61 6e |the inci|dence an|
|00003c40| 67 6c 65 20 69 6e 20 74 | 68 65 20 79 2d 7a 20 70 |gle in t|he y-z p|
|00003c50| 6c 61 6e 65 2c 0a 20 20 | 20 20 20 20 20 20 20 20 |lane,. | |
|00003c60| 6d 65 61 73 75 72 65 64 | 20 66 72 6f 6d 20 74 68 |measured| from th|
|00003c70| 65 20 7a 2d 61 78 69 73 | 2c 20 61 6e 64 20 74 68 |e z-axis|, and th|
|00003c80| 65 20 74 77 69 73 74 20 | 61 6e 67 6c 65 20 61 62 |e twist |angle ab|
|00003c90| 6f 75 74 20 74 68 65 0a | 20 20 20 20 20 20 20 20 |out the.| |
|00003ca0| 20 20 6c 69 6e 65 20 6f | 66 20 73 69 67 68 74 2e | line o|f sight.|
|00003cb0| 0a 0a 20 20 20 20 20 5c | 69 74 65 6d 5b 76 6f 69 |.. \|item[voi|
|00003cc0| 64 20 6c 6f 6f 6b 61 74 | 5d 7b 5c 73 6d 61 6c 6c |d lookat|]{\small|
|00003cd0| 20 28 43 6f 6f 72 64 20 | 76 78 2c 43 6f 6f 72 64 | (Coord |vx,Coord|
|00003ce0| 20 76 79 2c 43 6f 6f 72 | 64 20 76 7a 2c 43 6f 6f | vy,Coor|d vz,Coo|
|00003cf0| 72 64 20 70 78 2c 43 6f | 6f 72 64 20 70 79 2c 43 |rd px,Co|ord py,C|
|00003d00| 6f 6f 72 64 20 70 7a 2c | 0a 20 20 20 20 20 5c 69 |oord pz,|. \i|
|00003d10| 6e 64 65 78 7b 6c 6f 6f | 6b 61 74 7d 0a 20 20 20 |ndex{loo|kat}. |
|00003d20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003d30| 20 20 20 20 20 20 20 20 | 20 20 41 6e 67 6c 65 20 | | Angle |
|00003d40| 74 77 69 73 74 29 7d 20 | 5c 5c 0a 20 20 20 20 20 |twist)} |\\. |
|00003d50| 20 20 20 20 20 53 70 65 | 63 69 66 79 20 74 68 65 | Spe|cify the|
|00003d60| 20 76 69 65 77 65 72 27 | 73 20 70 6f 73 69 74 69 | viewer'|s positi|
|00003d70| 6f 6e 20 62 79 20 67 69 | 76 69 6e 67 20 61 20 76 |on by gi|ving a v|
|00003d80| 69 65 77 70 6f 69 6e 74 | 20 61 6e 64 0a 20 20 20 |iewpoint| and. |
|00003d90| 20 20 20 20 20 20 20 61 | 20 20 72 65 66 65 72 65 | a| refere|
|00003da0| 6e 63 65 20 20 70 6f 69 | 6e 74 20 69 6e 20 77 6f |nce poi|nt in wo|
|00003db0| 72 6c 64 20 63 6f 6f 72 | 64 69 6e 61 74 65 73 2e |rld coor|dinates.|
|00003dc0| 20 41 20 74 77 69 73 74 | 20 61 62 6f 75 74 0a 20 | A twist| about. |
|00003dd0| 20 20 20 20 20 20 20 20 | 20 74 68 65 20 6c 69 6e | | the lin|
|00003de0| 65 20 6f 66 20 73 69 67 | 68 74 20 6d 61 79 20 61 |e of sig|ht may a|
|00003df0| 6c 73 6f 20 62 65 20 67 | 69 76 65 6e 2e 0a 20 20 |lso be g|iven.. |
|00003e00| 20 20 20 5c 65 6e 64 7b | 64 65 73 63 72 69 70 74 | \end{|descript|
|00003e10| 69 6f 6e 7d 0a 0a 0a 5c | 73 65 63 74 69 6f 6e 7b |ion}...\|section{|
|00003e20| 4d 6f 76 65 20 52 6f 75 | 74 69 6e 65 73 7d 0a 0a |Move Rou|tines}..|
|00003e30| 20 20 20 20 20 54 68 65 | 72 65 20 61 72 65 20 76 | The|re are v|
|00003e40| 61 72 69 61 74 69 6f 6e | 73 20 6f 6e 20 61 6c 6c |ariation|s on all|
|00003e50| 20 74 68 65 73 65 20 72 | 6f 75 74 69 6e 65 73 20 | these r|outines |
|00003e60| 74 68 61 74 20 65 6e 64 | 20 20 69 6e 20 20 7b 5c |that end| in {\|
|00003e70| 69 74 20 73 5c 2f 7d 20 | 61 6e 64 20 20 61 6c 73 |it s\/} |and als|
|00003e80| 6f 20 65 6e 64 0a 20 20 | 20 20 20 69 6e 20 7b 5c |o end. | in {\|
|00003e90| 69 74 20 69 7d 2e 0a 20 | 20 20 20 20 5c 62 65 67 |it i}.. | \beg|
|00003ea0| 69 6e 7b 64 65 73 63 72 | 69 70 74 69 6f 6e 7d 0a |in{descr|iption}.|
|00003eb0| 20 20 20 20 20 5c 69 74 | 65 6d 5b 5c 69 74 20 73 | \it|em[\it s|
|00003ec0| 5c 2f 5d 3a 20 54 68 65 | 73 65 20 76 61 72 69 61 |\/]: The|se varia|
|00003ed0| 74 69 6f 6e 73 20 74 68 | 65 79 20 74 61 6b 65 20 |tions th|ey take |
|00003ee0| 61 72 67 75 6d 65 6e 74 | 73 20 6f 66 20 74 79 70 |argument|s of typ|
|00003ef0| 65 20 7b 5c 69 74 20 53 | 63 6f 6f 72 64 7d 2e 0a |e {\it S|coord}..|
|00003f00| 20 20 20 20 20 5c 69 74 | 65 6d 5b 5c 69 74 20 69 | \it|em[\it i|
|00003f10| 5c 2f 5d 3a 20 54 68 65 | 73 65 20 76 61 72 69 61 |\/]: The|se varia|
|00003f20| 74 69 6f 6e 73 20 74 68 | 65 79 20 74 61 6b 65 20 |tions th|ey take |
|00003f30| 61 72 67 75 6d 65 6e 74 | 73 20 6f 66 20 74 79 70 |argument|s of typ|
|00003f40| 65 20 7b 5c 69 74 20 49 | 63 6f 6f 72 64 7d 2e 0a |e {\it I|coord}..|
|00003f50| 20 20 20 20 20 5c 65 6e | 64 7b 64 65 73 63 72 69 | \en|d{descri|
|00003f60| 70 74 69 6f 6e 7d 0a 0a | 20 20 20 20 20 5c 62 65 |ption}..| \be|
|00003f70| 67 69 6e 7b 64 65 73 63 | 72 69 70 74 69 6f 6e 7d |gin{desc|ription}|
|00003f80| 0a 20 20 20 20 20 5c 69 | 74 65 6d 5b 76 6f 69 64 |. \i|tem[void|
|00003f90| 20 6d 6f 76 65 5d 7b 5c | 73 6d 61 6c 6c 20 28 43 | move]{\|small (C|
|00003fa0| 6f 6f 72 64 20 78 2c 43 | 6f 6f 72 64 20 79 2c 43 |oord x,C|oord y,C|
|00003fb0| 6f 6f 72 64 20 7a 29 7d | 20 5c 5c 0a 20 20 20 20 |oord z)}| \\. |
|00003fc0| 20 5c 69 6e 64 65 78 7b | 6d 6f 76 65 7d 0a 20 20 | \index{|move}. |
|00003fd0| 20 20 20 20 20 20 20 20 | 4d 6f 76 65 20 63 75 72 | |Move cur|
|00003fe0| 72 65 6e 74 20 67 72 61 | 70 68 69 63 73 20 70 6f |rent gra|phics po|
|00003ff0| 73 69 74 69 6f 6e 20 74 | 6f 20 28 78 2c 20 79 2c |sition t|o (x, y,|
|00004000| 20 7a 29 2e 20 28 78 2c | 20 79 2c 20 20 7a 29 0a | z). (x,| y, z).|
|00004010| 20 20 20 20 20 20 20 20 | 20 20 69 73 20 61 20 70 | | is a p|
|00004020| 6f 69 6e 74 20 69 6e 20 | 77 6f 72 6c 64 20 63 6f |oint in |world co|
|00004030| 6f 72 64 69 6e 61 74 65 | 73 2e 0a 0a 20 20 20 20 |ordinate|s... |
|00004040| 20 5c 69 74 65 6d 5b 76 | 6f 69 64 20 72 6d 76 5d | \item[v|oid rmv]|
|00004050| 7b 5c 73 6d 61 6c 6c 20 | 28 43 6f 6f 72 64 20 64 |{\small |(Coord d|
|00004060| 65 6c 74 61 78 2c 43 6f | 6f 72 64 20 64 65 6c 74 |eltax,Co|ord delt|
|00004070| 61 79 2c 43 6f 6f 72 64 | 20 64 65 6c 74 61 7a 29 |ay,Coord| deltaz)|
|00004080| 7d 20 5c 5c 0a 20 20 20 | 20 20 5c 69 6e 64 65 78 |} \\. | \index|
|00004090| 7b 72 6d 76 7d 0a 20 20 | 20 20 20 20 20 20 20 20 |{rmv}. | |
|000040a0| 52 65 6c 61 74 69 76 65 | 20 6d 6f 76 65 2e 20 64 |Relative| move. d|
|000040b0| 65 6c 74 61 78 2c 20 64 | 65 6c 74 61 79 2c 20 61 |eltax, d|eltay, a|
|000040c0| 6e 64 20 64 65 6c 74 61 | 7a 20 20 61 72 65 20 20 |nd delta|z are |
|000040d0| 6f 66 66 73 65 74 73 0a | 20 20 20 20 20 20 20 20 |offsets.| |
|000040e0| 20 20 69 6e 20 77 6f 72 | 6c 64 20 75 6e 69 74 73 | in wor|ld units|
|000040f0| 2e 0a 0a 20 20 20 20 20 | 5c 69 74 65 6d 5b 76 6f |... |\item[vo|
|00004100| 69 64 20 6d 6f 76 65 32 | 5d 7b 5c 73 6d 61 6c 6c |id move2|]{\small|
|00004110| 20 28 43 6f 6f 72 64 20 | 78 2c 43 6f 6f 72 64 20 | (Coord |x,Coord |
|00004120| 79 29 7d 20 5c 5c 0a 20 | 20 20 20 20 5c 69 6e 64 |y)} \\. | \ind|
|00004130| 65 78 7b 6d 6f 76 65 32 | 7d 0a 20 20 20 20 20 20 |ex{move2|}. |
|00004140| 20 20 20 20 4d 6f 76 65 | 20 67 72 61 70 68 69 63 | Move| graphic|
|00004150| 73 20 70 6f 73 69 74 69 | 6f 6e 20 74 6f 20 70 6f |s positi|on to po|
|00004160| 69 6e 74 20 28 78 2c 20 | 79 29 2e 20 20 28 78 2c |int (x, |y). (x,|
|00004170| 20 20 79 29 20 20 69 73 | 20 20 61 0a 20 20 20 20 | y) is| a. |
|00004180| 20 20 20 20 20 20 70 6f | 69 6e 74 20 69 6e 20 77 | po|int in w|
|00004190| 6f 72 6c 64 20 63 6f 6f | 72 64 69 6e 61 74 65 73 |orld coo|rdinates|
|000041a0| 2e 0a 0a 20 20 20 20 20 | 5c 69 74 65 6d 5b 76 6f |... |\item[vo|
|000041b0| 69 64 20 72 6d 76 32 5d | 7b 5c 73 6d 61 6c 6c 20 |id rmv2]|{\small |
|000041c0| 28 43 6f 6f 72 64 20 64 | 65 6c 74 61 78 2c 43 6f |(Coord d|eltax,Co|
|000041d0| 6f 72 64 20 64 65 6c 74 | 61 79 29 7d 20 5c 5c 0a |ord delt|ay)} \\.|
|000041e0| 20 20 20 20 20 5c 69 6e | 64 65 78 7b 72 6d 76 32 | \in|dex{rmv2|
|000041f0| 7d 0a 20 20 20 20 20 20 | 20 20 20 20 52 65 6c 61 |}. | Rela|
|00004200| 74 69 76 65 20 6d 6f 76 | 65 32 2e 20 64 65 6c 74 |tive mov|e2. delt|
|00004210| 61 78 20 61 6e 64 20 64 | 65 6c 74 61 79 20 61 72 |ax and d|eltay ar|
|00004220| 65 20 6f 66 66 73 65 74 | 73 20 69 6e 20 20 77 6f |e offset|s in wo|
|00004230| 72 6c 64 0a 20 20 20 20 | 20 20 20 20 20 20 75 6e |rld. | un|
|00004240| 69 74 73 2e 0a 20 20 20 | 20 20 5c 65 6e 64 7b 64 |its.. | \end{d|
|00004250| 65 73 63 72 69 70 74 69 | 6f 6e 7d 0a 0a 0a 5c 73 |escripti|on}...\s|
|00004260| 65 63 74 69 6f 6e 7b 44 | 72 61 77 69 6e 67 20 52 |ection{D|rawing R|
|00004270| 6f 75 74 69 6e 65 73 7d | 0a 0a 20 20 20 20 20 54 |outines}|.. T|
|00004280| 68 65 72 65 20 61 72 65 | 20 76 61 72 69 61 74 69 |here are| variati|
|00004290| 6f 6e 73 20 6f 6e 20 61 | 6c 6c 20 74 68 65 73 65 |ons on a|ll these|
|000042a0| 20 72 6f 75 74 69 6e 65 | 73 20 74 68 61 74 20 65 | routine|s that e|
|000042b0| 6e 64 20 20 69 6e 20 20 | 7b 5c 69 74 20 73 5c 2f |nd in |{\it s\/|
|000042c0| 7d 20 61 6e 64 20 20 61 | 6c 73 6f 20 65 6e 64 0a |} and a|lso end.|
|000042d0| 20 20 20 20 20 69 6e 20 | 7b 5c 69 74 20 69 7d 2e | in |{\it i}.|
|000042e0| 0a 20 20 20 20 20 5c 62 | 65 67 69 6e 7b 64 65 73 |. \b|egin{des|
|000042f0| 63 72 69 70 74 69 6f 6e | 7d 0a 20 20 20 20 20 5c |cription|}. \|
|00004300| 69 74 65 6d 5b 76 6f 69 | 64 20 64 72 61 77 5d 7b |item[voi|d draw]{|
|00004310| 5c 73 6d 61 6c 6c 20 28 | 43 6f 6f 72 64 20 78 2c |\small (|Coord x,|
|00004320| 43 6f 6f 72 64 20 79 2c | 43 6f 6f 72 64 20 7a 29 |Coord y,|Coord z)|
|00004330| 7d 20 5c 5c 0a 20 20 20 | 20 20 5c 69 6e 64 65 78 |} \\. | \index|
|00004340| 7b 64 72 61 77 7d 0a 09 | 20 20 44 72 61 77 20 66 |{draw}..| Draw f|
|00004350| 72 6f 6d 20 63 75 72 72 | 65 6e 74 20 67 72 61 70 |rom curr|ent grap|
|00004360| 68 69 63 73 20 70 6f 73 | 69 74 69 6f 6e 20 74 6f |hics pos|ition to|
|00004370| 20 28 78 2c 20 79 2c 20 | 20 7a 29 2c 20 61 20 70 | (x, y, | z), a p|
|00004380| 6f 69 6e 74 20 69 6e 20 | 77 6f 72 6c 64 0a 09 20 |oint in |world.. |
|00004390| 20 63 6f 6f 72 64 69 6e | 61 74 65 73 2e 0a 0a 20 | coordin|ates... |
|000043a0| 20 20 20 20 5c 69 74 65 | 6d 5b 76 6f 69 64 20 72 | \ite|m[void r|
|000043b0| 64 72 5d 7b 5c 73 6d 61 | 6c 6c 20 28 43 6f 6f 72 |dr]{\sma|ll (Coor|
|000043c0| 64 20 64 65 6c 74 61 78 | 2c 43 6f 6f 72 64 20 64 |d deltax|,Coord d|
|000043d0| 65 6c 74 61 79 2c 43 6f | 6f 72 64 20 64 65 6c 74 |eltay,Co|ord delt|
|000043e0| 61 7a 29 7d 20 5c 5c 0a | 20 20 20 20 20 5c 69 6e |az)} \\.| \in|
|000043f0| 64 65 78 7b 72 64 72 7d | 0a 20 20 20 20 20 20 20 |dex{rdr}|. |
|00004400| 20 20 20 52 65 6c 61 74 | 69 76 65 20 64 72 61 77 | Relat|ive draw|
|00004410| 2e 20 64 65 6c 74 61 78 | 2c 20 64 65 6c 74 61 79 |. deltax|, deltay|
|00004420| 2c 20 61 6e 64 20 64 65 | 6c 74 61 7a 20 20 61 72 |, and de|ltaz ar|
|00004430| 65 20 20 6f 66 66 73 65 | 74 73 0a 20 20 20 20 20 |e offse|ts. |
|00004440| 20 20 20 20 20 69 6e 20 | 77 6f 72 6c 64 20 75 6e | in |world un|
|00004450| 69 74 73 2e 0a 0a 20 20 | 20 20 20 5c 69 74 65 6d |its... | \item|
|00004460| 5b 76 6f 69 64 20 64 72 | 61 77 32 5d 7b 5c 73 6d |[void dr|aw2]{\sm|
|00004470| 61 6c 6c 20 28 43 6f 6f | 72 64 20 78 2c 43 6f 6f |all (Coo|rd x,Coo|
|00004480| 72 64 20 79 29 7d 20 5c | 5c 0a 20 20 20 20 20 5c |rd y)} \|\. \|
|00004490| 69 6e 64 65 78 7b 64 72 | 61 77 32 7d 0a 20 20 20 |index{dr|aw2}. |
|000044a0| 20 20 20 20 20 20 20 44 | 72 61 77 20 66 72 6f 6d | D|raw from|
|000044b0| 20 63 75 72 72 65 6e 74 | 20 67 72 61 70 68 69 63 | current| graphic|
|000044c0| 73 20 70 6f 73 69 74 69 | 6f 6e 20 74 6f 20 20 70 |s positi|on to p|
|000044d0| 6f 69 6e 74 20 20 28 78 | 2c 20 20 79 29 2e 0a 20 |oint (x|, y).. |
|000044e0| 20 20 20 20 20 20 20 20 | 20 28 78 2c 20 79 29 20 | | (x, y) |
|000044f0| 69 73 20 61 20 70 6f 69 | 6e 74 20 69 6e 20 77 6f |is a poi|nt in wo|
|00004500| 72 6c 64 20 63 6f 6f 72 | 64 69 6e 61 74 65 73 2e |rld coor|dinates.|
|00004510| 0a 0a 20 20 20 20 20 5c | 69 74 65 6d 5b 76 6f 69 |.. \|item[voi|
|00004520| 64 20 72 64 72 32 5d 7b | 5c 73 6d 61 6c 6c 20 28 |d rdr2]{|\small (|
|00004530| 43 6f 6f 72 64 20 64 65 | 6c 74 61 78 2c 43 6f 6f |Coord de|ltax,Coo|
|00004540| 72 64 20 64 65 6c 74 61 | 79 29 7d 20 5c 5c 0a 20 |rd delta|y)} \\. |
|00004550| 20 20 20 20 5c 69 6e 64 | 65 78 7b 72 64 72 32 7d | \ind|ex{rdr2}|
|00004560| 0a 20 20 20 20 20 20 20 | 20 20 20 52 65 6c 61 74 |. | Relat|
|00004570| 69 76 65 20 64 72 61 77 | 32 2e 20 64 65 6c 74 61 |ive draw|2. delta|
|00004580| 78 20 61 6e 64 20 64 65 | 6c 74 61 79 20 61 72 65 |x and de|ltay are|
|00004590| 20 6f 66 66 73 65 74 73 | 20 69 6e 20 20 77 6f 72 | offsets| in wor|
|000045a0| 6c 64 0a 20 20 20 20 20 | 20 20 20 20 20 75 6e 69 |ld. | uni|
|000045b0| 74 73 2e 0a 20 20 20 20 | 20 5c 65 6e 64 7b 64 65 |ts.. | \end{de|
|000045c0| 73 63 72 69 70 74 69 6f | 6e 7d 0a 0a 0a 5c 73 65 |scriptio|n}...\se|
|000045d0| 63 74 69 6f 6e 7b 56 65 | 72 74 65 78 20 63 61 6c |ction{Ve|rtex cal|
|000045e0| 6c 73 7d 0a 0a 20 20 20 | 20 20 54 68 65 72 65 20 |ls}.. | There |
|000045f0| 61 72 65 20 63 61 6c 6c | 73 20 77 68 69 63 68 20 |are call|s which |
|00004600| 77 65 20 74 65 72 6d 20 | 27 76 65 72 74 65 78 20 |we term |'vertex |
|00004610| 20 63 61 6c 6c 73 27 20 | 20 77 68 69 63 68 20 20 | calls' | which |
|00004620| 73 69 6d 70 6c 79 0a 20 | 20 20 20 20 73 70 65 63 |simply. | spec|
|00004630| 69 66 79 20 20 61 20 20 | 70 6f 69 6e 74 20 69 6e |ify a |point in|
|00004640| 20 34 44 2c 20 33 44 20 | 6f 72 20 32 44 2e 20 54 | 4D, 3D |or 2D. T|
|00004650| 68 65 73 65 20 63 61 6c | 6c 73 20 74 61 6b 65 20 |hese cal|ls take |
|00004660| 61 6e 20 61 72 72 61 79 | 0a 20 20 20 20 20 77 68 |an array|. wh|
|00004670| 69 63 68 20 73 70 65 63 | 69 66 69 65 73 20 74 68 |ich spec|ifies th|
|00004680| 65 20 63 6f 6f 72 64 69 | 6e 61 74 65 73 20 6f 66 |e coordi|nates of|
|00004690| 20 74 68 65 20 70 6f 69 | 6e 74 2e 20 54 68 65 20 | the poi|nt. The |
|000046a0| 20 69 6e 74 65 72 70 72 | 65 74 61 74 69 6f 6e 0a | interpr|etation.|
|000046b0| 20 20 20 20 20 6f 66 20 | 74 68 65 73 65 20 70 6f | of |these po|
|000046c0| 69 6e 74 73 20 69 73 20 | 64 65 73 63 72 69 62 65 |ints is |describe|
|000046d0| 64 20 62 65 6c 6f 77 2e | 0a 0a 20 20 20 20 20 5c |d below.|.. \|
|000046e0| 62 65 67 69 6e 7b 64 65 | 73 63 72 69 70 74 69 6f |begin{de|scriptio|
|000046f0| 6e 7d 0a 20 20 20 20 20 | 5c 69 74 65 6d 5b 76 6f |n}. |\item[vo|
|00004700| 69 64 20 76 34 64 5d 7b | 5c 73 6d 61 6c 6c 20 28 |id v4d]{|\small (|
|00004710| 64 6f 75 62 6c 65 20 76 | 5b 34 5d 29 7d 20 5c 5c |double v|[4])} \\|
|00004720| 0a 20 20 20 20 20 5c 69 | 6e 64 65 78 7b 76 34 64 |. \i|ndex{v4d|
|00004730| 7d 0a 20 20 20 20 20 20 | 20 20 20 20 20 53 70 65 |}. | Spe|
|00004740| 63 69 66 79 20 61 20 76 | 65 72 74 65 78 28 70 6f |cify a v|ertex(po|
|00004750| 69 6e 74 29 20 69 6e 20 | 34 44 20 75 73 69 6e 67 |int) in |4D using|
|00004760| 20 64 6f 75 62 6c 65 20 | 20 70 72 65 63 69 73 69 | double | precisi|
|00004770| 6f 6e 0a 20 20 20 20 20 | 20 20 20 20 20 20 6e 75 |on. | nu|
|00004780| 6d 62 65 72 73 2e 0a 0a | 20 20 20 20 20 5c 69 74 |mbers...| \it|
|00004790| 65 6d 5b 76 6f 69 64 20 | 76 34 66 5d 7b 5c 73 6d |em[void |v4f]{\sm|
|000047a0| 61 6c 6c 20 28 66 6c 6f | 61 74 20 76 5b 34 5d 29 |all (flo|at v[4])|
|000047b0| 7d 20 5c 5c 0a 20 20 20 | 20 20 5c 69 6e 64 65 78 |} \\. | \index|
|000047c0| 7b 76 34 66 7d 0a 20 20 | 20 20 20 20 20 20 20 20 |{v4f}. | |
|000047d0| 53 70 65 63 69 66 79 20 | 61 20 76 65 72 74 65 78 |Specify |a vertex|
|000047e0| 28 70 6f 69 6e 74 29 20 | 69 6e 20 34 44 20 75 73 |(point) |in 4D us|
|000047f0| 69 6e 67 20 73 69 6e 67 | 6c 65 20 20 70 72 65 63 |ing sing|le prec|
|00004800| 69 73 69 6f 6e 0a 20 20 | 20 20 20 20 20 20 20 20 |ision. | |
|00004810| 66 6c 6f 61 74 69 6e 67 | 20 70 6f 69 6e 74 20 6e |floating| point n|
|00004820| 75 6d 62 65 72 73 2e 0a | 0a 20 20 20 20 20 5c 69 |umbers..|. \i|
|00004830| 74 65 6d 5b 76 6f 69 64 | 20 76 34 69 5d 7b 5c 73 |tem[void| v4i]{\s|
|00004840| 6d 61 6c 6c 20 28 6c 6f | 6e 67 20 76 5b 34 5d 29 |mall (lo|ng v[4])|
|00004850| 7d 20 5c 5c 0a 20 20 20 | 20 20 5c 69 6e 64 65 78 |} \\. | \index|
|00004860| 7b 76 34 69 7d 0a 20 20 | 20 20 20 20 20 20 20 20 |{v4i}. | |
|00004870| 53 70 65 63 69 66 79 20 | 61 20 76 65 72 74 65 78 |Specify |a vertex|
|00004880| 28 70 6f 69 6e 74 29 20 | 69 6e 20 34 44 20 75 73 |(point) |in 4D us|
|00004890| 69 6e 67 20 69 6e 74 65 | 67 65 72 20 6e 75 6d 62 |ing inte|ger numb|
|000048a0| 65 72 73 0a 0a 20 20 20 | 20 20 5c 69 74 65 6d 5b |ers.. | \item[|
|000048b0| 76 6f 69 64 20 76 34 73 | 5d 7b 5c 73 6d 61 6c 6c |void v4s|]{\small|
|000048c0| 20 28 73 68 6f 72 74 20 | 76 5b 34 5d 29 7d 20 5c | (short |v[4])} \|
|000048d0| 5c 0a 20 20 20 20 20 5c | 69 6e 64 65 78 7b 76 34 |\. \|index{v4|
|000048e0| 73 7d 0a 20 20 20 20 20 | 20 20 20 20 20 53 70 65 |s}. | Spe|
|000048f0| 63 69 66 79 20 61 20 76 | 65 72 74 65 78 28 70 6f |cify a v|ertex(po|
|00004900| 69 6e 74 29 20 69 6e 20 | 20 34 44 20 20 75 73 69 |int) in | 4D usi|
|00004910| 6e 67 20 20 73 68 6f 72 | 74 20 20 69 6e 74 65 67 |ng shor|t integ|
|00004920| 65 72 20 6e 75 6d 62 65 | 72 73 0a 20 20 20 20 20 |er numbe|rs. |
|00004930| 5c 65 6e 64 7b 64 65 73 | 63 72 69 70 74 69 6f 6e |\end{des|cription|
|00004940| 7d 0a 0a 20 20 20 20 20 | 54 68 65 72 65 20 61 72 |}.. |There ar|
|00004950| 65 20 61 6c 73 6f 20 65 | 71 75 69 76 61 6c 65 6e |e also e|quivalen|
|00004960| 74 20 63 61 6c 6c 73 20 | 66 6f 72 20 33 44 20 70 |t calls |for 3D p|
|00004970| 6f 69 6e 74 73 20 28 7b | 5c 69 74 20 76 33 64 2c |oints ({|\it v3d,|
|00004980| 20 76 33 66 2c 20 76 33 | 69 2c 20 76 33 73 5c 2f | v3f, v3|i, v3s\/|
|00004990| 7d 29 0a 20 20 20 20 20 | 61 6e 64 20 32 44 20 70 |}). |and 2D p|
|000049a0| 6f 69 6e 74 73 20 28 7b | 5c 69 74 20 76 32 64 2c |oints ({|\it v2d,|
|000049b0| 20 76 32 66 2c 20 76 32 | 69 2c 20 76 32 73 5c 2f | v2f, v2|i, v2s\/|
|000049c0| 7d 29 2e 20 20 54 68 65 | 20 6f 6e 6c 79 20 64 69 |}). The| only di|
|000049d0| 66 66 65 72 65 6e 63 65 | 20 69 73 20 74 68 65 0a |fference| is the.|
|000049e0| 20 20 20 20 20 6e 75 6d | 62 65 72 20 6f 66 20 65 | num|ber of e|
|000049f0| 6c 65 6d 65 6e 74 73 20 | 74 68 61 74 20 65 61 63 |lements |that eac|
|00004a00| 68 20 76 65 72 74 65 78 | 20 6e 65 65 64 73 20 74 |h vertex| needs t|
|00004a10| 6f 20 62 65 20 73 70 65 | 63 69 66 69 65 64 2e 20 |o be spe|cified. |
|00004a20| 49 74 20 73 68 6f 75 6c | 64 20 61 6c 73 6f 0a 20 |It shoul|d also. |
|00004a30| 20 20 20 20 62 65 20 6e | 6f 74 65 64 20 74 68 65 | be n|oted the|
|00004a40| 20 74 68 65 20 64 69 66 | 66 65 72 65 6e 74 20 64 | the dif|ferent d|
|00004a50| 61 74 61 20 74 79 70 65 | 73 20 28 69 65 2e 7e 64 |ata type|s (ie.~d|
|00004a60| 6f 75 62 6c 65 2c 20 66 | 6c 6f 61 74 2c 20 6c 6f |ouble, f|loat, lo|
|00004a70| 6e 67 20 61 6e 64 0a 20 | 20 20 20 20 73 68 6f 72 |ng and. | shor|
|00004a80| 74 29 20 20 61 72 65 20 | 6d 65 72 65 6c 79 20 64 |t) are |merely d|
|00004a90| 69 66 66 65 72 65 6e 74 | 20 20 77 61 79 73 20 20 |ifferent| ways |
|00004aa0| 6f 66 20 72 65 70 72 65 | 73 65 6e 74 69 6e 67 20 |of repre|senting |
|00004ab0| 20 74 68 65 20 73 61 6d | 65 20 62 61 73 69 63 0a | the sam|e basic.|
|00004ac0| 20 20 20 20 20 63 6f 6f | 72 64 69 6e 61 74 65 20 | coo|rdinate |
|00004ad0| 64 61 74 61 20 28 63 61 | 6c 6c 69 6e 67 20 76 33 |data (ca|lling v3|
|00004ae0| 73 20 77 69 74 68 20 5c | 76 65 72 62 60 76 5b 5d |s with \|verb`v[]|
|00004af0| 20 3d 20 7b 31 30 30 2c | 32 30 30 2c 32 30 30 7d | = {100,|200,200}|
|00004b00| 60 20 69 73 20 74 68 65 | 20 73 61 6d 65 0a 20 20 |` is the| same. |
|00004b10| 20 20 20 61 73 20 63 61 | 6c 6c 69 6e 67 20 76 33 | as ca|lling v3|
|00004b20| 66 20 77 69 74 68 20 5c | 76 65 72 62 60 76 5b 5d |f with \|verb`v[]|
|00004b30| 20 3d 20 7b 31 30 30 2e | 30 2c 20 32 30 30 2e 30 | = {100.|0, 200.0|
|00004b40| 2c 20 32 30 30 2e 30 7d | 60 29 2e 0a 0a 20 20 20 |, 200.0}|`)... |
|00004b50| 20 20 54 68 65 20 77 61 | 79 20 74 68 65 73 65 20 | The wa|y these |
|00004b60| 70 6f 69 6e 74 73 20 61 | 72 65 20 69 6e 74 65 72 |points a|re inter|
|00004b70| 70 72 65 74 65 64 20 64 | 65 70 65 6e 64 73 20 20 |preted d|epends |
|00004b80| 6f 6e 20 20 77 68 61 74 | 20 20 6d 6f 64 65 0a 20 |on what| mode. |
|00004b90| 20 20 20 20 68 61 73 20 | 20 62 65 20 20 73 65 74 | has | be set|
|00004ba0| 20 20 75 70 20 20 77 69 | 74 68 20 20 6f 6e 65 20 | up wi|th one |
|00004bb0| 20 6f 66 20 74 68 65 20 | 63 61 6c 6c 73 20 7b 5c | of the |calls {\|
|00004bc0| 69 74 20 62 67 6e 70 6f | 69 6e 74 2c 20 62 67 6e |it bgnpo|int, bgn|
|00004bd0| 6c 69 6e 65 2c 0a 20 20 | 20 20 20 62 67 6e 63 6c |line,. | bgncl|
|00004be0| 6f 73 65 64 6c 69 6e 65 | 5c 2f 7d 20 6f 72 20 7b |osedline|\/} or {|
|00004bf0| 5c 69 74 20 62 67 6e 70 | 6f 6c 79 67 6f 6e 7d 2e |\it bgnp|olygon}.|
|00004c00| 0a 0a 20 20 20 20 20 5c | 62 65 67 69 6e 7b 64 65 |.. \|begin{de|
|00004c10| 73 63 72 69 70 74 69 6f | 6e 7d 0a 20 20 20 20 20 |scriptio|n}. |
|00004c20| 5c 69 74 65 6d 5b 76 6f | 69 64 20 62 67 6e 70 6f |\item[vo|id bgnpo|
|00004c30| 69 6e 74 5d 7b 5c 73 6d | 61 6c 6c 20 28 29 7d 20 |int]{\sm|all ()} |
|00004c40| 5c 5c 0a 20 20 20 20 20 | 5c 69 6e 64 65 78 7b 62 |\\. |\index{b|
|00004c50| 67 6e 70 6f 69 6e 74 7d | 0a 20 20 20 20 20 20 20 |gnpoint}|. |
|00004c60| 20 20 54 68 65 20 20 62 | 67 6e 70 6f 69 6e 74 20 | The b|gnpoint |
|00004c70| 20 63 61 6c 6c 20 20 73 | 70 65 63 69 66 69 65 73 | call s|pecifies|
|00004c80| 20 74 68 61 74 20 20 74 | 68 65 20 6e 65 78 74 20 | that t|he next |
|00004c90| 73 65 72 69 65 73 20 6f | 66 20 76 65 72 74 65 78 |series o|f vertex|
|00004ca0| 0a 20 20 20 20 20 20 20 | 20 20 63 61 6c 6c 73 20 |. | calls |
|00004cb0| 61 72 65 20 73 70 65 63 | 69 66 79 69 6e 67 20 61 |are spec|ifying a|
|00004cc0| 20 63 68 61 69 6e 20 6f | 66 20 70 6f 69 6e 74 73 | chain o|f points|
|00004cd0| 20 28 64 6f 74 73 29 20 | 74 6f 20 62 65 20 64 72 | (dots) |to be dr|
|00004ce0| 61 77 6e 2e 0a 0a 20 20 | 20 20 20 5c 69 74 65 6d |awn... | \item|
|00004cf0| 5b 76 6f 69 64 20 65 6e | 64 70 6f 69 6e 74 5d 7b |[void en|dpoint]{|
|00004d00| 5c 73 6d 61 6c 6c 20 28 | 29 7d 20 5c 5c 0a 20 20 |\small (|)} \\. |
|00004d10| 20 20 20 5c 69 6e 64 65 | 78 7b 65 6e 64 70 6f 69 | \inde|x{endpoi|
|00004d20| 6e 74 7d 0a 20 20 20 20 | 20 20 20 20 20 41 20 62 |nt}. | A b|
|00004d30| 67 6e 70 6f 69 6e 74 20 | 69 73 20 74 65 72 6d 69 |gnpoint |is termi|
|00004d40| 6e 61 74 65 64 20 20 77 | 69 74 68 20 61 20 65 6e |nated w|ith a en|
|00004d50| 64 70 6f 69 6e 74 20 63 | 61 6c 6c 2e 0a 0a 20 20 |dpoint c|all... |
|00004d60| 20 20 20 5c 69 74 65 6d | 5b 76 6f 69 64 20 62 67 | \item|[void bg|
|00004d70| 6e 6c 69 6e 65 5d 7b 5c | 73 6d 61 6c 6c 20 28 29 |nline]{\|small ()|
|00004d80| 7d 20 5c 5c 0a 20 20 20 | 20 20 5c 69 6e 64 65 78 |} \\. | \index|
|00004d90| 7b 62 67 6e 6c 69 6e 65 | 7d 0a 20 20 20 20 20 20 |{bgnline|}. |
|00004da0| 20 20 20 54 68 65 20 62 | 67 6e 6c 69 6e 65 20 63 | The b|gnline c|
|00004db0| 61 6c 6c 20 73 70 65 63 | 69 66 69 65 73 20 74 68 |all spec|ifies th|
|00004dc0| 61 74 20 74 68 65 20 6e | 65 78 74 20 20 73 65 72 |at the n|ext ser|
|00004dd0| 69 65 73 20 20 6f 66 20 | 20 76 65 72 74 65 78 0a |ies of | vertex.|
|00004de0| 20 20 20 20 20 20 20 20 | 20 63 61 6c 6c 73 20 61 | | calls a|
|00004df0| 72 65 20 73 70 65 63 69 | 66 79 69 6e 67 20 74 68 |re speci|fying th|
|00004e00| 65 20 70 6f 69 6e 74 73 | 20 6f 6e 20 61 20 70 6f |e points| on a po|
|00004e10| 6c 79 6c 69 6e 65 2e 0a | 0a 20 20 20 20 20 5c 69 |lyline..|. \i|
|00004e20| 74 65 6d 5b 76 6f 69 64 | 20 65 6e 64 6c 69 6e 65 |tem[void| endline|
|00004e30| 5d 7b 5c 73 6d 61 6c 6c | 20 28 29 7d 20 5c 5c 0a |]{\small| ()} \\.|
|00004e40| 20 20 20 20 20 5c 69 6e | 64 65 78 7b 65 6e 64 6c | \in|dex{endl|
|00004e50| 69 6e 65 7d 0a 20 20 20 | 20 20 20 20 20 20 41 20 |ine}. | A |
|00004e60| 62 67 6e 6c 69 6e 65 20 | 69 73 20 74 65 72 6d 69 |bgnline |is termi|
|00004e70| 6e 61 74 65 64 20 77 69 | 74 68 20 61 20 65 6e 64 |nated wi|th a end|
|00004e80| 6c 69 6e 65 20 63 61 6c | 6c 2e 0a 0a 20 20 20 20 |line cal|l... |
|00004e90| 20 5c 69 74 65 6d 5b 76 | 6f 69 64 20 62 67 6e 63 | \item[v|oid bgnc|
|00004ea0| 6c 6f 73 65 64 6c 69 6e | 65 5d 7b 5c 73 6d 61 6c |losedlin|e]{\smal|
|00004eb0| 6c 20 28 29 7d 20 5c 5c | 0a 20 20 20 20 20 5c 69 |l ()} \\|. \i|
|00004ec0| 6e 64 65 78 7b 62 67 6e | 63 6c 6f 73 65 64 6c 69 |ndex{bgn|closedli|
|00004ed0| 6e 65 7d 0a 20 20 20 20 | 20 20 20 20 20 54 68 65 |ne}. | The|
|00004ee0| 20 62 67 6e 63 6c 6f 73 | 65 64 6c 69 6e 65 20 63 | bgnclos|edline c|
|00004ef0| 61 6c 6c 20 69 73 20 73 | 69 6d 69 6c 61 72 20 74 |all is s|imilar t|
|00004f00| 6f 20 74 68 65 20 62 67 | 6e 6c 69 6e 65 20 65 78 |o the bg|nline ex|
|00004f10| 63 65 70 74 20 74 68 61 | 74 0a 20 20 20 20 20 20 |cept tha|t. |
|00004f20| 20 20 20 77 68 65 6e 20 | 20 65 6e 64 63 6c 6f 73 | when | endclos|
|00004f30| 65 64 6c 69 6e 65 20 69 | 73 20 63 61 6c 6c 65 64 |edline i|s called|
|00004f40| 20 74 68 65 20 66 69 72 | 73 74 20 70 6f 69 6e 74 | the fir|st point|
|00004f50| 20 67 69 76 65 6e 20 28 | 69 65 2e 20 74 68 65 0a | given (|ie. the.|
|00004f60| 20 20 20 20 20 20 20 20 | 20 6f 6e 65 20 66 69 72 | | one fir|
|00004f70| 73 74 20 61 66 74 65 72 | 20 74 68 65 20 62 67 6e |st after| the bgn|
|00004f80| 63 6c 6f 73 65 64 6c 69 | 6e 65 20 63 61 6c 6c 29 |closedli|ne call)|
|00004f90| 20 20 69 73 20 20 6a 6f | 69 6e 65 64 20 20 74 6f | is jo|ined to|
|00004fa0| 20 20 74 68 65 0a 20 20 | 20 20 20 20 20 20 20 6c | the. | l|
|00004fb0| 61 73 74 20 20 70 6f 69 | 6e 74 20 67 69 76 65 6e |ast poi|nt given|
|00004fc0| 20 28 69 65 2e 20 74 68 | 65 20 6f 6e 65 20 6a 75 | (ie. th|e one ju|
|00004fd0| 73 74 20 62 65 66 6f 72 | 65 20 74 68 65 20 65 6e |st befor|e the en|
|00004fe0| 64 63 6c 6f 73 65 64 6c | 69 6e 65 0a 20 20 20 20 |dclosedl|ine. |
|00004ff0| 20 20 20 20 20 63 61 6c | 6c 29 2e 0a 0a 20 20 20 | cal|l)... |
|00005000| 20 20 5c 69 74 65 6d 5b | 76 6f 69 64 20 65 6e 64 | \item[|void end|
|00005010| 63 6c 6f 73 65 64 6c 69 | 6e 65 5d 7b 5c 73 6d 61 |closedli|ne]{\sma|
|00005020| 6c 6c 20 28 29 7d 20 5c | 5c 0a 20 20 20 20 20 5c |ll ()} \|\. \|
|00005030| 69 6e 64 65 78 7b 65 6e | 64 63 6c 6f 73 65 64 6c |index{en|dclosedl|
|00005040| 69 6e 65 7d 0a 20 20 20 | 20 20 20 20 20 20 41 20 |ine}. | A |
|00005050| 62 67 6e 63 6c 6f 73 65 | 64 6c 69 6e 65 20 69 73 |bgnclose|dline is|
|00005060| 20 74 65 72 6d 69 6e 61 | 74 65 64 20 77 69 74 68 | termina|ted with|
|00005070| 20 61 20 65 6e 64 6c 69 | 6e 65 20 63 61 6c 6c 2e | a endli|ne call.|
|00005080| 0a 0a 20 20 20 20 20 5c | 69 74 65 6d 5b 76 6f 69 |.. \|item[voi|
|00005090| 64 20 62 67 6e 70 6f 6c | 79 67 6f 6e 5d 7b 5c 73 |d bgnpol|ygon]{\s|
|000050a0| 6d 61 6c 6c 20 28 29 7d | 20 5c 5c 0a 20 20 20 20 |mall ()}| \\. |
|000050b0| 20 5c 69 6e 64 65 78 7b | 62 67 6e 70 6f 6c 79 67 | \index{|bgnpolyg|
|000050c0| 6f 6e 7d 0a 20 20 20 20 | 20 20 20 20 20 54 68 65 |on}. | The|
|000050d0| 20 62 67 6e 70 6f 6c 79 | 67 6f 6e 20 63 61 6c 6c | bgnpoly|gon call|
|000050e0| 20 73 70 65 63 69 66 69 | 65 73 20 74 68 61 74 20 | specifi|es that |
|000050f0| 74 68 65 20 6e 65 78 74 | 20 73 65 72 69 65 73 20 |the next| series |
|00005100| 6f 66 20 76 65 72 74 65 | 78 0a 20 20 20 20 20 20 |of verte|x. |
|00005110| 20 20 20 63 61 6c 6c 73 | 20 20 61 72 65 20 20 64 | calls| are d|
|00005120| 65 66 69 6e 69 6e 67 20 | 20 61 20 70 6f 6c 79 67 |efining | a polyg|
|00005130| 6f 6e 2e 20 0a 0a 20 20 | 20 20 20 5c 69 74 65 6d |on. .. | \item|
|00005140| 5b 76 6f 69 64 20 65 6e | 64 70 6f 6c 79 67 6f 6e |[void en|dpolygon|
|00005150| 5d 7b 5c 73 6d 61 6c 6c | 20 28 29 7d 20 5c 5c 0a |]{\small| ()} \\.|
|00005160| 20 20 20 20 20 5c 69 6e | 64 65 78 7b 65 6e 64 70 | \in|dex{endp|
|00005170| 6f 6c 79 67 6f 6e 7d 0a | 20 20 20 20 20 20 20 20 |olygon}.| |
|00005180| 20 57 68 65 6e 20 65 6e | 64 70 6f 6c 79 67 6f 6e | When en|dpolygon|
|00005190| 20 69 73 20 63 61 6c 6c | 65 64 2c 20 74 68 65 20 | is call|ed, the |
|000051a0| 70 6f 6c 79 67 6f 6e 20 | 69 73 20 63 6c 6f 73 65 |polygon |is close|
|000051b0| 64 20 61 6e 64 20 66 69 | 6c 6c 65 64 20 28 6f 72 |d and fi|lled (or|
|000051c0| 0a 20 20 20 20 20 20 20 | 20 20 64 72 61 77 6e 20 |. | drawn |
|000051d0| 20 61 73 20 20 61 6e 20 | 20 6f 75 74 6c 69 6e 65 | as an | outline|
|000051e0| 20 64 65 70 65 6e 64 69 | 6e 67 20 20 6f 6e 20 20 | dependi|ng on |
|000051f0| 74 68 65 20 20 6d 6f 64 | 65 20 74 68 61 74 20 68 |the mod|e that h|
|00005200| 61 73 20 62 65 65 6e 0a | 20 20 20 20 20 20 20 20 |as been.| |
|00005210| 20 73 65 74 20 77 69 74 | 68 20 74 68 65 20 70 6f | set wit|h the po|
|00005220| 6c 79 6d 6f 64 65 20 63 | 61 6c 6c 20 69 66 20 74 |lymode c|all if t|
|00005230| 68 69 73 20 63 61 6c 6c | 20 68 61 73 20 62 65 65 |his call| has bee|
|00005240| 6e 20 63 6f 6d 70 69 6c | 69 65 64 20 69 6e 74 6f |n compil|ied into|
|00005250| 0a 20 20 20 20 20 20 20 | 20 20 74 68 65 20 6c 69 |. | the li|
|00005260| 62 72 61 72 79 2e 0a 20 | 20 20 20 20 5c 65 6e 64 |brary.. | \end|
|00005270| 7b 64 65 73 63 72 69 70 | 74 69 6f 6e 7d 0a 0a 0a |{descrip|tion}...|
|00005280| 5c 73 65 63 74 69 6f 6e | 7b 41 72 63 73 20 61 6e |\section|{Arcs an|
|00005290| 64 20 43 69 72 63 6c 65 | 73 7d 0a 0a 20 20 20 20 |d Circle|s}.. |
|000052a0| 20 54 68 65 72 65 20 61 | 72 65 20 76 61 72 69 61 | There a|re varia|
|000052b0| 74 69 6f 6e 73 20 6f 6e | 20 61 6c 6c 20 74 68 65 |tions on| all the|
|000052c0| 73 65 20 72 6f 75 74 69 | 6e 65 73 20 74 68 61 74 |se routi|nes that|
|000052d0| 20 65 6e 64 20 20 69 6e | 20 20 7b 5c 69 74 20 73 | end in| {\it s|
|000052e0| 7d 20 61 6e 64 20 0a 20 | 20 20 20 20 61 6c 73 6f |} and . | also|
|000052f0| 20 65 6e 64 20 69 6e 20 | 7b 5c 69 74 20 69 5c 2f | end in |{\it i\/|
|00005300| 7d 2e 0a 20 20 20 20 20 | 5c 62 65 67 69 6e 7b 64 |}.. |\begin{d|
|00005310| 65 73 63 72 69 70 74 69 | 6f 6e 7d 0a 20 20 20 20 |escripti|on}. |
|00005320| 20 5c 69 74 65 6d 5b 5c | 69 74 20 73 5c 2f 5d 3a | \item[\|it s\/]:|
|00005330| 20 54 68 65 73 65 20 76 | 61 72 69 61 74 69 6f 6e | These v|ariation|
|00005340| 73 20 74 68 65 79 20 74 | 61 6b 65 20 61 72 67 75 |s they t|ake argu|
|00005350| 6d 65 6e 74 73 20 6f 66 | 20 74 79 70 65 20 7b 5c |ments of| type {\|
|00005360| 69 74 20 53 63 6f 6f 72 | 64 7d 2e 0a 20 20 20 20 |it Scoor|d}.. |
|00005370| 20 5c 69 74 65 6d 5b 5c | 69 74 20 69 5c 2f 5d 3a | \item[\|it i\/]:|
|00005380| 20 54 68 65 73 65 20 76 | 61 72 69 61 74 69 6f 6e | These v|ariation|
|00005390| 73 20 74 68 65 79 20 74 | 61 6b 65 20 61 72 67 75 |s they t|ake argu|
|000053a0| 6d 65 6e 74 73 20 6f 66 | 20 74 79 70 65 20 7b 5c |ments of| type {\|
|000053b0| 69 74 20 49 63 6f 6f 72 | 64 7d 2e 0a 20 20 20 20 |it Icoor|d}.. |
|000053c0| 20 5c 65 6e 64 7b 64 65 | 73 63 72 69 70 74 69 6f | \end{de|scriptio|
|000053d0| 6e 7d 0a 0a 20 20 20 20 | 20 54 68 65 20 66 75 6e |n}.. | The fun|
|000053e0| 63 74 69 6f 6e 73 20 73 | 75 70 70 6f 72 74 69 6e |ctions s|upportin|
|000053f0| 67 20 61 72 63 20 61 6e | 64 20 63 69 72 63 6c 65 |g arc an|d circle|
|00005400| 20 64 72 61 77 69 6e 67 | 20 61 72 65 20 61 73 20 | drawing| are as |
|00005410| 66 6f 6c 6c 6f 77 73 2e | 0a 0a 20 20 20 20 20 5c |follows.|.. \|
|00005420| 62 65 67 69 6e 7b 64 65 | 73 63 72 69 70 74 69 6f |begin{de|scriptio|
|00005430| 6e 7d 0a 20 20 20 20 20 | 5c 69 74 65 6d 5b 76 6f |n}. |\item[vo|
|00005440| 69 64 20 63 69 72 63 6c | 65 70 72 65 63 69 73 69 |id circl|eprecisi|
|00005450| 6f 6e 5d 7b 5c 73 6d 61 | 6c 6c 20 28 69 6e 74 20 |on]{\sma|ll (int |
|00005460| 6e 73 65 67 73 29 7d 20 | 5c 5c 0a 20 20 20 20 20 |nsegs)} |\\. |
|00005470| 5c 69 6e 64 65 78 7b 63 | 69 72 63 6c 65 70 72 65 |\index{c|irclepre|
|00005480| 63 69 73 69 6f 6e 7d 0a | 20 20 20 20 20 20 20 20 |cision}.| |
|00005490| 20 20 53 65 74 20 74 68 | 65 20 6e 75 6d 62 65 72 | Set th|e number|
|000054a0| 20 6f 66 20 6c 69 6e 65 | 20 73 65 67 6d 65 6e 74 | of line| segment|
|000054b0| 73 20 20 6d 61 6b 69 6e | 67 20 20 75 70 20 20 61 |s makin|g up a|
|000054c0| 20 20 63 69 72 63 6c 65 | 2e 0a 20 20 20 20 20 20 | circle|.. |
|000054d0| 20 20 20 20 44 65 66 61 | 75 6c 74 20 20 69 73 20 | Defa|ult is |
|000054e0| 20 63 75 72 72 65 6e 74 | 6c 79 20 24 33 32 24 2e | current|ly $32$.|
|000054f0| 20 54 68 65 20 6e 75 6d | 62 65 72 20 6f 66 20 73 | The num|ber of s|
|00005500| 65 67 6d 65 6e 74 73 20 | 69 6e 20 61 6e 0a 20 20 |egments |in an. |
|00005510| 20 20 20 20 20 20 20 20 | 61 72 63 20 69 73 20 63 | |arc is c|
|00005520| 61 6c 63 75 6c 61 74 65 | 64 20 66 72 6f 6d 20 6e |alculate|d from n|
|00005530| 73 65 67 73 20 61 63 63 | 6f 72 64 69 6e 67 20 74 |segs acc|ording t|
|00005540| 68 65 20 73 70 61 6e 20 | 6f 66 20 20 74 68 65 0a |he span |of the.|
|00005550| 20 20 20 20 20 20 20 20 | 20 20 61 72 63 2e 20 20 | | arc. |
|00005560| 54 68 69 73 20 72 6f 75 | 74 69 6e 65 20 69 73 20 |This rou|tine is |
|00005570| 6f 6e 6c 79 20 61 76 61 | 69 6c 61 62 6c 65 20 69 |only ava|ilable i|
|00005580| 6e 20 5c 56 4f 47 4c 2e | 0a 0a 20 20 20 20 20 5c |n \VOGL.|.. \|
|00005590| 69 74 65 6d 5b 76 6f 69 | 64 20 61 72 63 5d 7b 5c |item[voi|d arc]{\|
|000055a0| 73 6d 61 6c 6c 20 28 43 | 6f 6f 72 64 20 78 2c 43 |small (C|oord x,C|
|000055b0| 6f 6f 72 64 20 79 2c 43 | 6f 6f 72 64 20 72 61 64 |oord y,C|oord rad|
|000055c0| 69 75 73 2c 41 6e 67 6c | 65 20 73 74 61 72 74 61 |ius,Angl|e starta|
|000055d0| 6e 67 2c 41 6e 67 6c 65 | 20 65 6e 64 61 6e 67 29 |ng,Angle| endang)|
|000055e0| 7d 20 5c 5c 0a 20 20 20 | 20 20 5c 69 6e 64 65 78 |} \\. | \index|
|000055f0| 7b 61 72 63 7d 0a 20 20 | 20 20 20 20 20 20 20 20 |{arc}. | |
|00005600| 44 72 61 77 20 61 6e 20 | 61 72 63 2e 20 78 2c 20 |Draw an |arc. x, |
|00005610| 79 2c 20 20 61 6e 64 20 | 20 72 61 64 69 75 73 20 |y, and | radius |
|00005620| 20 61 72 65 20 20 76 61 | 6c 75 65 73 20 20 69 6e | are va|lues in|
|00005630| 20 20 77 6f 72 6c 64 0a | 20 20 20 20 20 20 20 20 | world.| |
|00005640| 20 20 75 6e 69 74 73 2e | 0a 0a 20 20 20 20 20 5c | units.|.. \|
|00005650| 69 74 65 6d 5b 76 6f 69 | 64 20 61 72 63 66 5d 7b |item[voi|d arcf]{|
|00005660| 5c 73 6d 61 6c 6c 20 28 | 43 6f 6f 72 64 20 78 2c |\small (|Coord x,|
|00005670| 43 6f 6f 72 64 20 79 2c | 43 6f 6f 72 64 20 72 61 |Coord y,|Coord ra|
|00005680| 64 69 75 73 2c 41 6e 67 | 6c 65 20 73 74 61 72 74 |dius,Ang|le start|
|00005690| 61 6e 67 2c 41 6e 67 6c | 65 20 65 6e 64 61 6e 67 |ang,Angl|e endang|
|000056a0| 29 7d 20 5c 5c 0a 20 20 | 20 20 20 5c 69 6e 64 65 |)} \\. | \inde|
|000056b0| 78 7b 61 72 63 66 7d 0a | 20 20 20 20 20 20 20 20 |x{arcf}.| |
|000056c0| 20 20 44 72 61 77 20 61 | 20 66 69 6c 6c 65 64 20 | Draw a| filled |
|000056d0| 61 72 63 2e 20 78 2c 20 | 79 2c 20 61 6e 64 20 72 |arc. x, |y, and r|
|000056e0| 61 64 69 75 73 20 61 72 | 65 20 76 61 6c 75 65 73 |adius ar|e values|
|000056f0| 20 69 6e 20 77 6f 72 6c | 64 0a 20 20 20 20 20 20 | in worl|d. |
|00005700| 20 20 20 20 75 6e 69 74 | 73 2e 20 20 28 48 6f 77 | unit|s. (How|
|00005710| 20 74 68 65 20 66 69 6c | 6c 69 6e 67 20 69 73 20 | the fil|ling is |
|00005720| 64 6f 6e 65 20 6d 61 79 | 20 62 65 20 63 68 61 6e |done may| be chan|
|00005730| 67 65 64 20 62 79 20 63 | 61 6c 6c 69 6e 67 20 70 |ged by c|alling p|
|00005740| 6f 6c 79 6d 6f 64 65 2c | 0a 20 20 20 20 20 20 20 |olymode,|. |
|00005750| 20 20 20 69 66 20 74 68 | 69 73 20 63 61 6c 6c 20 | if th|is call |
|00005760| 68 61 73 20 20 62 65 65 | 6e 20 20 63 6f 6d 70 69 |has bee|n compi|
|00005770| 6c 69 65 64 20 20 69 6e | 74 6f 20 74 68 65 20 6c |lied in|to the l|
|00005780| 69 62 72 61 72 79 29 2e | 0a 0a 20 20 20 20 20 5c |ibrary).|.. \|
|00005790| 69 74 65 6d 5b 76 6f 69 | 64 20 63 69 72 63 5d 7b |item[voi|d circ]{|
|000057a0| 5c 73 6d 61 6c 6c 20 28 | 43 6f 6f 72 64 20 78 2c |\small (|Coord x,|
|000057b0| 43 6f 6f 72 64 20 79 2c | 43 6f 6f 72 64 20 72 61 |Coord y,|Coord ra|
|000057c0| 64 69 75 73 29 7d 20 5c | 5c 0a 20 20 20 20 20 5c |dius)} \|\. \|
|000057d0| 69 6e 64 65 78 7b 63 69 | 72 63 7d 0a 20 20 20 20 |index{ci|rc}. |
|000057e0| 20 20 20 20 20 20 44 72 | 61 77 20 61 20 63 69 72 | Dr|aw a cir|
|000057f0| 63 6c 65 2e 20 78 2c 20 | 79 2c 20 61 6e 64 20 72 |cle. x, |y, and r|
|00005800| 61 64 69 75 73 20 20 61 | 72 65 20 20 76 61 6c 75 |adius a|re valu|
|00005810| 65 73 20 20 69 6e 20 20 | 77 6f 72 6c 64 20 63 6f |es in |world co|
|00005820| 6f 72 64 69 6e 61 74 65 | 73 2e 0a 0a 20 20 20 20 |ordinate|s... |
|00005830| 20 5c 69 74 65 6d 5b 76 | 6f 69 64 20 63 69 72 63 | \item[v|oid circ|
|00005840| 66 5d 7b 5c 73 6d 61 6c | 6c 20 28 43 6f 6f 72 64 |f]{\smal|l (Coord|
|00005850| 20 78 2c 43 6f 6f 72 64 | 20 79 2c 43 6f 6f 72 64 | x,Coord| y,Coord|
|00005860| 20 72 61 64 69 75 73 29 | 7d 20 5c 5c 0a 20 20 20 | radius)|} \\. |
|00005870| 20 20 5c 69 6e 64 65 78 | 7b 63 69 72 63 66 7d 0a | \index|{circf}.|
|00005880| 20 20 20 20 20 20 20 20 | 20 20 44 72 61 77 20 61 | | Draw a|
|00005890| 20 66 69 6c 6c 65 64 20 | 63 69 72 63 6c 65 2e 20 | filled |circle. |
|000058a0| 78 2c 20 79 2c 20 61 6e | 64 20 72 61 64 69 75 73 |x, y, an|d radius|
|000058b0| 20 20 61 72 65 20 20 76 | 61 6c 75 65 73 20 20 69 | are v|alues i|
|000058c0| 6e 0a 20 20 20 20 20 20 | 20 20 20 20 77 6f 72 6c |n. | worl|
|000058d0| 64 20 75 6e 69 74 73 2e | 20 20 48 6f 77 20 74 68 |d units.| How th|
|000058e0| 65 20 66 69 6c 6c 69 6e | 67 20 69 73 20 64 6f 6e |e fillin|g is don|
|000058f0| 65 20 6d 61 79 20 62 65 | 20 63 68 61 6e 67 65 64 |e may be| changed|
|00005900| 20 62 79 0a 20 20 20 20 | 20 20 20 20 20 20 63 61 | by. | ca|
|00005910| 6c 6c 69 6e 67 20 70 6f | 6c 79 6d 6f 64 65 2e 0a |lling po|lymode..|
|00005920| 20 20 20 20 20 5c 65 6e | 64 7b 64 65 73 63 72 69 | \en|d{descri|
|00005930| 70 74 69 6f 6e 7d 0a 0a | 0a 5c 73 65 63 74 69 6f |ption}..|.\sectio|
|00005940| 6e 7b 43 75 72 76 65 20 | 52 6f 75 74 69 6e 65 73 |n{Curve |Routines|
|00005950| 7d 0a 20 20 20 20 20 0a | 20 20 20 20 20 5c 62 65 |}. .| \be|
|00005960| 67 69 6e 7b 64 65 73 63 | 72 69 70 74 69 6f 6e 7d |gin{desc|ription}|
|00005970| 0a 20 20 20 20 20 5c 69 | 74 65 6d 5b 76 6f 69 64 |. \i|tem[void|
|00005980| 20 63 75 72 76 65 62 61 | 73 69 73 5d 7b 5c 73 6d | curveba|sis]{\sm|
|00005990| 61 6c 6c 20 28 73 68 6f | 72 74 20 69 64 29 7d 20 |all (sho|rt id)} |
|000059a0| 5c 5c 0a 20 20 20 20 20 | 5c 69 6e 64 65 78 7b 63 |\\. |\index{c|
|000059b0| 75 72 76 65 62 61 73 69 | 73 7d 0a 20 20 20 20 20 |urvebasi|s}. |
|000059c0| 20 20 20 20 20 53 65 74 | 20 74 68 65 20 62 61 73 | Set| the bas|
|000059d0| 69 73 20 6d 61 74 72 69 | 78 20 66 6f 72 20 61 20 |is matri|x for a |
|000059e0| 63 75 72 76 65 20 74 6f | 20 74 68 65 20 20 6d 61 |curve to| the ma|
|000059f0| 74 72 69 78 20 20 72 65 | 66 65 72 65 6e 63 65 64 |trix re|ferenced|
|00005a00| 20 20 62 79 0a 20 20 20 | 20 20 20 20 20 20 20 69 | by. | i|
|00005a10| 64 2e 20 20 54 68 65 20 | 6d 61 74 72 69 78 20 61 |d. The |matrix a|
|00005a20| 6e 64 20 69 74 27 73 20 | 69 64 20 61 72 65 20 74 |nd it's |id are t|
|00005a30| 69 65 64 20 74 6f 67 65 | 74 68 65 72 20 77 69 74 |ied toge|ther wit|
|00005a40| 68 20 61 20 63 61 6c 6c | 20 74 6f 20 64 65 66 62 |h a call| to defb|
|00005a50| 61 73 69 73 2e 0a 0a 20 | 20 20 20 20 5c 69 74 65 |asis... | \ite|
|00005a60| 6d 5b 76 6f 69 64 20 63 | 75 72 76 65 70 72 65 63 |m[void c|urveprec|
|00005a70| 69 73 69 6f 6e 5d 7b 5c | 73 6d 61 6c 6c 20 28 73 |ision]{\|small (s|
|00005a80| 68 6f 72 74 20 6e 73 65 | 67 73 29 7d 20 5c 5c 0a |hort nse|gs)} \\.|
|00005a90| 20 20 20 20 20 5c 69 6e | 64 65 78 7b 63 75 72 76 | \in|dex{curv|
|00005aa0| 65 70 72 65 63 69 73 69 | 6f 6e 7d 0a 20 20 20 20 |eprecisi|on}. |
|00005ab0| 20 20 20 20 20 20 44 65 | 66 69 6e 65 20 74 68 65 | De|fine the|
|00005ac0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 20 6c 69 6e 65 | number |of line|
|00005ad0| 20 20 73 65 67 6d 65 6e | 74 73 20 20 75 73 65 64 | segmen|ts used|
|00005ae0| 20 20 74 6f 20 20 64 72 | 61 77 20 20 61 0a 20 20 | to dr|aw a. |
|00005af0| 20 20 20 20 20 20 20 20 | 63 75 72 76 65 2e 0a 0a | |curve...|
|00005b00| 20 20 20 20 20 5c 69 74 | 65 6d 5b 76 6f 69 64 20 | \it|em[void |
|00005b10| 72 63 72 76 5d 7b 5c 73 | 6d 61 6c 6c 20 28 43 6f |rcrv]{\s|mall (Co|
|00005b20| 6f 72 64 20 67 65 6f 6d | 5c 76 65 72 62 60 5b 34 |ord geom|\verb`[4|
|00005b30| 5d 5b 34 5d 60 29 7d 20 | 5c 20 5c 5c 0a 20 20 20 |][4]`)} |\ \\. |
|00005b40| 20 20 5c 69 6e 64 65 78 | 7b 72 63 72 76 7d 0a 20 | \index|{rcrv}. |
|00005b50| 20 20 20 20 20 20 20 20 | 20 44 72 61 77 20 61 20 | | Draw a |
|00005b60| 72 61 74 69 6f 6e 61 6c | 20 63 75 72 76 65 2e 0a |rational| curve..|
|00005b70| 0a 20 20 20 20 20 5c 69 | 74 65 6d 5b 76 6f 69 64 |. \i|tem[void|
|00005b80| 20 72 63 72 76 6e 5d 7b | 5c 73 6d 61 6c 6c 20 28 | rcrvn]{|\small (|
|00005b90| 6c 6f 6e 67 20 6e 2c 43 | 6f 6f 72 64 20 67 65 6f |long n,C|oord geo|
|00005ba0| 6d 5c 76 65 72 62 60 5b | 5d 5b 34 5d 60 29 7d 20 |m\verb`[|][4]`)} |
|00005bb0| 5c 20 5c 5c 0a 20 20 20 | 20 20 5c 69 6e 64 65 78 |\ \\. | \index|
|00005bc0| 7b 72 63 72 76 6e 7d 0a | 20 20 20 20 20 20 20 20 |{rcrvn}.| |
|00005bd0| 20 20 44 72 61 77 20 24 | 6e 20 2d 20 33 24 20 72 | Draw $|n - 3$ r|
|00005be0| 61 74 69 6f 6e 61 6c 20 | 63 75 72 76 65 20 73 65 |ational |curve se|
|00005bf0| 67 6d 65 6e 74 73 2e 20 | 4e 6f 74 65 3a 20 6e 20 |gments. |Note: n |
|00005c00| 6d 75 73 74 20 62 65 20 | 20 61 74 0a 20 20 20 20 |must be | at. |
|00005c10| 20 20 20 20 20 20 6c 65 | 61 73 74 20 24 34 24 2e | le|ast $4$.|
|00005c20| 0a 0a 20 20 20 20 20 5c | 69 74 65 6d 5b 76 6f 69 |.. \|item[voi|
|00005c30| 64 20 63 72 76 5d 7b 5c | 73 6d 61 6c 6c 20 28 67 |d crv]{\|small (g|
|00005c40| 65 6f 6d 5c 76 65 72 62 | 60 5b 34 5d 5b 33 5d 60 |eom\verb|`[4][3]`|
|00005c50| 29 7d 20 5c 20 5c 5c 0a | 20 20 20 20 20 5c 69 6e |)} \ \\.| \in|
|00005c60| 64 65 78 7b 63 72 76 7d | 0a 20 20 20 20 20 20 20 |dex{crv}|. |
|00005c70| 20 20 20 44 72 61 77 20 | 61 20 63 75 72 76 65 2e | Draw |a curve.|
|00005c80| 0a 0a 20 20 20 20 20 5c | 69 74 65 6d 5b 76 6f 69 |.. \|item[voi|
|00005c90| 64 20 63 72 76 6e 5d 7b | 5c 73 6d 61 6c 6c 20 28 |d crvn]{|\small (|
|00005ca0| 6c 6f 6e 67 20 6e 2c 43 | 6f 6f 72 64 20 67 65 6f |long n,C|oord geo|
|00005cb0| 6d 5c 76 65 72 62 60 5b | 5d 5b 33 5d 60 29 7d 20 |m\verb`[|][3]`)} |
|00005cc0| 5c 20 5c 5c 0a 20 20 20 | 20 20 5c 69 6e 64 65 78 |\ \\. | \index|
|00005cd0| 7b 63 72 76 6e 7d 0a 20 | 20 20 20 20 20 20 20 20 |{crvn}. | |
|00005ce0| 20 44 72 61 77 20 24 6e | 20 2d 20 33 24 20 63 75 | Draw $n| - 3$ cu|
|00005cf0| 72 76 65 20 73 65 67 6d | 65 6e 74 73 2e 20 4e 6f |rve segm|ents. No|
|00005d00| 74 65 3a 20 6e 20 6d 75 | 73 74 20 62 65 20 61 74 |te: n mu|st be at|
|00005d10| 20 6c 65 61 73 74 20 24 | 34 24 2e 0a 0a 20 20 20 | least $|4$... |
|00005d20| 20 20 5c 69 74 65 6d 5b | 76 6f 69 64 20 63 75 72 | \item[|void cur|
|00005d30| 76 65 69 74 5d 7b 5c 73 | 6d 61 6c 6c 20 28 73 68 |veit]{\s|mall (sh|
|00005d40| 6f 72 74 20 6e 29 7d 20 | 5c 5c 0a 20 20 20 20 20 |ort n)} |\\. |
|00005d50| 5c 69 6e 64 65 78 7b 63 | 75 72 76 65 69 74 7d 0a |\index{c|urveit}.|
|00005d60| 20 20 20 20 20 20 20 20 | 20 20 44 72 61 77 20 61 | | Draw a|
|00005d70| 20 63 75 72 76 65 20 73 | 65 67 6d 65 6e 74 20 62 | curve s|egment b|
|00005d80| 79 20 69 74 65 72 61 74 | 69 6e 67 20 74 68 65 20 |y iterat|ing the |
|00005d90| 74 6f 70 20 6d 61 74 72 | 69 78 20 69 6e 20 74 68 |top matr|ix in th|
|00005da0| 65 0a 20 20 20 20 20 20 | 20 20 20 20 6d 61 74 72 |e. | matr|
|00005db0| 69 78 20 20 73 74 61 63 | 6b 20 61 73 20 61 20 66 |ix stac|k as a f|
|00005dc0| 6f 72 77 61 72 64 20 64 | 69 66 66 65 72 65 6e 63 |orward d|ifferenc|
|00005dd0| 65 20 6d 61 74 72 69 78 | 2e 20 54 68 69 73 20 70 |e matrix|. This p|
|00005de0| 65 72 66 6f 72 6d 73 0a | 20 20 20 20 20 20 20 20 |erforms.| |
|00005df0| 20 20 24 6e 24 20 69 74 | 65 72 61 74 69 6f 6e 73 | $n$ it|erations|
|00005e00| 2e 0a 20 20 20 20 20 5c | 65 6e 64 7b 64 65 73 63 |.. \|end{desc|
|00005e10| 72 69 70 74 69 6f 6e 7d | 0a 0a 0a 5c 73 65 63 74 |ription}|...\sect|
|00005e20| 69 6f 6e 7b 52 65 63 74 | 61 6e 67 6c 65 73 20 61 |ion{Rect|angles a|
|00005e30| 6e 64 20 47 65 6e 65 72 | 61 6c 20 50 6f 6c 79 67 |nd Gener|al Polyg|
|00005e40| 6f 6e 20 52 6f 75 74 69 | 6e 65 73 7d 0a 0a 20 20 |on Routi|nes}.. |
|00005e50| 20 20 20 53 65 65 20 61 | 6c 73 6f 20 56 65 72 74 | See a|lso Vert|
|00005e60| 65 78 20 20 63 61 6c 6c | 73 20 20 61 62 6f 76 65 |ex call|s above|
|00005e70| 2e 20 20 20 54 68 65 20 | 20 77 61 79 20 20 69 6e |. The | way in|
|00005e80| 20 20 77 68 69 63 68 20 | 20 66 69 6c 6c 65 64 0a | which | filled.|
|00005e90| 20 20 20 20 20 70 6f 6c | 79 67 6f 6e 73 20 28 69 | pol|ygons (i|
|00005ea0| 6e 63 6c 75 64 69 6e 67 | 20 63 69 72 63 6c 65 73 |ncluding| circles|
|00005eb0| 20 61 6e 64 20 61 72 63 | 73 29 20 61 72 65 20 74 | and arc|s) are t|
|00005ec0| 72 65 61 74 65 64 20 64 | 65 70 65 6e 64 73 20 6f |reated d|epends o|
|00005ed0| 6e 0a 20 20 20 20 20 74 | 68 65 20 6d 6f 64 65 20 |n. t|he mode |
|00005ee0| 74 68 61 74 20 68 61 73 | 20 62 65 65 6e 20 73 65 |that has| been se|
|00005ef0| 74 20 77 69 74 68 20 74 | 68 65 20 70 6f 6c 79 6d |t with t|he polym|
|00005f00| 6f 64 65 20 63 61 6c 6c | 2e 0a 0a 20 20 20 20 20 |ode call|... |
|00005f10| 54 68 65 72 65 20 61 72 | 65 20 76 61 72 69 61 74 |There ar|e variat|
|00005f20| 69 6f 6e 73 20 6f 6e 20 | 61 6c 6c 20 74 68 65 73 |ions on |all thes|
|00005f30| 65 20 72 6f 75 74 69 6e | 65 73 20 74 68 61 74 20 |e routin|es that |
|00005f40| 65 6e 64 20 20 69 6e 20 | 7b 5c 69 74 20 73 7d 20 |end in |{\it s} |
|00005f50| 61 6e 64 20 20 61 6c 73 | 6f 20 65 6e 64 0a 20 20 |and als|o end. |
|00005f60| 20 20 20 69 6e 20 7b 5c | 69 74 20 69 7d 2e 0a 20 | in {\|it i}.. |
|00005f70| 20 20 20 20 5c 62 65 67 | 69 6e 7b 64 65 73 63 72 | \beg|in{descr|
|00005f80| 69 70 74 69 6f 6e 7d 0a | 20 20 20 20 20 5c 69 74 |iption}.| \it|
|00005f90| 65 6d 5b 5c 69 74 20 73 | 5c 2f 5d 3a 20 54 68 65 |em[\it s|\/]: The|
|00005fa0| 73 65 20 76 61 72 69 61 | 74 69 6f 6e 73 20 74 68 |se varia|tions th|
|00005fb0| 65 79 20 74 61 6b 65 20 | 61 72 67 75 6d 65 6e 74 |ey take |argument|
|00005fc0| 73 20 6f 66 20 74 79 70 | 65 20 7b 5c 69 74 20 53 |s of typ|e {\it S|
|00005fd0| 63 6f 6f 72 64 7d 2e 0a | 20 20 20 20 20 5c 69 74 |coord}..| \it|
|00005fe0| 65 6d 5b 5c 69 74 20 69 | 5c 2f 5d 3a 20 54 68 65 |em[\it i|\/]: The|
|00005ff0| 73 65 20 76 61 72 69 61 | 74 69 6f 6e 73 20 74 68 |se varia|tions th|
|00006000| 65 79 20 74 61 6b 65 20 | 61 72 67 75 6d 65 6e 74 |ey take |argument|
|00006010| 73 20 6f 66 20 74 79 70 | 65 20 7b 5c 69 74 20 49 |s of typ|e {\it I|
|00006020| 63 6f 6f 72 64 7d 2e 0a | 20 20 20 20 20 5c 65 6e |coord}..| \en|
|00006030| 64 7b 64 65 73 63 72 69 | 70 74 69 6f 6e 7d 0a 0a |d{descri|ption}..|
|00006040| 20 20 20 20 20 5c 62 65 | 67 69 6e 7b 64 65 73 63 | \be|gin{desc|
|00006050| 72 69 70 74 69 6f 6e 7d | 0a 20 20 20 20 20 5c 69 |ription}|. \i|
|00006060| 74 65 6d 5b 76 6f 69 64 | 20 72 65 63 74 5d 7b 5c |tem[void| rect]{\|
|00006070| 73 6d 61 6c 6c 20 28 43 | 6f 6f 72 64 20 78 31 2c |small (C|oord x1,|
|00006080| 43 6f 6f 72 63 20 79 31 | 2c 43 4f 6f 72 64 20 78 |Coorc y1|,COord x|
|00006090| 32 2c 43 6f 6f 72 64 20 | 79 32 29 7d 20 5c 5c 0a |2,Coord |y2)} \\.|
|000060a0| 20 20 20 20 20 5c 69 6e | 64 65 78 7b 72 65 63 74 | \in|dex{rect|
|000060b0| 7d 0a 20 20 20 20 20 20 | 20 20 20 20 44 72 61 77 |}. | Draw|
|000060c0| 20 61 20 72 65 63 74 61 | 6e 67 6c 65 2e 0a 0a 20 | a recta|ngle... |
|000060d0| 20 20 20 20 5c 69 74 65 | 6d 5b 76 6f 69 64 20 72 | \ite|m[void r|
|000060e0| 65 63 74 66 5d 7b 5c 73 | 6d 61 6c 6c 20 28 43 6f |ectf]{\s|mall (Co|
|000060f0| 6f 72 64 20 78 31 2c 43 | 6f 6f 72 64 20 79 31 2c |ord x1,C|oord y1,|
|00006100| 43 6f 6f 72 64 20 78 32 | 2c 43 6f 6f 72 64 20 79 |Coord x2|,Coord y|
|00006110| 32 29 7d 20 5c 5c 0a 20 | 20 20 20 20 5c 69 6e 64 |2)} \\. | \ind|
|00006120| 65 78 7b 72 65 63 74 66 | 7d 0a 20 20 20 20 20 20 |ex{rectf|}. |
|00006130| 20 20 20 20 44 72 61 77 | 20 61 20 66 69 6c 6c 65 | Draw| a fille|
|00006140| 64 20 72 65 63 74 61 6e | 67 6c 65 2e 20 28 48 6f |d rectan|gle. (Ho|
|00006150| 77 20 74 68 65 20 66 69 | 6c 6c 69 6e 67 20 69 73 |w the fi|lling is|
|00006160| 20 20 64 6f 6e 65 20 20 | 6d 61 79 0a 20 20 20 20 | done |may. |
|00006170| 20 20 20 20 20 20 62 65 | 20 20 63 68 61 6e 67 65 | be| change|
|00006180| 64 20 62 79 20 63 61 6c | 6c 69 6e 67 20 70 6f 6c |d by cal|ling pol|
|00006190| 79 6d 6f 64 65 20 2c 20 | 69 66 20 74 68 69 73 20 |ymode , |if this |
|000061a0| 63 61 6c 6c 20 68 61 73 | 20 62 65 65 6e 0a 20 20 |call has| been. |
|000061b0| 20 20 20 20 20 20 20 20 | 63 6f 6d 70 69 6c 69 65 | |compilie|
|000061c0| 64 20 69 6e 74 6f 20 74 | 68 65 20 6c 69 62 72 61 |d into t|he libra|
|000061d0| 72 79 29 2e 0a 0a 20 20 | 20 20 20 5c 69 74 65 6d |ry)... | \item|
|000061e0| 5b 76 6f 69 64 20 70 6f | 6c 79 32 5d 7b 5c 73 6d |[void po|ly2]{\sm|
|000061f0| 61 6c 6c 20 28 6c 6f 6e | 67 20 6e 2c 43 6f 6f 72 |all (lon|g n,Coor|
|00006200| 64 20 70 6f 69 6e 74 73 | 5c 76 65 72 62 60 5b 5d |d points|\verb`[]|
|00006210| 5b 32 5d 60 29 7d 20 5c | 5c 0a 20 20 20 20 20 5c |[2]`)} \|\. \|
|00006220| 69 6e 64 65 78 7b 70 6f | 6c 79 32 7d 0a 20 20 20 |index{po|ly2}. |
|00006230| 20 20 20 20 20 20 20 43 | 6f 6e 73 74 72 75 63 74 | C|onstruct|
|00006240| 20 61 20 28 78 2c 20 79 | 29 20 70 6f 6c 79 67 6f | a (x, y|) polygo|
|00006250| 6e 20 66 72 6f 6d 20 61 | 6e 20 61 72 72 61 79 20 |n from a|n array |
|00006260| 6f 66 20 70 6f 69 6e 74 | 73 20 70 72 6f 76 69 64 |of point|s provid|
|00006270| 65 64 0a 20 20 20 20 20 | 20 20 20 20 20 62 79 20 |ed. | by |
|00006280| 74 68 65 20 75 73 65 72 | 2e 0a 0a 20 20 20 20 20 |the user|... |
|00006290| 5c 69 74 65 6d 5b 76 6f | 69 64 20 70 6f 6c 66 32 |\item[vo|id polf2|
|000062a0| 5d 7b 5c 73 6d 61 6c 6c | 20 28 6c 6f 6e 67 20 6e |]{\small| (long n|
|000062b0| 2c 43 6f 6f 72 64 20 70 | 6f 69 6e 74 73 5c 76 65 |,Coord p|oints\ve|
|000062c0| 72 62 60 5b 5d 5b 32 5d | 60 29 7d 20 5c 5c 0a 20 |rb`[][2]|`)} \\. |
|000062d0| 20 20 20 20 5c 69 6e 64 | 65 78 7b 70 6f 6c 66 32 | \ind|ex{polf2|
|000062e0| 7d 0a 20 20 20 20 20 20 | 20 20 20 20 43 6f 6e 73 |}. | Cons|
|000062f0| 74 72 75 63 74 20 61 20 | 66 69 6c 6c 65 64 20 28 |truct a |filled (|
|00006300| 78 2c 20 79 29 20 20 70 | 6f 6c 79 67 6f 6e 20 20 |x, y) p|olygon |
|00006310| 66 72 6f 6d 20 20 61 6e | 20 20 61 72 72 61 79 20 |from an| array |
|00006320| 20 6f 66 0a 20 20 20 20 | 20 20 20 20 20 20 70 6f | of. | po|
|00006330| 69 6e 74 73 20 20 70 72 | 6f 76 69 64 65 64 20 62 |ints pr|ovided b|
|00006340| 79 20 74 68 65 20 75 73 | 65 72 2e 20 20 28 48 6f |y the us|er. (Ho|
|00006350| 77 20 74 68 65 20 66 69 | 6c 6c 69 6e 67 20 69 73 |w the fi|lling is|
|00006360| 20 64 6f 6e 65 0a 20 20 | 20 20 20 20 20 20 20 20 | done. | |
|00006370| 6d 61 79 20 62 65 20 63 | 68 61 6e 67 65 64 20 62 |may be c|hanged b|
|00006380| 79 20 63 61 6c 6c 69 6e | 67 20 70 6f 6c 79 6d 6f |y callin|g polymo|
|00006390| 64 65 20 2c 20 69 66 20 | 74 68 69 73 20 20 63 61 |de , if |this ca|
|000063a0| 6c 6c 20 20 68 61 73 0a | 20 20 20 20 20 20 20 20 |ll has.| |
|000063b0| 20 20 62 65 65 6e 20 63 | 6f 6d 70 69 6c 69 65 64 | been c|ompilied|
|000063c0| 20 69 6e 74 6f 20 74 68 | 65 20 6c 69 62 72 61 72 | into th|e librar|
|000063d0| 79 29 2e 0a 0a 20 20 20 | 20 20 5c 69 74 65 6d 5b |y)... | \item[|
|000063e0| 76 6f 69 64 20 70 6f 6c | 79 5d 7b 5c 73 6d 61 6c |void pol|y]{\smal|
|000063f0| 6c 20 28 6c 6f 6e 67 20 | 6e 2c 66 6c 6f 61 74 20 |l (long |n,float |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.