home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d2xx / d222 / plplot.lha / Plplot / docs / plotdoc.zoo / chapter3.tex / node12_ct.html < prev    next >
LaTeX Document  |  1989-03-26  |  4.4 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 C source text default
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% siegfried fmt/281 LaTeX (Subdocument) 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 43 6f | 6e 74 6f 75 72 20 50 6c |ts of Co|ntour Pl|
|000000b0| 6f 74 73 3c 2f 54 49 54 | 4c 45 3e 0a 0a 3c 4d 45 |ots</TIT|LE>..<ME|
|000000c0| 54 41 20 48 54 54 50 2d | 45 51 55 49 56 3d 22 43 |TA HTTP-|EQUIV="C|
|000000d0| 6f 6e 74 65 6e 74 2d 54 | 79 70 65 22 20 43 4f 4e |ontent-T|ype" CON|
|000000e0| 54 45 4e 54 3d 22 74 65 | 78 74 2f 68 74 6d 6c 3b |TENT="te|xt/html;|
|000000f0| 20 63 68 61 72 73 65 74 | 3d 75 74 66 2d 38 22 3e | charset|=utf-8">|
|00000100| 0a 3c 4d 45 54 41 20 4e | 41 4d 45 3d 22 76 69 65 |.<META N|AME="vie|
|00000110| 77 70 6f 72 74 22 20 43 | 4f 4e 54 45 4e 54 3d 22 |wport" C|ONTENT="|
|00000120| 77 69 64 74 68 3d 64 65 | 76 69 63 65 2d 77 69 64 |width=de|vice-wid|
|00000130| 74 68 2c 20 69 6e 69 74 | 69 61 6c 2d 73 63 61 6c |th, init|ial-scal|
|00000140| 65 3d 31 2e 30 22 3e 0a | 3c 4d 45 54 41 20 4e 41 |e=1.0">.|<META NA|
|00000150| 4d 45 3d 22 47 65 6e 65 | 72 61 74 6f 72 22 20 43 |ME="Gene|rator" C|
|00000160| 4f 4e 54 45 4e 54 3d 22 | 4c 61 54 65 58 32 48 54 |ONTENT="|LaTeX2HT|
|00000170| 4d 4c 20 76 32 30 32 32 | 22 3e 0a 0a 3c 4c 49 4e |ML v2022|">..<LIN|
|00000180| 4b 20 52 45 4c 3d 22 53 | 54 59 4c 45 53 48 45 45 |K REL="S|TYLESHEE|
|00000190| 54 22 20 48 52 45 46 3d | 22 63 68 61 70 74 65 72 |T" HREF=|"chapter|
|000001a0| 33 2e 63 73 73 22 3e 0a | 0a 3c 4c 49 4e 4b 20 52 |3.css">.|.<LINK R|
|000001b0| 45 4c 3d 22 70 72 65 76 | 69 6f 75 73 22 20 48 52 |EL="prev|ious" HR|
|000001c0| 45 46 3d 22 6e 6f 64 65 | 31 31 5f 6d 6e 2e 68 74 |EF="node|11_mn.ht|
|000001d0| 6d 6c 22 3e 0a 3c 4c 49 | 4e 4b 20 52 45 4c 3d 22 |ml">.<LI|NK REL="|
|000001e0| 75 70 22 20 48 52 45 46 | 3d 22 6e 6f 64 65 31 5f |up" HREF|="node1_|
|000001f0| 6d 6e 2e 68 74 6d 6c 22 | 3e 0a 3c 2f 48 45 41 44 |mn.html"|>.</HEAD|
|00000200| 3e 0a 20 0a 3c 42 4f 44 | 59 20 62 67 63 6f 6c 6f |>. .<BOD|Y bgcolo|
|00000210| 72 3d 22 23 66 66 66 66 | 66 66 22 20 74 65 78 74 |r="#ffff|ff" text|
|00000220| 3d 22 23 30 30 30 30 30 | 30 22 20 6c 69 6e 6b 3d |="#00000|0" link=|
|00000230| 22 23 39 39 34 34 45 45 | 22 20 76 6c 69 6e 6b 3d |"#9944EE|" vlink=|
|00000240| 22 23 30 30 30 30 66 66 | 22 20 61 6c 69 6e 6b 3d |"#0000ff|" alink=|
|00000250| 22 23 30 30 66 66 30 30 | 22 3e 0a 0a 3c 48 31 3e |"#00ff00|">..<H1>|
|00000260| 3c 41 20 49 44 3d 22 53 | 45 43 54 49 4f 4e 30 30 |<A ID="S|ECTION00|
|00000270| 31 31 31 30 30 30 30 30 | 30 30 30 30 30 30 30 30 |11100000|00000000|
|00000280| 30 30 30 22 3e 3c 2f 41 | 3e 3c 41 20 49 44 3d 22 |000"></A|><A ID="|
|00000290| 63 6f 6e 74 6f 75 72 22 | 3e 3c 2f 41 3e 0a 3c 42 |contour"|></A>.<B|
|000002a0| 52 3e 0a 43 6f 6e 74 6f | 75 72 20 50 6c 6f 74 73 |R>.Conto|ur Plots|
|000002b0| 0a 3c 2f 48 31 3e 0a 0a | 3c 50 3e 0a 41 20 72 6f |.</H1>..|<P>.A ro|
|000002c0| 75 74 69 6e 65 20 69 73 | 20 61 76 61 69 6c 61 62 |utine is| availab|
|000002d0| 6c 65 20 69 6e 20 50 4c | 50 4c 4f 54 20 77 68 69 |le in PL|PLOT whi|
|000002e0| 63 68 20 70 65 72 66 6f | 72 6d 73 20 61 20 63 6f |ch perfo|rms a co|
|000002f0| 6e 74 6f 75 72 20 70 6c | 6f 74 20 6f 66 20 64 61 |ntour pl|ot of da|
|00000300| 74 61 20 0a 73 74 6f 72 | 65 64 20 69 6e 20 61 20 |ta .stor|ed in a |
|00000310| 74 77 6f 2d 64 69 6d 65 | 6e 73 69 6f 6e 61 6c 20 |two-dime|nsional |
|00000320| 61 72 72 61 79 2e 20 41 | 20 63 6f 6e 74 6f 75 72 |array. A| contour|
|00000330| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 61 6c 67 6f 72 | followi|ng algor|
|00000340| 69 74 68 6d 20 69 73 0a | 75 73 65 64 2c 20 73 6f |ithm is.|used, so|
|00000350| 20 74 68 61 74 20 69 74 | 20 69 73 20 70 6f 73 73 | that it| is poss|
|00000360| 69 62 6c 65 20 74 6f 20 | 75 73 65 20 6e 6f 6e 2d |ible to |use non-|
|00000370| 63 6f 6e 74 69 6e 75 6f | 75 73 20 6c 69 6e 65 20 |continuo|us line |
|00000380| 73 74 79 6c 65 73 2e 0a | 0a 3c 50 3e 0a 54 68 65 |styles..|.<P>.The|
|00000390| 20 72 6f 75 74 69 6e 65 | 20 70 6c 63 6f 6e 74 20 | routine| plcont |
|000003a0| 68 61 73 20 74 68 65 20 | 66 6f 72 6d 0a 70 6c 63 |has the |form.plc|
|000003b0| 6f 6e 74 28 7a 2c 6e 78 | 2c 6e 79 2c 6b 78 2c 6c |ont(z,nx|,ny,kx,l|
|000003c0| 78 2c 6b 79 2c 6c 79 2c | 63 6c 65 76 65 6c 2c 6e |x,ky,ly,|clevel,n|
|000003d0| 6c 65 76 65 6c 2c 74 72 | 29 0a 77 68 65 72 65 20 |level,tr|).where |
|000003e0| 3c 54 54 3e 7a 3c 2f 54 | 54 3e 20 69 73 20 74 68 |<TT>z</T|T> is th|
|000003f0| 65 20 74 77 6f 2d 64 69 | 6d 65 6e 73 69 6f 6e 61 |e two-di|mensiona|
|00000400| 6c 20 61 72 72 61 79 20 | 6f 66 20 73 69 7a 65 20 |l array |of size |
|00000410| 3c 21 2d 2d 20 4d 41 54 | 48 0a 20 24 7b 5c 74 74 |<!-- MAT|H. ${\tt|
|00000420| 20 6e 78 7d 5c 74 69 6d | 65 73 7b 5c 74 74 20 6e | nx}\tim|es{\tt n|
|00000430| 79 7d 24 0a 20 2d 2d 3e | 0a 3c 49 4d 47 0a 20 53 |y}$. -->|.<IMG. S|
|00000440| 54 59 4c 45 3d 22 68 65 | 69 67 68 74 3a 20 32 2e |TYLE="he|ight: 2.|
|00000450| 33 38 65 78 3b 20 76 65 | 72 74 69 63 61 6c 2d 61 |38ex; ve|rtical-a|
|00000460| 6c 69 67 6e 3a 20 31 37 | 36 2e 38 35 65 78 3b 20 |lign: 17|6.85ex; |
|00000470| 22 20 53 52 43 3d 22 69 | 6d 67 31 35 2e 70 6e 67 |" SRC="i|mg15.png|
|00000480| 22 0a 20 41 4c 54 3d 22 | 24 5c 74 74 20 6e 78 24 |". ALT="|$\tt nx$|
|00000490| 22 3e 26 23 32 31 35 3b | 3c 49 4d 47 0a 20 53 54 |">&#215;|<IMG. ST|
|000004a0| 59 4c 45 3d 22 68 65 69 | 67 68 74 3a 20 31 2e 31 |YLE="hei|ght: 1.1|
|000004b0| 32 65 78 3b 20 76 65 72 | 74 69 63 61 6c 2d 61 6c |2ex; ver|tical-al|
|000004c0| 69 67 6e 3a 20 31 37 37 | 2e 37 33 65 78 3b 20 22 |ign: 177|.73ex; "|
|000004d0| 20 53 52 43 3d 22 69 6d | 67 31 36 2e 70 6e 67 22 | SRC="im|g16.png"|
|000004e0| 0a 20 41 4c 54 3d 22 24 | 5c 74 74 20 6e 79 24 22 |. ALT="$|\tt ny$"|
|000004f0| 3e 0a 63 6f 6e 74 61 69 | 6e 69 6e 67 20 73 61 6d |>.contai|ning sam|
|00000500| 70 6c 65 73 20 6f 66 20 | 74 68 65 20 66 75 6e 63 |ples of |the func|
|00000510| 74 69 6f 6e 20 74 6f 20 | 62 65 20 63 6f 6e 74 6f |tion to |be conto|
|00000520| 75 72 65 64 2e 20 54 68 | 65 20 70 61 72 61 6d 65 |ured. Th|e parame|
|00000530| 74 65 72 73 0a 3c 54 54 | 3e 6b 78 3c 2f 54 54 3e |ters.<TT|>kx</TT>|
|00000540| 2c 20 3c 54 54 3e 6c 78 | 3c 2f 54 54 3e 2c 20 3c |, <TT>lx|</TT>, <|
|00000550| 54 54 3e 6b 79 3c 2f 54 | 54 3e 20 61 6e 64 20 3c |TT>ky</T|T> and <|
|00000560| 54 54 3e 6c 79 3c 2f 54 | 54 3e 20 73 70 65 63 69 |TT>ly</T|T> speci|
|00000570| 66 79 20 74 68 65 20 70 | 6f 72 74 69 6f 6e 20 6f |fy the p|ortion o|
|00000580| 66 20 3c 54 54 3e 7a 3c | 2f 54 54 3e 0a 74 68 61 |f <TT>z<|/TT>.tha|
|00000590| 74 20 69 73 20 74 6f 20 | 62 65 20 63 6f 6e 73 69 |t is to |be consi|
|000005a0| 64 65 72 65 64 2e 20 54 | 68 65 20 61 72 72 61 79 |dered. T|he array|
|000005b0| 20 3c 54 54 3e 63 6c 65 | 76 65 6c 3c 2f 54 54 3e | <TT>cle|vel</TT>|
|000005c0| 20 6f 66 20 6c 65 6e 67 | 74 68 20 3c 54 54 3e 6e | of leng|th <TT>n|
|000005d0| 6c 65 76 65 6c 3c 2f 54 | 54 3e 0a 69 73 20 61 20 |level</T|T>.is a |
|000005e0| 6c 69 73 74 20 6f 66 20 | 74 68 65 20 64 65 73 69 |list of |the desi|
|000005f0| 72 65 64 20 63 6f 6e 74 | 6f 75 72 20 6c 65 76 65 |red cont|our leve|
|00000600| 6c 73 2e 0a 0a 3c 50 3e | 0a 54 68 65 20 70 61 74 |ls...<P>|.The pat|
|00000610| 68 20 6f 66 20 65 61 63 | 68 20 63 6f 6e 74 6f 75 |h of eac|h contou|
|00000620| 72 20 69 73 20 69 6e 69 | 74 69 61 6c 6c 79 20 63 |r is ini|tially c|
|00000630| 6f 6d 70 75 74 65 64 20 | 69 6e 20 74 65 72 6d 73 |omputed |in terms|
|00000640| 20 6f 66 20 74 68 65 20 | 76 61 6c 75 65 73 20 6f | of the |values o|
|00000650| 66 20 74 68 65 0a 61 72 | 72 61 79 20 69 6e 64 69 |f the.ar|ray indi|
|00000660| 63 69 65 73 20 77 68 69 | 63 68 20 72 61 6e 67 65 |cies whi|ch range|
|00000670| 20 66 72 6f 6d 20 31 20 | 74 6f 20 3c 54 54 3e 6e | from 1 |to <TT>n|
|00000680| 78 3c 2f 54 54 3e 20 69 | 6e 20 74 68 65 20 66 69 |x</TT> i|n the fi|
|00000690| 72 73 74 20 69 6e 64 65 | 78 20 61 6e 64 20 66 72 |rst inde|x and fr|
|000006a0| 6f 6d 0a 31 20 74 6f 20 | 3c 54 54 3e 6e 79 3c 2f |om.1 to |<TT>ny</|
|000006b0| 54 54 3e 20 69 6e 20 74 | 68 65 20 73 65 63 6f 6e |TT> in t|he secon|
|000006c0| 64 20 69 6e 64 65 78 2e | 20 42 65 66 6f 72 65 20 |d index.| Before |
|000006d0| 74 68 65 73 65 20 63 61 | 6e 20 62 65 20 64 72 61 |these ca|n be dra|
|000006e0| 77 6e 20 69 6e 20 74 68 | 65 20 63 75 72 72 65 6e |wn in th|e curren|
|000006f0| 74 0a 77 69 6e 64 6f 77 | 20 28 73 65 65 20 70 61 |t.window| (see pa|
|00000700| 67 65 20 3c 41 20 48 52 | 45 46 3d 22 6e 6f 64 65 |ge <A HR|EF="node|
|00000710| 35 5f 63 74 2e 68 74 6d | 6c 23 77 69 6e 64 6f 77 |5_ct.htm|l#window|
|00000720| 22 3e 3c 49 4d 47 20 20 | 41 4c 54 3d 22 5b 2a 5d |"><IMG |ALT="[*]|
|00000730| 22 20 53 52 43 3d 22 63 | 72 6f 73 73 72 65 66 2e |" SRC="c|rossref.|
|00000740| 70 6e 67 22 3e 3c 2f 41 | 3e 20 69 6e 20 53 65 63 |png"></A|> in Sec|
|00000750| 74 69 6f 6e 20 3c 41 20 | 48 52 45 46 3d 22 6e 6f |tion <A |HREF="no|
|00000760| 64 65 35 5f 63 74 2e 68 | 74 6d 6c 23 77 69 6e 64 |de5_ct.h|tml#wind|
|00000770| 6f 77 22 3e 3c 49 4d 47 | 20 20 41 4c 54 3d 22 5b |ow"><IMG| ALT="[|
|00000780| 2a 5d 22 20 53 52 43 3d | 22 63 72 6f 73 73 72 65 |*]" SRC=|"crossre|
|00000790| 66 2e 70 6e 67 22 3e 3c | 2f 41 3e 29 2c 20 69 74 |f.png"><|/A>), it|
|000007a0| 20 69 73 20 6e 65 63 65 | 73 73 61 72 79 20 74 6f | is nece|ssary to|
|000007b0| 0a 63 6f 6e 76 65 72 74 | 20 66 72 6f 6d 20 74 68 |.convert| from th|
|000007c0| 65 73 65 20 61 72 72 61 | 79 20 69 6e 64 69 63 69 |ese arra|y indici|
|000007d0| 65 73 20 69 6e 74 6f 20 | 77 6f 72 6c 64 20 63 6f |es into |world co|
|000007e0| 6f 72 64 69 6e 61 74 65 | 73 2e 20 54 68 69 73 20 |ordinate|s. This |
|000007f0| 69 73 20 64 6f 6e 65 20 | 62 79 0a 70 61 73 73 69 |is done |by.passi|
|00000800| 6e 67 20 61 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 |ng a poi|nter to |
|00000810| 61 20 75 73 65 72 2d 64 | 65 66 69 6e 65 64 20 66 |a user-d|efined f|
|00000820| 75 6e 63 74 69 6f 6e 20 | 74 6f 20 3c 54 54 3e 70 |unction |to <TT>p|
|00000830| 6c 63 6f 6e 74 3c 2f 54 | 54 3e 2e 20 20 54 68 69 |lcont</T|T>. Thi|
|00000840| 73 0a 66 75 6e 63 74 69 | 6f 6e 20 70 6f 69 6e 74 |s.functi|on point|
|00000850| 65 72 20 69 73 20 74 68 | 65 20 6c 61 73 74 20 61 |er is th|e last a|
|00000860| 72 67 75 6d 65 6e 74 20 | 3c 54 54 3e 74 72 3c 2f |rgument |<TT>tr</|
|00000870| 54 54 3e 2e 0a 54 68 69 | 73 20 66 75 6e 63 74 69 |TT>..Thi|s functi|
|00000880| 6f 6e 20 6d 75 73 74 20 | 62 65 20 64 65 63 6c 61 |on must |be decla|
|00000890| 72 65 64 20 61 73 20 74 | 79 70 65 20 3c 54 54 3e |red as t|ype <TT>|
|000008a0| 76 6f 69 64 3c 2f 54 54 | 3e 20 69 6e 20 74 68 65 |void</TT|> in the|
|000008b0| 0a 6d 6f 64 75 6c 65 20 | 77 68 69 63 68 20 63 61 |.module |which ca|
|000008c0| 6c 6c 73 20 3c 54 54 3e | 70 6c 63 6f 6e 74 3c 2f |lls <TT>|plcont</|
|000008d0| 54 54 3e 2e 20 54 68 69 | 73 20 74 72 61 6e 73 66 |TT>. Thi|s transf|
|000008e0| 6f 72 6d 61 74 69 6f 6e | 20 66 75 6e 63 74 69 6f |ormation| functio|
|000008f0| 6e 0a 6d 75 73 74 20 68 | 61 76 65 20 74 68 65 20 |n.must h|ave the |
|00000900| 70 61 72 61 6d 65 74 65 | 72 20 6c 69 73 74 0a 76 |paramete|r list.v|
|00000910| 6f 69 64 20 74 72 28 78 | 2c 79 2c 74 78 2c 74 79 |oid tr(x|,y,tx,ty|
|00000920| 29 3b 0a 77 68 65 72 65 | 20 3c 54 54 3e 28 78 2c |);.where| <TT>(x,|
|00000930| 79 29 3c 2f 54 54 3e 0a | 69 73 20 74 68 65 20 70 |y)</TT>.|is the p|
|00000940| 6f 69 6e 74 20 74 68 72 | 6f 75 67 68 20 77 68 69 |oint thr|ough whi|
|00000950| 63 68 20 74 68 65 20 63 | 6f 6e 74 6f 75 72 20 72 |ch the c|ontour r|
|00000960| 75 6e 73 20 65 78 70 72 | 65 73 73 65 64 20 69 6e |uns expr|essed in|
|00000970| 0a 74 65 72 6d 73 20 6f | 66 20 61 72 72 61 79 20 |.terms o|f array |
|00000980| 69 6e 64 69 63 69 65 73 | 2c 20 61 6e 64 20 3c 54 |indicies|, and <T|
|00000990| 54 3e 28 74 78 2c 74 79 | 29 3c 2f 54 54 3e 20 61 |T>(tx,ty|)</TT> a|
|000009a0| 72 65 20 70 6f 69 6e 74 | 65 72 73 20 74 6f 20 66 |re point|ers to f|
|000009b0| 6c 6f 61 74 20 76 61 72 | 69 61 62 6c 65 73 0a 77 |loat var|iables.w|
|000009c0| 68 69 63 68 20 61 72 65 | 20 74 68 65 20 77 6f 72 |hich are| the wor|
|000009d0| 6c 64 20 63 6f 6f 72 64 | 69 6e 61 74 65 73 20 6f |ld coord|inates o|
|000009e0| 66 0a 74 68 65 20 70 6f | 69 6e 74 20 77 68 69 63 |f.the po|int whic|
|000009f0| 68 20 63 6f 72 72 65 73 | 70 6f 6e 64 73 20 74 6f |h corres|ponds to|
|00000a00| 20 74 68 65 73 65 20 69 | 6e 64 69 63 69 65 73 2e | these i|ndicies.|
|00000a10| 0a 0a 3c 50 3e 0a 4f 66 | 74 65 6e 2c 20 74 68 65 |..<P>.Of|ten, the|
|00000a20| 20 74 72 61 6e 73 66 6f | 72 6d 61 74 69 6f 6e 20 | transfo|rmation |
|00000a30| 62 65 74 77 65 65 6e 20 | 61 72 72 61 79 20 69 6e |between |array in|
|00000a40| 64 69 63 69 65 73 20 61 | 6e 64 20 77 6f 72 6c 64 |dicies a|nd world|
|00000a50| 20 63 6f 6f 72 64 69 6e | 61 74 65 73 20 63 61 6e | coordin|ates can|
|00000a60| 0a 62 65 20 65 78 70 72 | 65 73 73 65 64 20 61 73 |.be expr|essed as|
|00000a70| 20 61 20 6c 69 6e 65 61 | 72 20 74 72 61 6e 73 66 | a linea|r transf|
|00000a80| 6f 72 6d 61 74 69 6f 6e | 2e 20 41 20 72 6f 75 74 |ormation|. A rout|
|00000a90| 69 6e 65 20 69 73 20 70 | 72 6f 76 69 64 65 64 20 |ine is p|rovided |
|00000aa0| 77 69 74 68 69 6e 20 74 | 68 65 0a 6c 69 62 72 61 |within t|he.libra|
|00000ab0| 72 79 20 77 68 69 63 68 | 20 63 61 6e 20 62 65 20 |ry which| can be |
|00000ac0| 70 61 73 73 65 64 20 74 | 6f 20 3c 54 54 3e 70 6c |passed t|o <TT>pl|
|00000ad0| 63 6f 6e 74 3c 2f 54 54 | 3e 20 61 73 20 74 68 65 |cont</TT|> as the|
|00000ae0| 20 70 61 72 61 6d 65 74 | 65 72 20 3c 54 54 3e 74 | paramet|er <TT>t|
|00000af0| 72 3c 2f 54 54 3e 2e 20 | 54 68 69 73 0a 74 72 61 |r</TT>. |This.tra|
|00000b00| 6e 73 66 6f 72 6d 61 74 | 69 6f 6e 20 72 6f 75 74 |nsformat|ion rout|
|00000b10| 69 6e 65 20 69 73 20 61 | 73 20 66 6f 6c 6c 6f 77 |ine is a|s follow|
|00000b20| 73 3a 0a 3c 50 52 45 3e | 0a 23 69 6e 63 6c 75 64 |s:.<PRE>|.#includ|
|00000b30| 65 20 22 70 6c 70 6c 6f | 74 2e 68 22 0a 0a 76 6f |e "plplo|t.h"..vo|
|00000b40| 69 64 20 78 66 6f 72 6d | 28 78 2c 79 2c 74 78 2c |id xform|(x,y,tx,|
|00000b50| 74 79 29 0a 66 6c 6f 61 | 74 20 78 2c 20 79 2c 20 |ty).floa|t x, y, |
|00000b60| 2a 74 78 2c 20 2a 74 79 | 3b 0a 7b 0a 20 20 20 20 |*tx, *ty|;.{. |
|00000b70| 20 20 65 78 74 65 72 6e | 20 66 6c 6f 61 74 20 74 | extern| float t|
|00000b80| 72 5b 5d 3b 0a 0a 20 20 | 20 20 20 20 2a 74 78 20 |r[];.. | *tx |
|00000b90| 3d 20 74 72 5b 30 5d 2a | 78 20 2b 20 74 72 5b 31 |= tr[0]*|x + tr[1|
|00000ba0| 5d 2a 79 20 2b 20 74 72 | 5b 32 5d 3b 0a 20 20 20 |]*y + tr|[2];. |
|00000bb0| 20 20 20 2a 74 79 20 3d | 20 74 72 5b 33 5d 2a 78 | *ty =| tr[3]*x|
|00000bc0| 20 2b 20 74 72 5b 34 5d | 2a 79 20 2b 20 74 72 5b | + tr[4]|*y + tr[|
|00000bd0| 35 5d 3b 0a 7d 0a 3c 2f | 50 52 45 3e 0a 54 68 75 |5];.}.</|PRE>.Thu|
|00000be0| 73 20 62 79 20 73 65 74 | 74 69 6e 67 20 75 70 20 |s by set|ting up |
|00000bf0| 74 68 65 20 76 61 6c 75 | 65 73 20 69 6e 20 74 68 |the valu|es in th|
|00000c00| 65 20 61 72 72 61 79 20 | 3c 54 54 3e 74 72 5b 5d |e array |<TT>tr[]|
|00000c10| 3c 2f 54 54 3e 2c 20 77 | 65 20 63 61 6e 0a 61 70 |</TT>, w|e can.ap|
|00000c20| 70 6c 79 20 61 6e 20 61 | 72 62 69 74 72 61 72 79 |ply an a|rbitrary|
|00000c30| 20 74 72 61 6e 73 6c 61 | 74 69 6f 6e 2c 20 72 6f | transla|tion, ro|
|00000c40| 74 61 74 69 6f 6e 20 61 | 6e 64 2f 6f 72 20 73 68 |tation a|nd/or sh|
|00000c50| 65 61 72 20 74 6f 20 74 | 68 65 20 61 72 72 61 79 |ear to t|he array|
|00000c60| 20 62 65 66 6f 72 65 0a | 64 72 61 77 69 6e 67 20 | before.|drawing |
|00000c70| 6f 75 74 20 74 68 65 20 | 63 6f 6e 74 6f 75 72 73 |out the |contours|
|00000c80| 2e 20 42 79 20 64 65 66 | 69 6e 69 6e 67 20 6f 74 |. By def|ining ot|
|00000c90| 68 65 72 20 74 72 61 6e | 73 66 6f 72 6d 61 74 69 |her tran|sformati|
|00000ca0| 6f 6e 20 73 75 62 72 6f | 75 74 69 6e 65 73 2c 0a |on subro|utines,.|
|00000cb0| 69 74 20 69 73 20 70 6f | 73 73 69 62 6c 65 20 74 |it is po|ssible t|
|00000cc0| 6f 20 64 72 61 77 20 63 | 6f 6e 74 6f 75 72 73 20 |o draw c|ontours |
|00000cd0| 77 72 61 70 70 65 64 20 | 61 72 6f 75 6e 64 20 70 |wrapped |around p|
|00000ce0| 6f 6c 61 72 20 67 72 69 | 64 73 20 65 74 63 2e 0a |olar gri|ds etc..|
|00000cf0| 0a 3c 50 3e 0a 41 73 20 | 61 6e 20 65 78 61 6d 70 |.<P>.As |an examp|
|00000d00| 6c 65 20 69 6e 20 73 65 | 74 74 69 6e 67 20 75 70 |le in se|tting up|
|00000d10| 20 3c 54 54 3e 74 72 5b | 5d 3c 2f 54 54 3e 2c 20 | <TT>tr[|]</TT>, |
|00000d20| 73 75 70 70 6f 73 65 20 | 74 68 61 74 20 74 68 65 |suppose |that the|
|00000d30| 20 61 72 72 61 79 20 3c | 54 54 3e 7a 3c 2f 54 54 | array <|TT>z</TT|
|00000d40| 3e 20 0a 69 73 20 6f 66 | 20 73 69 7a 65 20 3c 21 |> .is of| size <!|
|00000d50| 2d 2d 20 4d 41 54 48 0a | 20 24 32 31 20 5c 74 69 |-- MATH.| $21 \ti|
|00000d60| 6d 65 73 20 34 31 24 0a | 20 2d 2d 3e 0a 32 31 26 |mes 41$.| -->.21&|
|00000d70| 23 32 31 35 3b 34 31 20 | 61 6e 64 20 63 6f 6e 74 |#215;41 |and cont|
|00000d80| 61 69 6e 73 20 74 68 65 | 20 76 61 6c 75 65 73 20 |ains the| values |
|00000d90| 6f 66 20 74 68 65 20 66 | 75 6e 63 74 69 6f 6e 20 |of the f|unction |
|00000da0| 0a 3c 49 3e 7a 3c 2f 49 | 3e 5b 3c 49 3e 78 3c 2f |.<I>z</I|>[<I>x</|
|00000db0| 49 3e 5d 5b 3c 49 3e 79 | 3c 2f 49 3e 5d 2c 0a 77 |I>][<I>y|</I>],.w|
|00000dc0| 68 65 72 65 20 3c 49 3e | 78 3c 2f 49 3e 20 72 61 |here <I>|x</I> ra|
|00000dd0| 6e 67 65 73 20 66 72 6f | 6d 20 30 2e 30 20 74 6f |nges fro|m 0.0 to|
|00000de0| 20 34 2e 30 20 61 6e 64 | 20 3c 49 3e 79 3c 2f 49 | 4.0 and| <I>y</I|
|00000df0| 3e 20 72 61 6e 67 65 73 | 20 66 72 6f 6d 20 2d 38 |> ranges| from -8|
|00000e00| 2e 30 20 74 6f 20 38 2e | 30 2e 20 0a 46 75 72 74 |.0 to 8.|0. .Furt|
|00000e10| 68 65 72 6d 6f 72 65 2c | 0a 6c 65 74 20 75 73 20 |hermore,|.let us |
|00000e20| 61 6c 73 6f 20 73 75 70 | 70 6f 73 65 20 74 68 61 |also sup|pose tha|
|00000e30| 74 20 74 68 65 20 77 69 | 6e 64 6f 77 20 28 61 73 |t the wi|ndow (as|
|00000e40| 20 64 65 66 69 6e 65 64 | 20 75 73 69 6e 67 20 3c | defined| using <|
|00000e50| 54 54 3e 70 6c 65 6e 76 | 3c 2f 54 54 3e 20 6f 72 |TT>plenv|</TT> or|
|00000e60| 0a 3c 54 54 3e 70 6c 77 | 69 6e 64 3c 2f 54 54 3e |.<TT>plw|ind</TT>|
|00000e70| 29 20 63 6f 76 65 72 73 | 20 74 68 69 73 20 72 61 |) covers| this ra|
|00000e80| 6e 67 65 20 6f 66 20 77 | 6f 72 6c 64 20 63 6f 6f |nge of w|orld coo|
|00000e90| 72 64 69 6e 61 74 65 73 | 2e 20 0a 53 69 6e 63 65 |rdinates|. .Since|
|00000ea0| 20 77 65 20 77 69 73 68 | 20 74 68 65 20 69 6e 64 | we wish| the ind|
|00000eb0| 65 78 0a 28 31 2c 31 29 | 20 69 6e 20 61 72 72 61 |ex.(1,1)| in arra|
|00000ec0| 79 20 3c 54 54 3e 7a 3c | 2f 54 54 3e 20 74 6f 20 |y <TT>z<|/TT> to |
|00000ed0| 6d 61 70 20 74 6f 20 28 | 30 2e 30 2c 2d 38 2e 30 |map to (|0.0,-8.0|
|00000ee0| 29 20 61 6e 64 20 74 68 | 65 20 69 6e 64 65 78 20 |) and th|e index |
|00000ef0| 28 32 31 2c 34 31 29 20 | 74 6f 20 6d 61 70 0a 74 |(21,41) |to map.t|
|00000f00| 6f 20 28 34 2e 30 2c 38 | 2e 30 29 2c 20 61 6e 64 |o (4.0,8|.0), and|
|00000f10| 20 66 6f 72 20 74 68 65 | 72 65 20 74 6f 20 62 65 | for the|re to be|
|00000f20| 20 6e 6f 20 73 6b 65 77 | 20 69 6e 20 74 68 65 20 | no skew| in the |
|00000f30| 61 78 65 73 2c 20 77 65 | 20 73 68 6f 75 6c 64 20 |axes, we| should |
|00000f40| 63 68 6f 6f 73 65 0a 65 | 6c 65 6d 65 6e 74 73 20 |choose.e|lements |
|00000f50| 6f 66 20 3c 54 54 3e 74 | 72 5b 5d 3c 2f 54 54 3e |of <TT>t|r[]</TT>|
|00000f60| 20 73 6f 20 74 68 61 74 | 0a 3c 50 3e 3c 21 2d 2d | so that|.<P><!--|
|00000f70| 20 4d 41 54 48 0a 20 5c | 62 65 67 69 6e 7b 64 69 | MATH. \|begin{di|
|00000f80| 73 70 6c 61 79 6d 61 74 | 68 7d 0a 5c 62 65 67 69 |splaymat|h}.\begi|
|00000f90| 6e 7b 61 72 72 61 79 7d | 7b 6c 40 7b 5c 3b 3d 5c |n{array}|{l@{\;=\|
|00000fa0| 3b 7d 6c 7d 0a 20 20 20 | 74 78 20 26 20 30 2e 32 |;}l}. |tx & 0.2|
|00000fb0| 78 20 2d 20 30 2e 32 20 | 5c 5c 0a 20 20 20 74 79 |x - 0.2 |\\. ty|
|00000fc0| 20 26 20 30 2e 34 79 20 | 2d 20 38 2e 34 0a 20 20 | & 0.4y |- 8.4. |
|00000fd0| 20 5c 65 6e 64 7b 61 72 | 72 61 79 7d 0a 5c 65 6e | \end{ar|ray}.\en|
|00000fe0| 64 7b 64 69 73 70 6c 61 | 79 6d 61 74 68 7d 0a 20 |d{displa|ymath}. |
|00000ff0| 2d 2d 3e 0a 3c 2f 50 3e | 0a 3c 44 49 56 20 41 4c |-->.</P>|.<DIV AL|
|00001000| 49 47 4e 3d 22 43 45 4e | 54 45 52 22 3e 0a 3c 54 |IGN="CEN|TER">.<T|
|00001010| 41 42 4c 45 3e 0a 3c 54 | 52 20 56 41 4c 49 47 4e |ABLE>.<T|R VALIGN|
|00001020| 3d 22 4d 49 44 44 4c 45 | 22 3e 3c 54 44 20 41 4c |="MIDDLE|"><TD AL|
|00001030| 49 47 4e 3d 22 4c 45 46 | 54 22 3e 3c 49 3e 74 78 |IGN="LEF|T"><I>tx|
|00001040| 3c 2f 49 3e 3c 2f 54 44 | 3e 0a 3c 54 44 20 41 4c |</I></TD|>.<TD AL|
|00001050| 49 47 4e 3d 22 4c 45 46 | 54 22 3e 26 6e 62 73 70 |IGN="LEF|T">&nbsp|
|00001060| 3b 3d 26 6e 62 73 70 3b | 3c 2f 54 44 3e 3c 54 44 |;=&nbsp;|</TD><TD|
|00001070| 20 41 4c 49 47 4e 3d 22 | 4c 45 46 54 22 3e 26 6e | ALIGN="|LEFT">&n|
|00001080| 62 73 70 3b 3c 2f 54 44 | 3e 0a 3c 2f 54 52 3e 0a |bsp;</TD|>.</TR>.|
|00001090| 3c 54 52 20 56 41 4c 49 | 47 4e 3d 22 4d 49 44 44 |<TR VALI|GN="MIDD|
|000010a0| 4c 45 22 3e 3c 54 44 20 | 41 4c 49 47 4e 3d 22 4c |LE"><TD |ALIGN="L|
|000010b0| 45 46 54 22 3e 3c 49 3e | 74 79 3c 2f 49 3e 3c 2f |EFT"><I>|ty</I></|
|000010c0| 54 44 3e 0a 3c 54 44 20 | 41 4c 49 47 4e 3d 22 4c |TD>.<TD |ALIGN="L|
|000010d0| 45 46 54 22 3e 26 6e 62 | 73 70 3b 3d 26 6e 62 73 |EFT">&nb|sp;=&nbs|
|000010e0| 70 3b 3c 2f 54 44 3e 3c | 54 44 20 41 4c 49 47 4e |p;</TD><|TD ALIGN|
|000010f0| 3d 22 4c 45 46 54 22 3e | 26 6e 62 73 70 3b 3c 2f |="LEFT">|&nbsp;</|
|00001100| 54 44 3e 0a 3c 2f 54 52 | 3e 0a 3c 2f 54 41 42 4c |TD>.</TR|>.</TABL|
|00001110| 45 3e 0a 3c 2f 44 49 56 | 3e 3c 50 3e 3c 2f 50 3e |E>.</DIV|><P></P>|
|00001120| 0a 61 6e 64 20 73 6f 20 | 3c 54 54 3e 74 72 5b 30 |.and so |<TT>tr[0|
|00001130| 5d 3d 30 2e 32 3c 2f 54 | 54 3e 2c 20 3c 54 54 3e |]=0.2</T|T>, <TT>|
|00001140| 74 72 5b 31 5d 3d 30 2e | 30 3c 2f 54 54 3e 2c 20 |tr[1]=0.|0</TT>, |
|00001150| 3c 54 54 3e 74 72 5b 32 | 5d 3d 2d 30 2e 32 3c 2f |<TT>tr[2|]=-0.2</|
|00001160| 54 54 3e 2c 0a 3c 54 54 | 3e 74 72 5b 33 5d 3d 30 |TT>,.<TT|>tr[3]=0|
|00001170| 2e 30 3c 2f 54 54 3e 2c | 20 3c 54 54 3e 74 72 5b |.0</TT>,| <TT>tr[|
|00001180| 34 5d 3d 30 2e 34 3c 2f | 54 54 3e 2c 20 3c 54 54 |4]=0.4</|TT>, <TT|
|00001190| 3e 74 72 5b 35 5d 3d 2d | 38 2e 34 3c 2f 54 54 3e |>tr[5]=-|8.4</TT>|
|000011a0| 2e 0a 0a 3c 50 3e 0a 0a | 3c 48 52 3e 0a 0a 3c 2f |...<P>..|<HR>..</|
|000011b0| 42 4f 44 59 3e 0a 3c 2f | 48 54 4d 4c 3e 0a |BODY>.</|HTML>. |
+--------+-------------------------+-------------------------+--------+--------+