home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / python / pytex / pytexdoc / lib2 / gl / tex / node1_ct.html < prev    next >
LaTeX Document  |  1996-11-08  |  5.1 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


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

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
90% dexvert Hypertext Markup Language File (text/html) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file HTML document text default (weak)
99% file Python script text executable default (weak)
98% file LaTeX document text default
97% file exported SGML document text default
96% file exported SGML document, ASCII text default
80% TrID HyperText Markup Language with DOCTYPE default
19% TrID HyperText Markup Language default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% gt2 HTML (Hyper Text Markup Language) Datei default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime text/html default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3c 21 44 4f 43 54 59 50 | 45 20 48 54 4d 4c 20 50 |<!DOCTYP|E HTML P|
|00000010| 55 42 4c 49 43 20 22 2d | 2f 2f 57 33 43 2f 2f 44 |UBLIC "-|//W3C//D|
|00000020| 54 44 20 48 54 4d 4c 20 | 33 2e 32 20 46 69 6e 61 |TD HTML |3.2 Fina|
|00000030| 6c 2f 2f 65 6e 22 3e 0a | 0a 3c 21 2d 2d 43 6f 6e |l//en">.|.<!--Con|
|00000040| 76 65 72 74 65 64 20 77 | 69 74 68 20 4c 61 54 65 |verted w|ith LaTe|
|00000050| 58 32 48 54 4d 4c 20 32 | 30 32 32 20 28 52 65 6c |X2HTML 2|022 (Rel|
|00000060| 65 61 73 65 64 20 4a 61 | 6e 75 61 72 79 20 31 2c |eased Ja|nuary 1,|
|00000070| 20 32 30 32 32 29 20 2d | 2d 3e 0a 3c 48 54 4d 4c | 2022) -|->.<HTML|
|00000080| 20 6c 61 6e 67 3d 22 65 | 6e 22 3e 0a 3c 48 45 41 | lang="e|n">.<HEA|
|00000090| 44 3e 0a 3c 54 49 54 4c | 45 3e 43 6f 6e 74 65 6e |D>.<TITL|E>Conten|
|000000a0| 74 73 20 6f 66 20 42 75 | 69 6c 74 2d 69 6e 20 4d |ts of Bu|ilt-in M|
|000000b0| 6f 64 75 6c 65 20 67 6c | 3c 2f 54 49 54 4c 45 3e |odule gl|</TITLE>|
|000000c0| 0a 0a 3c 4d 45 54 41 20 | 48 54 54 50 2d 45 51 55 |..<META |HTTP-EQU|
|000000d0| 49 56 3d 22 43 6f 6e 74 | 65 6e 74 2d 54 79 70 65 |IV="Cont|ent-Type|
|000000e0| 22 20 43 4f 4e 54 45 4e | 54 3d 22 74 65 78 74 2f |" CONTEN|T="text/|
|000000f0| 68 74 6d 6c 3b 20 63 68 | 61 72 73 65 74 3d 75 74 |html; ch|arset=ut|
|00000100| 66 2d 38 22 3e 0a 3c 4d | 45 54 41 20 4e 41 4d 45 |f-8">.<M|ETA NAME|
|00000110| 3d 22 76 69 65 77 70 6f | 72 74 22 20 43 4f 4e 54 |="viewpo|rt" CONT|
|00000120| 45 4e 54 3d 22 77 69 64 | 74 68 3d 64 65 76 69 63 |ENT="wid|th=devic|
|00000130| 65 2d 77 69 64 74 68 2c | 20 69 6e 69 74 69 61 6c |e-width,| initial|
|00000140| 2d 73 63 61 6c 65 3d 31 | 2e 30 22 3e 0a 3c 4d 45 |-scale=1|.0">.<ME|
|00000150| 54 41 20 4e 41 4d 45 3d | 22 47 65 6e 65 72 61 74 |TA NAME=|"Generat|
|00000160| 6f 72 22 20 43 4f 4e 54 | 45 4e 54 3d 22 4c 61 54 |or" CONT|ENT="LaT|
|00000170| 65 58 32 48 54 4d 4c 20 | 76 32 30 32 32 22 3e 0a |eX2HTML |v2022">.|
|00000180| 0a 3c 4c 49 4e 4b 20 52 | 45 4c 3d 22 53 54 59 4c |.<LINK R|EL="STYL|
|00000190| 45 53 48 45 45 54 22 20 | 48 52 45 46 3d 22 74 65 |ESHEET" |HREF="te|
|000001a0| 78 2e 63 73 73 22 3e 0a | 0a 3c 4c 49 4e 4b 20 52 |x.css">.|.<LINK R|
|000001b0| 45 4c 3d 22 6e 65 78 74 | 22 20 48 52 45 46 3d 22 |EL="next|" HREF="|
|000001c0| 6e 6f 64 65 32 5f 6d 6e | 2e 68 74 6d 6c 22 3e 0a |node2_mn|.html">.|
|000001d0| 3c 4c 49 4e 4b 20 52 45 | 4c 3d 22 70 72 65 76 69 |<LINK RE|L="previ|
|000001e0| 6f 75 73 22 20 48 52 45 | 46 3d 22 74 65 78 5f 6d |ous" HRE|F="tex_m|
|000001f0| 6e 2e 68 74 6d 6c 22 3e | 0a 3c 4c 49 4e 4b 20 52 |n.html">|.<LINK R|
|00000200| 45 4c 3d 22 75 70 22 20 | 48 52 45 46 3d 22 74 65 |EL="up" |HREF="te|
|00000210| 78 5f 6d 6e 2e 68 74 6d | 6c 22 3e 0a 3c 4c 49 4e |x_mn.htm|l">.<LIN|
|00000220| 4b 20 52 45 4c 3d 22 6e | 65 78 74 22 20 48 52 45 |K REL="n|ext" HRE|
|00000230| 46 3d 22 6e 6f 64 65 32 | 5f 6d 6e 2e 68 74 6d 6c |F="node2|_mn.html|
|00000240| 22 3e 0a 3c 2f 48 45 41 | 44 3e 0a 20 0a 3c 42 4f |">.</HEA|D>. .<BO|
|00000250| 44 59 20 62 67 63 6f 6c | 6f 72 3d 22 23 66 66 66 |DY bgcol|or="#fff|
|00000260| 66 66 66 22 20 74 65 78 | 74 3d 22 23 30 30 30 30 |fff" tex|t="#0000|
|00000270| 30 30 22 20 6c 69 6e 6b | 3d 22 23 39 39 34 34 45 |00" link|="#9944E|
|00000280| 45 22 20 76 6c 69 6e 6b | 3d 22 23 30 30 30 30 66 |E" vlink|="#0000f|
|00000290| 66 22 20 61 6c 69 6e 6b | 3d 22 23 30 30 66 66 30 |f" alink|="#00ff0|
|000002a0| 30 22 3e 0a 0a 3c 48 31 | 3e 3c 41 20 49 44 3d 22 |0">..<H1|><A ID="|
|000002b0| 53 45 43 54 49 4f 4e 30 | 30 30 31 30 30 30 30 30 |SECTION0|00100000|
|000002c0| 30 30 30 30 30 30 30 30 | 30 30 30 22 3e 0a 42 75 |00000000|000">.Bu|
|000002d0| 69 6c 74 2d 69 6e 20 4d | 6f 64 75 6c 65 20 67 6c |ilt-in M|odule gl|
|000002e0| 3c 2f 41 3e 0a 3c 2f 48 | 31 3e 0a 67 6c 0a 0a 3c |</A>.</H|1>.gl..<|
|000002f0| 50 3e 0a 54 68 69 73 20 | 6d 6f 64 75 6c 65 20 70 |P>.This |module p|
|00000300| 72 6f 76 69 64 65 73 20 | 61 63 63 65 73 73 20 74 |rovides |access t|
|00000310| 6f 20 74 68 65 20 53 69 | 6c 69 63 6f 6e 20 47 72 |o the Si|licon Gr|
|00000320| 61 70 68 69 63 73 0a 3c | 45 4d 3e 47 72 61 70 68 |aphics.<|EM>Graph|
|00000330| 69 63 73 20 4c 69 62 72 | 61 72 79 3c 2f 45 4d 3e |ics Libr|ary</EM>|
|00000340| 2e 0a 49 74 20 69 73 20 | 61 76 61 69 6c 61 62 6c |..It is |availabl|
|00000350| 65 20 6f 6e 6c 79 20 6f | 6e 20 53 69 6c 69 63 6f |e only o|n Silico|
|00000360| 6e 20 47 72 61 70 68 69 | 63 73 20 6d 61 63 68 69 |n Graphi|cs machi|
|00000370| 6e 65 73 2e 0a 0a 3c 50 | 3e 0a 57 61 72 6e 69 6e |nes...<P|>.Warnin|
|00000380| 67 3a 0a 53 6f 6d 65 20 | 69 6c 6c 65 67 61 6c 20 |g:.Some |illegal |
|00000390| 63 61 6c 6c 73 20 74 6f | 20 74 68 65 20 47 4c 20 |calls to| the GL |
|000003a0| 6c 69 62 72 61 72 79 20 | 63 61 75 73 65 20 74 68 |library |cause th|
|000003b0| 65 20 50 79 74 68 6f 6e | 20 69 6e 74 65 72 70 72 |e Python| interpr|
|000003c0| 65 74 65 72 20 74 6f 20 | 64 75 6d 70 0a 63 6f 72 |eter to |dump.cor|
|000003d0| 65 2e 0a 49 6e 20 70 61 | 72 74 69 63 75 6c 61 72 |e..In pa|rticular|
|000003e0| 2c 20 74 68 65 20 75 73 | 65 20 6f 66 20 6d 6f 73 |, the us|e of mos|
|000003f0| 74 20 47 4c 20 63 61 6c | 6c 73 20 69 73 20 75 6e |t GL cal|ls is un|
|00000400| 73 61 66 65 20 62 65 66 | 6f 72 65 20 74 68 65 20 |safe bef|ore the |
|00000410| 66 69 72 73 74 0a 77 69 | 6e 64 6f 77 20 69 73 20 |first.wi|ndow is |
|00000420| 6f 70 65 6e 65 64 2e 0a | 0a 3c 50 3e 0a 54 68 65 |opened..|.<P>.The|
|00000430| 20 6d 6f 64 75 6c 65 20 | 69 73 20 74 6f 6f 20 6c | module |is too l|
|00000440| 61 72 67 65 20 74 6f 20 | 64 6f 63 75 6d 65 6e 74 |arge to |document|
|00000450| 20 68 65 72 65 20 69 6e | 20 69 74 73 20 65 6e 74 | here in| its ent|
|00000460| 69 72 65 74 79 2c 20 62 | 75 74 20 74 68 65 0a 66 |irety, b|ut the.f|
|00000470| 6f 6c 6c 6f 77 69 6e 67 | 20 73 68 6f 75 6c 64 20 |ollowing| should |
|00000480| 68 65 6c 70 20 79 6f 75 | 20 74 6f 20 67 65 74 20 |help you| to get |
|00000490| 73 74 61 72 74 65 64 2e | 0a 54 68 65 20 70 61 72 |started.|.The par|
|000004a0| 61 6d 65 74 65 72 20 63 | 6f 6e 76 65 6e 74 69 6f |ameter c|onventio|
|000004b0| 6e 73 20 66 6f 72 20 74 | 68 65 20 43 20 66 75 6e |ns for t|he C fun|
|000004c0| 63 74 69 6f 6e 73 20 61 | 72 65 20 74 72 61 6e 73 |ctions a|re trans|
|000004d0| 6c 61 74 65 64 20 74 6f | 20 50 79 74 68 6f 6e 20 |lated to| Python |
|000004e0| 61 73 0a 66 6f 6c 6c 6f | 77 73 3a 0a 0a 3c 50 3e |as.follo|ws:..<P>|
|000004f0| 0a 0a 3c 55 4c 3e 0a 3c | 4c 49 3e 41 6c 6c 20 28 |..<UL>.<|LI>All (|
|00000500| 73 68 6f 72 74 2c 20 6c | 6f 6e 67 2c 20 75 6e 73 |short, l|ong, uns|
|00000510| 69 67 6e 65 64 29 20 69 | 6e 74 20 76 61 6c 75 65 |igned) i|nt value|
|00000520| 73 20 61 72 65 20 72 65 | 70 72 65 73 65 6e 74 65 |s are re|presente|
|00000530| 64 20 62 79 20 50 79 74 | 68 6f 6e 0a 69 6e 74 65 |d by Pyt|hon.inte|
|00000540| 67 65 72 73 2e 0a 3c 2f | 4c 49 3e 0a 3c 4c 49 3e |gers..</|LI>.<LI>|
|00000550| 41 6c 6c 20 66 6c 6f 61 | 74 20 61 6e 64 20 64 6f |All floa|t and do|
|00000560| 75 62 6c 65 20 76 61 6c | 75 65 73 20 61 72 65 20 |uble val|ues are |
|00000570| 72 65 70 72 65 73 65 6e | 74 65 64 20 62 79 20 50 |represen|ted by P|
|00000580| 79 74 68 6f 6e 20 66 6c | 6f 61 74 69 6e 67 20 70 |ython fl|oating p|
|00000590| 6f 69 6e 74 0a 6e 75 6d | 62 65 72 73 2e 0a 49 6e |oint.num|bers..In|
|000005a0| 20 6d 6f 73 74 20 63 61 | 73 65 73 2c 20 50 79 74 | most ca|ses, Pyt|
|000005b0| 68 6f 6e 20 69 6e 74 65 | 67 65 72 73 20 61 72 65 |hon inte|gers are|
|000005c0| 20 61 6c 73 6f 20 61 6c | 6c 6f 77 65 64 2e 0a 3c | also al|lowed..<|
|000005d0| 2f 4c 49 3e 0a 3c 4c 49 | 3e 41 6c 6c 20 61 72 72 |/LI>.<LI|>All arr|
|000005e0| 61 79 73 20 61 72 65 20 | 72 65 70 72 65 73 65 6e |ays are |represen|
|000005f0| 74 65 64 20 62 79 20 6f | 6e 65 2d 64 69 6d 65 6e |ted by o|ne-dimen|
|00000600| 73 69 6f 6e 61 6c 20 50 | 79 74 68 6f 6e 20 6c 69 |sional P|ython li|
|00000610| 73 74 73 2e 0a 49 6e 20 | 6d 6f 73 74 20 63 61 73 |sts..In |most cas|
|00000620| 65 73 2c 20 74 75 70 6c | 65 73 20 61 72 65 20 61 |es, tupl|es are a|
|00000630| 6c 73 6f 20 61 6c 6c 6f | 77 65 64 2e 0a 3c 2f 4c |lso allo|wed..</L|
|00000640| 49 3e 0a 3c 4c 49 3e 41 | 6c 6c 20 73 74 72 69 6e |I>.<LI>A|ll strin|
|00000650| 67 20 61 6e 64 20 63 68 | 61 72 61 63 74 65 72 20 |g and ch|aracter |
|00000660| 61 72 67 75 6d 65 6e 74 | 73 20 61 72 65 20 72 65 |argument|s are re|
|00000670| 70 72 65 73 65 6e 74 65 | 64 20 62 79 20 50 79 74 |presente|d by Pyt|
|00000680| 68 6f 6e 20 73 74 72 69 | 6e 67 73 2c 0a 66 6f 72 |hon stri|ngs,.for|
|00000690| 20 69 6e 73 74 61 6e 63 | 65 2c 0a 77 69 6e 6f 70 | instanc|e,.winop|
|000006a0| 65 6e 28 27 48 69 20 54 | 68 65 72 65 21 27 29 0a |en('Hi T|here!').|
|000006b0| 61 6e 64 0a 72 6f 74 61 | 74 65 28 39 30 30 2c 20 |and.rota|te(900, |
|000006c0| 27 7a 27 29 2e 0a 0a 3c | 2f 4c 49 3e 0a 3c 4c 49 |'z')...<|/LI>.<LI|
|000006d0| 3e 41 6c 6c 20 28 73 68 | 6f 72 74 2c 20 6c 6f 6e |>All (sh|ort, lon|
|000006e0| 67 2c 20 75 6e 73 69 67 | 6e 65 64 29 20 69 6e 74 |g, unsig|ned) int|
|000006f0| 65 67 65 72 20 61 72 67 | 75 6d 65 6e 74 73 20 6f |eger arg|uments o|
|00000700| 72 20 72 65 74 75 72 6e | 20 76 61 6c 75 65 73 20 |r return| values |
|00000710| 74 68 61 74 20 61 72 65 | 0a 6f 6e 6c 79 20 75 73 |that are|.only us|
|00000720| 65 64 20 74 6f 20 73 70 | 65 63 69 66 79 20 74 68 |ed to sp|ecify th|
|00000730| 65 20 6c 65 6e 67 74 68 | 20 6f 66 20 61 6e 20 61 |e length| of an a|
|00000740| 72 72 61 79 20 61 72 67 | 75 6d 65 6e 74 20 61 72 |rray arg|ument ar|
|00000750| 65 20 6f 6d 69 74 74 65 | 64 2e 0a 46 6f 72 20 65 |e omitte|d..For e|
|00000760| 78 61 6d 70 6c 65 2c 20 | 74 68 65 20 43 20 63 61 |xample, |the C ca|
|00000770| 6c 6c 0a 0a 3c 50 3e 0a | 3c 50 52 45 3e 0a 6c 6d |ll..<P>.|<PRE>.lm|
|00000780| 64 65 66 28 64 65 66 74 | 79 70 65 2c 20 69 6e 64 |def(deft|ype, ind|
|00000790| 65 78 2c 20 6e 70 2c 20 | 70 72 6f 70 73 29 0a 3c |ex, np, |props).<|
|000007a0| 2f 50 52 45 3e 0a 0a 3c | 50 3e 0a 69 73 20 74 72 |/PRE>..<|P>.is tr|
|000007b0| 61 6e 73 6c 61 74 65 64 | 20 74 6f 20 50 79 74 68 |anslated| to Pyth|
|000007c0| 6f 6e 20 61 73 0a 0a 3c | 50 3e 0a 3c 50 52 45 3e |on as..<|P>.<PRE>|
|000007d0| 0a 6c 6d 64 65 66 28 64 | 65 66 74 79 70 65 2c 20 |.lmdef(d|eftype, |
|000007e0| 69 6e 64 65 78 2c 20 70 | 72 6f 70 73 29 0a 3c 2f |index, p|rops).</|
|000007f0| 50 52 45 3e 0a 0a 3c 50 | 3e 0a 3c 2f 4c 49 3e 0a |PRE>..<P|>.</LI>.|
|00000800| 3c 4c 49 3e 4f 75 74 70 | 75 74 20 61 72 67 75 6d |<LI>Outp|ut argum|
|00000810| 65 6e 74 73 20 61 72 65 | 20 6f 6d 69 74 74 65 64 |ents are| omitted|
|00000820| 20 66 72 6f 6d 20 74 68 | 65 20 61 72 67 75 6d 65 | from th|e argume|
|00000830| 6e 74 20 6c 69 73 74 3b | 20 74 68 65 79 20 61 72 |nt list;| they ar|
|00000840| 65 0a 74 72 61 6e 73 6d | 69 74 74 65 64 20 61 73 |e.transm|itted as|
|00000850| 20 66 75 6e 63 74 69 6f | 6e 20 72 65 74 75 72 6e | functio|n return|
|00000860| 20 76 61 6c 75 65 73 20 | 69 6e 73 74 65 61 64 2e | values |instead.|
|00000870| 0a 49 66 20 6d 6f 72 65 | 20 74 68 61 6e 20 6f 6e |.If more| than on|
|00000880| 65 20 76 61 6c 75 65 20 | 6d 75 73 74 20 62 65 20 |e value |must be |
|00000890| 72 65 74 75 72 6e 65 64 | 2c 20 74 68 65 20 72 65 |returned|, the re|
|000008a0| 74 75 72 6e 20 76 61 6c | 75 65 20 69 73 20 61 20 |turn val|ue is a |
|000008b0| 74 75 70 6c 65 2e 0a 49 | 66 20 74 68 65 20 43 20 |tuple..I|f the C |
|000008c0| 66 75 6e 63 74 69 6f 6e | 20 68 61 73 20 62 6f 74 |function| has bot|
|000008d0| 68 20 61 20 72 65 67 75 | 6c 61 72 20 72 65 74 75 |h a regu|lar retu|
|000008e0| 72 6e 20 76 61 6c 75 65 | 20 28 74 68 61 74 20 69 |rn value| (that i|
|000008f0| 73 20 6e 6f 74 20 6f 6d | 69 74 74 65 64 0a 62 65 |s not om|itted.be|
|00000900| 63 61 75 73 65 20 6f 66 | 20 74 68 65 20 70 72 65 |cause of| the pre|
|00000910| 76 69 6f 75 73 20 72 75 | 6c 65 29 20 61 6e 64 20 |vious ru|le) and |
|00000920| 61 6e 20 6f 75 74 70 75 | 74 20 61 72 67 75 6d 65 |an outpu|t argume|
|00000930| 6e 74 2c 20 74 68 65 20 | 72 65 74 75 72 6e 20 76 |nt, the |return v|
|00000940| 61 6c 75 65 0a 63 6f 6d | 65 73 20 66 69 72 73 74 |alue.com|es first|
|00000950| 20 69 6e 20 74 68 65 20 | 74 75 70 6c 65 2e 0a 45 | in the |tuple..E|
|00000960| 78 61 6d 70 6c 65 73 3a | 20 74 68 65 20 43 20 63 |xamples:| the C c|
|00000970| 61 6c 6c 0a 0a 3c 50 3e | 0a 3c 50 52 45 3e 0a 67 |all..<P>|.<PRE>.g|
|00000980| 65 74 6d 63 6f 6c 6f 72 | 28 69 2c 20 26 61 6d 70 |etmcolor|(i, &amp|
|00000990| 3b 72 65 64 2c 20 26 61 | 6d 70 3b 67 72 65 65 6e |;red, &a|mp;green|
|000009a0| 2c 20 26 61 6d 70 3b 62 | 6c 75 65 29 0a 3c 2f 50 |, &amp;b|lue).</P|
|000009b0| 52 45 3e 0a 0a 3c 50 3e | 0a 69 73 20 74 72 61 6e |RE>..<P>|.is tran|
|000009c0| 73 6c 61 74 65 64 20 74 | 6f 20 50 79 74 68 6f 6e |slated t|o Python|
|000009d0| 20 61 73 0a 0a 3c 50 3e | 0a 3c 50 52 45 3e 0a 72 | as..<P>|.<PRE>.r|
|000009e0| 65 64 2c 20 67 72 65 65 | 6e 2c 20 62 6c 75 65 20 |ed, gree|n, blue |
|000009f0| 3d 20 67 65 74 6d 63 6f | 6c 6f 72 28 69 29 0a 3c |= getmco|lor(i).<|
|00000a00| 2f 50 52 45 3e 0a 0a 3c | 50 3e 0a 3c 2f 4c 49 3e |/PRE>..<|P>.</LI>|
|00000a10| 0a 3c 2f 55 4c 3e 0a 0a | 3c 50 3e 0a 54 68 65 20 |.</UL>..|<P>.The |
|00000a20| 66 6f 6c 6c 6f 77 69 6e | 67 20 66 75 6e 63 74 69 |followin|g functi|
|00000a30| 6f 6e 73 20 61 72 65 20 | 6e 6f 6e 2d 73 74 61 6e |ons are |non-stan|
|00000a40| 64 61 72 64 20 6f 72 20 | 68 61 76 65 20 73 70 65 |dard or |have spe|
|00000a50| 63 69 61 6c 20 61 72 67 | 75 6d 65 6e 74 0a 63 6f |cial arg|ument.co|
|00000a60| 6e 76 65 6e 74 69 6f 6e | 73 3a 0a 0a 3c 50 3e 0a |nvention|s:..<P>.|
|00000a70| 0a 3c 42 52 3e 0a 3c 49 | 4d 47 0a 20 20 53 54 59 |.<BR>.<I|MG. STY|
|00000a80| 4c 45 3d 22 68 65 69 67 | 68 74 3a 20 31 39 36 2e |LE="heig|ht: 196.|
|00000a90| 32 35 65 78 3b 20 76 65 | 72 74 69 63 61 6c 2d 61 |25ex; ve|rtical-a|
|00000aa0| 6c 69 67 6e 3a 20 2d 30 | 2e 37 30 65 78 3b 20 22 |lign: -0|.70ex; "|
|00000ab0| 20 53 52 43 3d 22 69 6d | 67 31 2e 70 6e 67 22 0a | SRC="im|g1.png".|
|00000ac0| 20 41 4c 54 3d 22 5c 62 | 65 67 69 6e 7b 66 75 6e | ALT="\b|egin{fun|
|00000ad0| 63 64 65 73 63 7d 7b 76 | 61 72 72 61 79 7d 7b 61 |cdesc}{v|array}{a|
|00000ae0| 72 67 75 6d 65 6e 74 7d | 0a 45 71 75 69 76 61 6c |rgument}|.Equival|
|00000af0| 65 6e 74 20 74 6f 20 62 | 75 74 20 66 61 73 74 65 |ent to b|ut faste|
|00000b00| 72 20 74 68 61 6e 20 61 | 20 6e 75 6d 62 65 72 20 |r than a| number |
|00000b10| 6f 66 0a 5c 63 6f 2e 2e | 2e 0a 2e 2e 2e 61 74 65 |of.\co..|.....ate|
|00000b20| 64 20 69 6e 20 74 68 65 | 20 6d 61 6e 20 70 61 67 |d in the| man pag|
|00000b30| 65 29 2c 0a 61 6e 64 20 | 66 6f 72 20 65 61 63 68 |e),.and |for each|
|00000b40| 20 70 6f 69 6e 74 0a 5c | 63 6f 64 65 7b 76 33 64 | point.\|code{v3d|
|00000b50| 28 29 7d 0a 69 73 20 63 | 61 6c 6c 65 64 2e 0a 5c |()}.is c|alled..\|
|00000b60| 65 6e 64 7b 66 75 6e 63 | 64 65 73 63 7d 22 3e 0a |end{func|desc}">.|
|00000b70| 3c 42 52 3e 0a 0a 3c 50 | 3e 0a 3c 42 52 3e 0a 3c |<BR>..<P|>.<BR>.<|
|00000b80| 49 4d 47 0a 20 20 53 54 | 59 4c 45 3d 22 68 65 69 |IMG. ST|YLE="hei|
|00000b90| 67 68 74 3a 20 32 2e 33 | 38 65 78 3b 20 76 65 72 |ght: 2.3|8ex; ver|
|00000ba0| 74 69 63 61 6c 2d 61 6c | 69 67 6e 3a 20 31 37 36 |tical-al|ign: 176|
|00000bb0| 2e 32 37 65 78 3b 20 22 | 20 53 52 43 3d 22 69 6d |.27ex; "| SRC="im|
|00000bc0| 67 32 2e 70 6e 67 22 0a | 20 41 4c 54 3d 22 5c 62 |g2.png".| ALT="\b|
|00000bd0| 65 67 69 6e 7b 66 75 6e | 63 64 65 73 63 7d 7b 6e |egin{fun|cdesc}{n|
|00000be0| 76 61 72 72 61 79 7d 7b | 7d 0a 45 71 75 69 76 61 |varray}{|}.Equiva|
|00000bf0| 6c 65 6e 74 20 74 6f 20 | 62 75 74 20 66 61 73 74 |lent to |but fast|
|00000c00| 65 72 20 74 68 61 6e 20 | 61 20 6e 75 6d 62 65 72 |er than |a number|
|00000c10| 20 6f 66 0a 5c 63 6f 64 | 65 7b 6e 33 66 7d 2e 2e | of.\cod|e{n3f}..|
|00000c20| 2e 0a 2e 2e 2e 65 64 20 | 66 6f 72 20 74 68 65 20 |.....ed |for the |
|00000c30| 6e 6f 72 6d 61 6c 2c 20 | 61 6e 64 20 74 68 65 6e |normal, |and then|
|00000c40| 0a 5c 63 6f 64 65 7b 76 | 33 66 28 29 7d 0a 69 73 |.\code{v|3f()}.is|
|00000c50| 20 63 61 6c 6c 65 64 20 | 66 6f 72 20 74 68 65 20 | called |for the |
|00000c60| 70 6f 69 6e 74 2e 0a 5c | 65 6e 64 7b 66 75 6e 63 |point..\|end{func|
|00000c70| 64 65 73 63 7d 22 3e 0a | 3c 42 52 3e 0a 0a 3c 50 |desc}">.|<BR>..<P|
|00000c80| 3e 0a 3c 42 52 3e 0a 3c | 49 4d 47 0a 20 20 53 54 |>.<BR>.<|IMG. ST|
|00000c90| 59 4c 45 3d 22 68 65 69 | 67 68 74 3a 20 32 2e 33 |YLE="hei|ght: 2.3|
|00000ca0| 38 65 78 3b 20 76 65 72 | 74 69 63 61 6c 2d 61 6c |8ex; ver|tical-al|
|00000cb0| 69 67 6e 3a 20 31 37 36 | 2e 32 37 65 78 3b 20 22 |ign: 176|.27ex; "|
|00000cc0| 20 53 52 43 3d 22 69 6d | 67 33 2e 70 6e 67 22 0a | SRC="im|g3.png".|
|00000cd0| 20 41 4c 54 3d 22 5c 62 | 65 67 69 6e 7b 66 75 6e | ALT="\b|egin{fun|
|00000ce0| 63 64 65 73 63 7d 7b 76 | 6e 61 72 72 61 79 7d 7b |cdesc}{v|narray}{|
|00000cf0| 7d 0a 53 69 6d 69 6c 61 | 72 20 74 6f 0a 5c 63 6f |}.Simila|r to.\co|
|00000d00| 64 65 7b 6e 76 61 72 72 | 61 79 28 29 7d 0a 62 75 |de{nvarr|ay()}.bu|
|00000d10| 74 20 74 68 65 20 70 61 | 69 72 73 20 68 61 76 65 |t the pa|irs have|
|00000d20| 20 74 68 65 20 70 6f 69 | 6e 74 20 66 69 72 73 74 | the poi|nt first|
|00000d30| 20 61 6e 64 20 74 68 65 | 20 6e 6f 72 6d 61 6c 20 | and the| normal |
|00000d40| 73 65 63 6f 6e 64 2e 0a | 5c 65 6e 64 7b 66 75 6e |second..|\end{fun|
|00000d50| 63 64 65 73 63 7d 22 3e | 0a 3c 42 52 3e 0a 0a 3c |cdesc}">|.<BR>..<|
|00000d60| 50 3e 0a 3c 42 52 3e 0a | 3c 49 4d 47 0a 20 20 53 |P>.<BR>.|<IMG. S|
|00000d70| 54 59 4c 45 3d 22 68 65 | 69 67 68 74 3a 20 32 2e |TYLE="he|ight: 2.|
|00000d80| 33 38 65 78 3b 20 76 65 | 72 74 69 63 61 6c 2d 61 |38ex; ve|rtical-a|
|00000d90| 6c 69 67 6e 3a 20 31 37 | 36 2e 32 37 65 78 3b 20 |lign: 17|6.27ex; |
|00000da0| 22 20 53 52 43 3d 22 69 | 6d 67 34 2e 70 6e 67 22 |" SRC="i|mg4.png"|
|00000db0| 0a 20 41 4c 54 3d 22 5c | 62 65 67 69 6e 7b 66 75 |. ALT="\|begin{fu|
|00000dc0| 6e 63 64 65 73 63 7d 7b | 6e 75 72 62 73 73 75 72 |ncdesc}{|nurbssur|
|00000dd0| 66 61 63 65 7d 7b 73 5f | 6b 5c 2c 20 74 5f 6b 5c |face}{s_|k\, t_k\|
|00000de0| 2c 20 63 74 6c 5c 2c 20 | 73 5f 6f 72 64 5c 2c 20 |, ctl\, |s_ord\, |
|00000df0| 74 5f 6f 72 64 5c 2c 20 | 74 79 70 65 7d 0a 44 65 |t_ord\, |type}.De|
|00000e00| 66 69 6e 65 73 20 61 2e | 2e 2e 0a 2e 2e 2e 76 61 |fines a.|......va|
|00000e10| 72 7b 73 5f 6b 7d 29 20 | 2d 20 5c 76 61 72 7b 73 |r{s_k}) |- \var{s|
|00000e20| 5f 6f 72 64 7d 5d 7d 2c | 0a 5c 63 6f 64 65 7b 5b |_ord}]},|.\code{[|
|00000e30| 6c 65 6e 28 5c 76 61 72 | 7b 74 5f 6b 7d 29 20 2d |len(\var|{t_k}) -|
|00000e40| 20 5c 76 61 72 7b 74 5f | 6f 72 64 7d 5d 7d 2e 0a | \var{t_|ord}]}..|
|00000e50| 5c 65 6e 64 7b 66 75 6e | 63 64 65 73 63 7d 22 3e |\end{fun|cdesc}">|
|00000e60| 0a 3c 42 52 3e 0a 0a 3c | 50 3e 0a 3c 42 52 3e 0a |.<BR>..<|P>.<BR>.|
|00000e70| 3c 49 4d 47 0a 20 20 53 | 54 59 4c 45 3d 22 68 65 |<IMG. S|TYLE="he|
|00000e80| 69 67 68 74 3a 20 32 2e | 33 38 65 78 3b 20 76 65 |ight: 2.|38ex; ve|
|00000e90| 72 74 69 63 61 6c 2d 61 | 6c 69 67 6e 3a 20 31 37 |rtical-a|lign: 17|
|00000ea0| 36 2e 32 37 65 78 3b 20 | 22 20 53 52 43 3d 22 69 |6.27ex; |" SRC="i|
|00000eb0| 6d 67 35 2e 70 6e 67 22 | 0a 20 41 4c 54 3d 22 5c |mg5.png"|. ALT="\|
|00000ec0| 62 65 67 69 6e 7b 66 75 | 6e 63 64 65 73 63 7d 7b |begin{fu|ncdesc}{|
|00000ed0| 6e 75 72 62 73 63 75 72 | 76 65 7d 7b 6b 6e 6f 74 |nurbscur|ve}{knot|
|00000ee0| 73 5c 2c 20 63 74 6c 70 | 6f 69 6e 74 73 5c 2c 20 |s\, ctlp|oints\, |
|00000ef0| 6f 72 64 65 72 5c 2c 20 | 74 79 70 65 7d 0a 44 65 |order\, |type}.De|
|00000f00| 66 69 6e 65 73 20 61 20 | 6e 75 72 62 73 20 63 2e |fines a |nurbs c.|
|00000f10| 2e 2e 0a 2e 2e 2e 54 68 | 65 20 6c 65 6e 67 74 68 |......Th|e length|
|00000f20| 20 6f 66 20 63 74 6c 70 | 6f 69 6e 74 73 20 69 73 | of ctlp|oints is|
|00000f30| 0a 5c 63 6f 64 65 7b 6c | 65 6e 28 5c 76 61 72 7b |.\code{l|en(\var{|
|00000f40| 6b 6e 6f 74 73 7d 29 20 | 2d 20 5c 76 61 72 7b 6f |knots}) |- \var{o|
|00000f50| 72 64 65 72 7d 7d 2e 0a | 5c 65 6e 64 7b 66 75 6e |rder}}..|\end{fun|
|00000f60| 63 64 65 73 63 7d 22 3e | 0a 3c 42 52 3e 0a 0a 3c |cdesc}">|.<BR>..<|
|00000f70| 50 3e 0a 3c 42 52 3e 0a | 3c 49 4d 47 0a 20 20 53 |P>.<BR>.|<IMG. S|
|00000f80| 54 59 4c 45 3d 22 68 65 | 69 67 68 74 3a 20 32 2e |TYLE="he|ight: 2.|
|00000f90| 33 38 65 78 3b 20 76 65 | 72 74 69 63 61 6c 2d 61 |38ex; ve|rtical-a|
|00000fa0| 6c 69 67 6e 3a 20 31 37 | 36 2e 34 30 65 78 3b 20 |lign: 17|6.40ex; |
|00000fb0| 22 20 53 52 43 3d 22 69 | 6d 67 36 2e 70 6e 67 22 |" SRC="i|mg6.png"|
|00000fc0| 0a 20 41 4c 54 3d 22 5c | 62 65 67 69 6e 7b 66 75 |. ALT="\|begin{fu|
|00000fd0| 6e 63 64 65 73 63 7d 7b | 70 77 6c 63 75 72 76 65 |ncdesc}{|pwlcurve|
|00000fe0| 7d 7b 70 6f 69 6e 74 73 | 5c 2c 20 74 79 70 65 7d |}{points|\, type}|
|00000ff0| 0a 44 65 66 69 6e 65 73 | 20 61 20 70 69 65 63 65 |.Defines| a piece|
|00001000| 77 69 73 65 2d 6c 69 6e | 65 61 72 20 63 75 72 76 |wise-lin|ear curv|
|00001010| 65 2e 0a 5c 76 61 72 7b | 70 6f 69 6e 74 73 7d 0a |e..\var{|points}.|
|00001020| 69 73 20 61 20 6c 69 73 | 74 20 6f 66 20 70 6f 69 |is a lis|t of poi|
|00001030| 6e 74 73 2e 0a 5c 76 61 | 72 7b 74 79 70 65 7d 0a |nts..\va|r{type}.|
|00001040| 6d 75 73 74 20 62 65 0a | 5c 63 6f 64 65 7b 4e 5f |must be.|\code{N_|
|00001050| 53 54 7d 2e 0a 5c 65 6e | 64 7b 66 75 6e 63 64 65 |ST}..\en|d{funcde|
|00001060| 73 63 7d 22 3e 0a 3c 42 | 52 3e 0a 0a 3c 50 3e 0a |sc}">.<B|R>..<P>.|
|00001070| 3c 42 52 3e 0a 3c 49 4d | 47 0a 20 20 53 54 59 4c |<BR>.<IM|G. STYL|
|00001080| 45 3d 22 68 65 69 67 68 | 74 3a 20 32 2e 31 37 65 |E="heigh|t: 2.17e|
|00001090| 78 3b 20 76 65 72 74 69 | 63 61 6c 2d 61 6c 69 67 |x; verti|cal-alig|
|000010a0| 6e 3a 20 31 37 36 2e 36 | 38 65 78 3b 20 22 20 53 |n: 176.6|8ex; " S|
|000010b0| 52 43 3d 22 69 6d 67 37 | 2e 70 6e 67 22 0a 20 41 |RC="img7|.png". A|
|000010c0| 4c 54 3d 22 5c 62 65 67 | 69 6e 7b 66 75 6e 63 64 |LT="\beg|in{funcd|
|000010d0| 65 73 63 7d 7b 70 69 63 | 6b 7d 7b 6e 7d 0a 5c 66 |esc}{pic|k}{n}.\f|
|000010e0| 75 6e 63 6c 69 6e 65 7b | 73 65 6c 65 63 74 7d 7b |uncline{|select}{|
|000010f0| 6e 7d 0a 54 68 65 20 6f | 6e 6c 79 20 61 72 67 75 |n}.The o|nly argu|
|00001100| 6d 65 6e 74 20 74 6f 20 | 74 68 65 73 65 20 66 75 |ment to |these fu|
|00001110| 6e 63 74 69 6f 6e 73 20 | 73 70 65 63 69 66 69 65 |nctions |specifie|
|00001120| 73 20 74 68 65 20 64 65 | 73 69 72 65 64 20 73 69 |s the de|sired si|
|00001130| 7a 65 20 6f 66 20 74 68 | 65 0a 70 69 63 6b 20 6f |ze of th|e.pick o|
|00001140| 72 20 73 65 6c 65 63 74 | 20 62 75 66 66 65 72 2e |r select| buffer.|
|00001150| 0a 5c 65 6e 64 7b 66 75 | 6e 63 64 65 73 63 7d 22 |.\end{fu|ncdesc}"|
|00001160| 3e 0a 3c 42 52 3e 0a 0a | 3c 50 3e 0a 3c 42 52 3e |>.<BR>..|<P>.<BR>|
|00001170| 0a 3c 49 4d 47 0a 20 20 | 53 54 59 4c 45 3d 22 68 |.<IMG. |STYLE="h|
|00001180| 65 69 67 68 74 3a 20 32 | 2e 31 37 65 78 3b 20 76 |eight: 2|.17ex; v|
|00001190| 65 72 74 69 63 61 6c 2d | 61 6c 69 67 6e 3a 20 31 |ertical-|align: 1|
|000011a0| 37 36 2e 35 35 65 78 3b | 20 22 20 53 52 43 3d 22 |76.55ex;| " SRC="|
|000011b0| 69 6d 67 38 2e 70 6e 67 | 22 0a 20 41 4c 54 3d 22 |img8.png|". ALT="|
|000011c0| 5c 62 65 67 69 6e 7b 66 | 75 6e 63 64 65 73 63 7d |\begin{f|uncdesc}|
|000011d0| 7b 65 6e 64 70 69 63 6b | 7d 7b 7d 0a 5c 66 75 6e |{endpick|}{}.\fun|
|000011e0| 63 6c 69 6e 65 7b 65 6e | 64 73 65 6c 65 63 74 7d |cline{en|dselect}|
|000011f0| 7b 7d 0a 54 68 65 73 65 | 20 66 75 6e 63 74 69 6f |{}.These| functio|
|00001200| 6e 73 20 68 61 76 65 20 | 6e 6f 20 61 72 67 75 6d |ns have |no argum|
|00001210| 2e 2e 2e 0a 2e 2e 2e 63 | 6b 2f 73 65 6c 65 63 74 |.......c|k/select|
|00001220| 20 62 75 66 66 65 72 2e | 0a 4e 6f 20 6d 65 74 68 | buffer.|.No meth|
|00001230| 6f 64 20 69 73 20 70 72 | 6f 76 69 64 65 64 20 74 |od is pr|ovided t|
|00001240| 6f 20 64 65 74 65 63 74 | 20 62 75 66 66 65 72 20 |o detect| buffer |
|00001250| 6f 76 65 72 72 75 6e 2e | 0a 5c 65 6e 64 7b 66 75 |overrun.|.\end{fu|
|00001260| 6e 63 64 65 73 63 7d 22 | 3e 0a 3c 42 52 3e 0a 0a |ncdesc}"|>.<BR>..|
|00001270| 3c 50 3e 0a 48 65 72 65 | 20 69 73 20 61 20 74 69 |<P>.Here| is a ti|
|00001280| 6e 79 20 62 75 74 20 63 | 6f 6d 70 6c 65 74 65 20 |ny but c|omplete |
|00001290| 65 78 61 6d 70 6c 65 20 | 47 4c 20 70 72 6f 67 72 |example |GL progr|
|000012a0| 61 6d 20 69 6e 20 50 79 | 74 68 6f 6e 3a 0a 0a 3c |am in Py|thon:..<|
|000012b0| 50 3e 0a 3c 50 52 45 3e | 0a 69 6d 70 6f 72 74 20 |P>.<PRE>|.import |
|000012c0| 67 6c 2c 20 47 4c 2c 20 | 74 69 6d 65 0a 0a 64 65 |gl, GL, |time..de|
|000012d0| 66 20 6d 61 69 6e 28 29 | 3a 0a 20 20 20 20 67 6c |f main()|:. gl|
|000012e0| 2e 66 6f 72 65 67 72 6f | 75 6e 64 28 29 0a 20 20 |.foregro|und(). |
|000012f0| 20 20 67 6c 2e 70 72 65 | 66 70 6f 73 69 74 69 6f | gl.pre|fpositio|
|00001300| 6e 28 35 30 30 2c 20 39 | 30 30 2c 20 35 30 30 2c |n(500, 9|00, 500,|
|00001310| 20 39 30 30 29 0a 20 20 | 20 20 77 20 3d 20 67 6c | 900). | w = gl|
|00001320| 2e 77 69 6e 6f 70 65 6e | 28 27 43 72 69 73 73 43 |.winopen|('CrissC|
|00001330| 72 6f 73 73 27 29 0a 20 | 20 20 20 67 6c 2e 6f 72 |ross'). | gl.or|
|00001340| 74 68 6f 32 28 30 2e 30 | 2c 20 34 30 30 2e 30 2c |tho2(0.0|, 400.0,|
|00001350| 20 30 2e 30 2c 20 34 30 | 30 2e 30 29 0a 20 20 20 | 0.0, 40|0.0). |
|00001360| 20 67 6c 2e 63 6f 6c 6f | 72 28 47 4c 2e 57 48 49 | gl.colo|r(GL.WHI|
|00001370| 54 45 29 0a 20 20 20 20 | 67 6c 2e 63 6c 65 61 72 |TE). |gl.clear|
|00001380| 28 29 0a 20 20 20 20 67 | 6c 2e 63 6f 6c 6f 72 28 |(). g|l.color(|
|00001390| 47 4c 2e 52 45 44 29 0a | 20 20 20 20 67 6c 2e 62 |GL.RED).| gl.b|
|000013a0| 67 6e 6c 69 6e 65 28 29 | 0a 20 20 20 20 67 6c 2e |gnline()|. gl.|
|000013b0| 76 32 66 28 30 2e 30 2c | 20 30 2e 30 29 0a 20 20 |v2f(0.0,| 0.0). |
|000013c0| 20 20 67 6c 2e 76 32 66 | 28 34 30 30 2e 30 2c 20 | gl.v2f|(400.0, |
|000013d0| 34 30 30 2e 30 29 0a 20 | 20 20 20 67 6c 2e 65 6e |400.0). | gl.en|
|000013e0| 64 6c 69 6e 65 28 29 0a | 20 20 20 20 67 6c 2e 62 |dline().| gl.b|
|000013f0| 67 6e 6c 69 6e 65 28 29 | 0a 20 20 20 20 67 6c 2e |gnline()|. gl.|
|00001400| 76 32 66 28 34 30 30 2e | 30 2c 20 30 2e 30 29 0a |v2f(400.|0, 0.0).|
|00001410| 20 20 20 20 67 6c 2e 76 | 32 66 28 30 2e 30 2c 20 | gl.v|2f(0.0, |
|00001420| 34 30 30 2e 30 29 0a 20 | 20 20 20 67 6c 2e 65 6e |400.0). | gl.en|
|00001430| 64 6c 69 6e 65 28 29 0a | 20 20 20 20 74 69 6d 65 |dline().| time|
|00001440| 2e 73 6c 65 65 70 28 35 | 29 0a 0a 6d 61 69 6e 28 |.sleep(5|)..main(|
|00001450| 29 0a 3c 2f 50 52 45 3e | 0a 0a 3c 50 3e 0a 0a 3c |).</PRE>|..<P>..<|
|00001460| 48 52 3e 0a 0a 3c 2f 42 | 4f 44 59 3e 0a 3c 2f 48 |HR>..</B|ODY>.</H|
|00001470| 54 4d 4c 3e 0a | |TML>. | |
+--------+-------------------------+-------------------------+--------+--------+