home *** CD-ROM | disk | FTP | other *** search
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: doc.tex
Confidence | Program | Detection | Match Type | Support
|
---|
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, with CR line terminators
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[CR]
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [ttxt] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 0d 25 20 20 54 68 69 73 | 20 69 73 20 6f 62 73 6f |.% This| is obso|
|00000010| 6c 65 74 65 20 72 65 67 | 61 72 64 69 6e 67 20 74 |lete reg|arding t|
|00000020| 68 65 20 58 20 73 79 73 | 74 65 6d 20 20 2d 2d 20 |he X sys|tem -- |
|00000030| 6a 63 70 0d 0d 25 20 2d | 2a 2d 6c 61 74 65 78 2d |jcp..% -|*-latex-|
|00000040| 2a 2d 0d 25 20 43 72 65 | 61 74 6f 72 3a 20 4a 6f |*-.% Cre|ator: Jo|
|00000050| 68 6e 20 54 69 6e 6d 6f | 75 74 68 0d 25 20 43 72 |hn Tinmo|uth.% Cr|
|00000060| 65 61 74 69 6f 6e 20 44 | 61 74 65 3a 20 54 68 75 |eation D|ate: Thu|
|00000070| 20 4d 61 79 20 39 20 31 | 39 39 31 0d 5c 64 6f 63 | May 9 1|991.\doc|
|00000080| 75 6d 65 6e 74 73 74 79 | 6c 65 5b 31 31 70 74 5d |umentsty|le[11pt]|
|00000090| 7b 61 72 74 69 63 6c 65 | 7d 0d 5c 6e 65 77 63 6f |{article|}.\newco|
|000000a0| 6d 6d 61 6e 64 7b 5c 58 | 7d 5b 31 5d 7b 7b 23 31 |mmand{\X|}[1]{{#1|
|000000b0| 7d 5c 69 6e 64 65 78 7b | 7b 23 31 7d 7d 7d 0d 5c |}\index{|{#1}}}.\|
|000000c0| 62 65 67 69 6e 7b 64 6f | 63 75 6d 65 6e 74 7d 0d |begin{do|cument}.|
|000000d0| 0d 5c 74 69 74 6c 65 7b | 41 20 46 75 6e 63 74 69 |.\title{|A Functi|
|000000e0| 6f 6e 61 6c 20 41 6e 69 | 6d 61 74 69 6f 6e 20 50 |onal Ani|mation P|
|000000f0| 61 63 6b 61 67 65 20 69 | 6e 20 48 61 73 6b 65 6c |ackage i|n Haskel|
|00000100| 6c 7d 0d 5c 61 75 74 68 | 6f 72 7b 0d 20 20 20 20 |l}.\auth|or{. |
|00000110| 20 20 20 20 4a 6f 68 6e | 20 54 69 6e 6d 6f 75 74 | John| Tinmout|
|00000120| 68 5c 5c 0d 20 20 20 20 | 20 20 20 20 43 6f 6d 70 |h\\. | Comp|
|00000130| 75 74 65 72 20 53 63 69 | 65 6e 63 65 20 53 65 6e |uter Sci|ence Sen|
|00000140| 69 6f 72 20 50 72 6f 6a | 65 63 74 5c 5c 0d 20 20 |ior Proj|ect\\. |
|00000150| 20 20 20 20 20 20 20 59 | 61 6c 65 20 55 6e 69 76 | Y|ale Univ|
|00000160| 65 72 73 69 74 79 5c 5c | 0d 20 20 20 20 20 20 20 |ersity\\|. |
|00000170| 20 20 50 72 6f 66 65 73 | 73 6f 72 20 50 61 75 6c | Profes|sor Paul|
|00000180| 20 48 75 64 61 6b 20 7d | 0d 5c 64 61 74 65 7b 39 | Hudak }|.\date{9|
|00000190| 20 4d 61 79 20 31 39 39 | 31 7d 0d 5c 6d 61 6b 65 | May 199|1}.\make|
|000001a0| 74 69 74 6c 65 0d 0d 0d | 0d 5c 73 65 63 74 69 6f |title...|.\sectio|
|000001b0| 6e 7b 49 6e 74 72 6f 64 | 75 63 74 69 6f 6e 7d 0d |n{Introd|uction}.|
|000001c0| 0d 20 20 09 49 6e 20 68 | 69 73 20 70 61 70 65 72 |. .In h|is paper|
|000001d0| 20 22 41 20 46 75 6e 63 | 74 69 6f 6e 61 6c 20 41 | "A Func|tional A|
|000001e0| 6e 69 6d 61 74 69 6f 6e | 20 53 74 61 72 74 65 72 |nimation| Starter|
|000001f0| 20 4b 69 74 22 20 5b 41 | 52 59 41 38 38 5d 2c 20 | Kit" [A|RYA88], |
|00000200| 4b 65 76 69 20 41 72 79 | 61 20 0d 70 72 6f 70 6f |Kevi Ary|a .propo|
|00000210| 73 65 73 20 61 6e 20 61 | 70 70 72 6f 61 63 68 20 |ses an a|pproach |
|00000220| 74 6f 20 61 6e 69 6d 61 | 74 69 6f 6e 20 74 68 61 |to anima|tion tha|
|00000230| 74 20 75 73 65 73 20 66 | 75 6e 63 74 69 6f 6e 61 |t uses f|unctiona|
|00000240| 6c 20 6c 61 6e 67 75 61 | 67 65 73 2e 20 41 73 0d |l langua|ges. As.|
|00000250| 41 72 79 61 20 64 65 73 | 63 72 69 62 65 73 2c 20 |Arya des|cribes, |
|00000260| 74 68 65 20 63 6f 73 74 | 20 6f 66 20 63 6f 6d 70 |the cost| of comp|
|00000270| 75 74 69 6e 67 20 70 6f | 77 65 72 20 69 73 20 66 |uting po|wer is f|
|00000280| 61 6c 6c 69 6e 67 2e 20 | 54 68 69 73 20 69 73 20 |alling. |This is |
|00000290| 6d 61 6b 69 6e 67 0d 74 | 68 65 20 75 73 65 20 6f |making.t|he use o|
|000002a0| 66 20 63 6f 6d 70 75 74 | 65 72 20 61 6e 69 6d 61 |f comput|er anima|
|000002b0| 74 69 6f 6e 20 6d 75 63 | 68 20 6d 6f 72 65 20 70 |tion muc|h more p|
|000002c0| 72 65 76 61 6c 65 6e 74 | 2e 20 48 6f 77 65 76 65 |revalent|. Howeve|
|000002d0| 72 2c 20 6c 61 6e 67 75 | 61 67 65 73 0d 73 75 63 |r, langu|ages.suc|
|000002e0| 68 20 61 73 20 43 20 6d | 61 6b 65 20 69 74 20 64 |h as C m|ake it d|
|000002f0| 69 66 66 69 63 75 6c 74 | 20 74 6f 20 70 72 6f 67 |ifficult| to prog|
|00000300| 72 61 6d 20 61 6e 69 6d | 61 74 69 6f 6e 73 2e 20 |ram anim|ations. |
|00000310| 57 68 61 74 20 69 73 20 | 6e 65 65 64 65 64 20 69 |What is |needed i|
|00000320| 73 0d 61 20 73 69 6d 70 | 6c 65 72 2c 20 66 61 73 |s.a simp|ler, fas|
|00000330| 74 65 72 20 61 6e 64 20 | 6d 6f 72 65 20 61 63 63 |ter and |more acc|
|00000340| 65 73 73 69 62 6c 65 20 | 77 61 79 20 74 6f 20 70 |essible |way to p|
|00000350| 72 6f 67 72 61 6d 20 67 | 72 61 70 68 69 63 73 2e |rogram g|raphics.|
|00000360| 20 46 75 6e 63 74 69 6f | 6e 61 6c 0d 6c 61 6e 67 | Functio|nal.lang|
|00000370| 75 61 67 65 73 20 61 72 | 65 20 61 20 76 65 72 79 |uages ar|e a very|
|00000380| 20 65 66 66 65 63 74 69 | 76 65 20 6d 65 61 6e 73 | effecti|ve means|
|00000390| 20 66 6f 72 20 74 68 69 | 73 2c 20 64 75 65 20 74 | for thi|s, due t|
|000003a0| 6f 20 74 68 65 69 72 20 | 68 69 67 68 65 72 20 6f |o their |higher o|
|000003b0| 72 64 65 72 0d 66 75 6e | 63 74 69 6f 6e 73 2e 0d |rder.fun|ctions..|
|000003c0| 20 0d 09 4b 65 76 69 20 | 41 72 79 61 20 67 6f 65 | ..Kevi |Arya goe|
|000003d0| 73 20 6f 6e 20 74 6f 20 | 70 72 6f 76 69 64 65 20 |s on to |provide |
|000003e0| 73 75 63 68 20 61 20 66 | 75 6e 63 74 69 6f 6e 61 |such a f|unctiona|
|000003f0| 6c 20 61 6e 69 6d 61 74 | 69 6f 6e 20 70 61 63 6b |l animat|ion pack|
|00000400| 61 67 65 20 69 6e 0d 74 | 68 65 20 6c 61 6e 67 75 |age in.t|he langu|
|00000410| 61 67 65 20 4d 69 72 61 | 6e 64 61 2e 20 48 61 73 |age Mira|nda. Has|
|00000420| 6b 65 6c 6c 20 69 6e 20 | 70 61 72 74 69 63 75 6c |kell in |particul|
|00000430| 61 72 20 69 73 20 67 6f | 6f 64 20 66 75 6e 63 74 |ar is go|od funct|
|00000440| 69 6f 6e 61 6c 20 6c 61 | 6e 67 75 61 67 65 20 66 |ional la|nguage f|
|00000450| 6f 72 0d 74 77 6f 20 72 | 65 61 73 6f 6e 73 2e 20 |or.two r|easons. |
|00000460| 49 74 20 69 73 20 61 20 | 63 6f 6d 70 6c 65 74 65 |It is a |complete|
|00000470| 6c 79 20 66 75 6e 63 74 | 69 6f 6e 61 6c 20 6c 61 |ly funct|ional la|
|00000480| 6e 67 75 61 67 65 2c 20 | 64 6f 69 6e 67 20 65 76 |nguage, |doing ev|
|00000490| 65 6e 20 49 2f 4f 20 69 | 6e 20 61 20 0d 66 75 6e |en I/O i|n a .fun|
|000004a0| 63 74 69 6f 6e 61 6c 20 | 6d 61 6e 6e 65 72 2e 20 |ctional |manner. |
|000004b0| 56 61 72 69 61 62 6c 65 | 73 20 61 72 65 20 65 76 |Variable|s are ev|
|000004c0| 61 6c 75 61 74 65 64 20 | 69 6e 20 61 20 6c 61 7a |aluated |in a laz|
|000004d0| 79 20 6d 61 6e 6e 65 72 | 20 61 6c 6c 6f 77 69 6e |y manner| allowin|
|000004e0| 67 20 69 6e 66 69 6e 69 | 74 65 20 0d 6c 69 73 74 |g infini|te .list|
|000004f0| 73 20 74 6f 20 62 65 20 | 6d 61 6e 69 70 75 6c 61 |s to be |manipula|
|00000500| 74 65 64 20 65 61 73 69 | 6c 79 2c 20 77 68 69 63 |ted easi|ly, whic|
|00000510| 68 20 73 75 69 74 73 20 | 74 68 65 20 69 6e 66 69 |h suits |the infi|
|00000520| 6e 69 74 65 20 66 72 61 | 6d 65 73 20 66 6f 72 6d |nite fra|mes form|
|00000530| 61 74 0d 6f 66 20 61 6e | 69 6d 61 74 69 6f 6e 2e |at.of an|imation.|
|00000540| 20 41 73 20 69 74 20 69 | 73 20 6e 6f 77 20 70 6f | As it i|s now po|
|00000550| 73 73 69 62 6c 65 20 74 | 6f 20 63 6f 6d 70 6c 65 |ssible t|o comple|
|00000560| 74 65 20 74 68 65 20 69 | 6d 70 6c 65 6d 65 6e 74 |te the i|mplement|
|00000570| 61 74 69 6f 6e 20 6f 66 | 0d 74 68 69 73 20 70 61 |ation of|.this pa|
|00000580| 63 6b 61 67 65 20 69 73 | 20 48 61 73 6b 65 6c 6c |ckage is| Haskell|
|00000590| 2c 20 6d 79 20 77 6f 72 | 6b 20 68 61 73 20 62 65 |, my wor|k has be|
|000005a0| 65 6e 20 63 6f 6e 76 65 | 72 74 69 6e 67 20 74 68 |en conve|rting th|
|000005b0| 65 73 65 20 4d 69 72 61 | 6e 64 61 20 70 72 6f 67 |ese Mira|nda prog|
|000005c0| 72 61 6d 73 0d 74 6f 20 | 48 61 73 6b 65 6c 6c 20 |rams.to |Haskell |
|000005d0| 76 65 72 73 69 6f 6e 20 | 31 2e 30 2d 30 2c 20 59 |version |1.0-0, Y|
|000005e0| 61 6c 65 20 48 61 73 6b | 65 6c 6c 20 47 72 6f 75 |ale Hask|ell Grou|
|000005f0| 70 2e 20 0d 0d 0d 20 20 | 0d 5c 73 65 63 74 69 6f |p. ... |.\sectio|
|00000600| 6e 7b 48 6f 77 20 74 6f | 20 55 73 65 20 74 68 65 |n{How to| Use the|
|00000610| 20 47 72 61 70 68 69 63 | 73 3a 20 20 4f 76 65 72 | Graphic|s: Over|
|00000620| 76 69 65 77 7d 0d 0d 20 | 20 42 79 20 75 73 69 6e |view}.. | By usin|
|00000630| 67 20 68 69 67 68 65 72 | 20 6f 72 64 65 72 20 66 |g higher| order f|
|00000640| 75 6e 63 74 69 6f 6e 73 | 2c 20 69 74 20 62 65 63 |unctions|, it bec|
|00000650| 6f 6d 65 73 20 76 65 72 | 79 20 65 61 73 79 20 74 |omes ver|y easy t|
|00000660| 6f 20 64 6f 20 72 61 70 | 69 64 20 0d 70 72 6f 74 |o do rap|id .prot|
|00000670| 6f 74 79 70 69 6e 67 20 | 6f 66 20 61 6e 69 6d 61 |otyping |of anima|
|00000680| 74 69 6f 6e 73 2e 20 59 | 6f 75 20 63 61 6e 20 71 |tions. Y|ou can q|
|00000690| 75 69 63 6b 6c 79 20 74 | 68 72 6f 77 20 6f 75 74 |uickly t|hrow out|
|000006a0| 20 61 6e 20 61 6e 69 6d | 61 74 69 6f 6e 20 6f 66 | an anim|ation of|
|000006b0| 0d 73 69 6d 70 6c 65 20 | 69 6d 61 67 65 73 20 6d |.simple |images m|
|000006c0| 61 6e 69 70 75 6c 61 74 | 65 64 20 69 6e 20 73 69 |anipulat|ed in si|
|000006d0| 6d 70 6c 65 20 77 61 79 | 73 2e 20 46 6f 72 20 65 |mple way|s. For e|
|000006e0| 78 61 6d 70 6c 65 2c 20 | 69 66 20 74 68 65 72 65 |xample, |if there|
|000006f0| 20 77 61 73 0d 61 6e 20 | 69 6d 61 67 65 20 6f 66 | was.an |image of|
|00000700| 20 61 20 63 61 72 2c 20 | 61 6e 64 20 79 6f 75 20 | a car, |and you |
|00000710| 77 61 6e 74 65 64 20 69 | 74 20 74 6f 20 6d 6f 76 |wanted i|t to mov|
|00000720| 65 20 6c 65 66 74 2c 20 | 79 6f 75 20 63 6f 75 6c |e left, |you coul|
|00000730| 64 20 61 6c 6d 6f 73 74 | 20 0d 6a 75 73 74 20 64 |d almost| .just d|
|00000740| 65 73 63 72 69 62 65 20 | 69 74 20 69 6e 20 65 6e |escribe |it in en|
|00000750| 67 6c 69 73 68 2c 20 61 | 6e 64 20 74 68 61 74 20 |glish, a|nd that |
|00000760| 77 6f 75 6c 64 20 62 65 | 20 74 68 65 20 61 6e 69 |would be| the ani|
|00000770| 6d 61 74 69 6f 6e 2e 0d | 5c 62 65 67 69 6e 7b 76 |mation..|\begin{v|
|00000780| 65 72 62 61 74 69 6d 7d | 0d 20 20 20 20 20 6d 6f |erbatim}|. mo|
|00000790| 76 69 65 20 3d 20 61 70 | 70 6c 79 20 6c 65 66 74 |vie = ap|ply left|
|000007a0| 20 63 61 72 0d 5c 65 6e | 64 7b 76 65 72 62 61 74 | car.\en|d{verbat|
|000007b0| 69 6d 7d 0d 0d 09 41 66 | 74 65 72 20 74 68 65 20 |im}...Af|ter the |
|000007c0| 73 69 6d 70 6c 65 20 6d | 6f 64 65 6c 20 69 73 20 |simple m|odel is |
|000007d0| 64 6f 6e 65 2c 20 63 6f | 6e 76 65 72 74 69 6e 67 |done, co|nverting|
|000007e0| 20 69 74 20 74 6f 20 61 | 20 6d 6f 72 65 20 63 6f | it to a| more co|
|000007f0| 6d 70 6c 65 78 20 6d 6f | 64 65 6c 0d 69 73 20 73 |mplex mo|del.is s|
|00000800| 69 6d 70 6c 65 2e 20 53 | 69 6d 70 6c 79 20 6d 61 |imple. S|imply ma|
|00000810| 6b 65 20 74 68 65 20 69 | 6d 61 67 65 2c 20 22 63 |ke the i|mage, "c|
|00000820| 61 72 22 20 69 6e 20 74 | 68 69 73 20 63 61 73 65 |ar" in t|his case|
|00000830| 2c 20 6d 6f 72 65 20 63 | 6f 6d 70 6c 65 78 2c 20 |, more c|omplex, |
|00000840| 61 6e 64 0d 74 68 65 6e | 20 6d 6f 64 69 66 79 20 |and.then| modify |
|00000850| 74 68 65 20 22 6c 65 66 | 74 22 20 66 75 6e 63 74 |the "lef|t" funct|
|00000860| 69 6f 6e 2c 20 61 6e 64 | 20 79 6f 75 20 61 72 65 |ion, and| you are|
|00000870| 20 64 6f 6e 65 2e 0d 0d | 09 54 68 65 72 65 20 61 | done...|.There a|
|00000880| 72 65 20 74 68 72 65 65 | 20 73 74 61 67 65 73 20 |re three| stages |
|00000890| 69 6e 20 6d 61 6b 69 6e | 67 20 61 20 6d 6f 76 69 |in makin|g a movi|
|000008a0| 65 2e 20 46 69 72 73 74 | 20 6f 66 20 61 6c 6c 2c |e. First| of all,|
|000008b0| 20 79 6f 75 20 6d 75 73 | 74 0d 64 65 66 69 6e 65 | you mus|t.define|
|000008c0| 20 79 6f 75 72 20 62 61 | 73 69 63 20 69 6d 61 67 | your ba|sic imag|
|000008d0| 65 73 2e 20 54 68 65 73 | 65 20 77 69 6c 6c 20 74 |es. Thes|e will t|
|000008e0| 65 6e 64 20 74 6f 20 62 | 65 20 50 69 63 73 20 70 |end to b|e Pics p|
|000008f0| 75 74 20 69 6e 74 6f 20 | 6c 69 73 74 73 2c 20 65 |ut into |lists, e|
|00000900| 69 74 68 65 72 0d 66 69 | 6e 69 74 65 20 6f 72 20 |ither.fi|nite or |
|00000910| 69 6e 66 69 6e 69 74 65 | 2c 20 74 6f 20 62 65 20 |infinite|, to be |
|00000920| 62 61 73 69 63 20 4d 6f | 76 69 65 73 2e 20 53 65 |basic Mo|vies. Se|
|00000930| 63 6f 6e 64 2c 20 79 6f | 75 20 64 65 63 69 64 65 |cond, yo|u decide|
|00000940| 20 70 72 65 63 69 73 65 | 6c 79 0d 77 68 61 74 20 | precise|ly.what |
|00000950| 6b 69 6e 64 20 6f 66 20 | 6d 6f 74 69 6f 6e 20 79 |kind of |motion y|
|00000960| 6f 75 20 77 61 6e 74 20 | 69 6e 20 61 6e 69 6d 61 |ou want |in anima|
|00000970| 74 69 6f 6e 2e 20 54 68 | 65 73 65 20 61 72 65 20 |tion. Th|ese are |
|00000980| 62 65 68 61 76 69 6f 75 | 72 73 2e 20 41 20 62 65 |behaviou|rs. A be|
|00000990| 68 61 76 69 6f 75 72 0d | 6d 6f 64 69 66 69 65 73 |haviour.|modifies|
|000009a0| 20 61 20 6d 6f 76 69 65 | 20 6f 76 65 72 20 74 69 | a movie| over ti|
|000009b0| 6d 65 2c 20 63 68 61 6e | 67 69 6e 67 20 65 61 63 |me, chan|ging eac|
|000009c0| 68 20 73 75 63 63 65 73 | 73 69 76 65 20 66 72 61 |h succes|sive fra|
|000009d0| 6d 65 2e 20 54 68 69 73 | 20 69 6e 63 6c 75 64 65 |me. This| include|
|000009e0| 73 0d 6d 6f 74 69 6f 6e | 2c 20 63 68 61 6e 67 69 |s.motion|, changi|
|000009f0| 6e 67 20 73 69 7a 65 2c | 20 63 68 61 6e 67 69 6e |ng size,| changin|
|00000a00| 67 20 66 72 6f 6d 20 6f | 6e 65 20 69 6d 61 67 65 |g from o|ne image|
|00000a10| 20 74 6f 20 61 6e 6f 74 | 68 65 72 20 61 6e 64 20 | to anot|her and |
|00000a20| 73 6f 20 66 6f 72 74 68 | 2e 20 54 68 65 73 65 20 |so forth|. These |
|00000a30| 0d 61 72 65 20 61 70 70 | 6c 69 65 64 20 74 6f 20 |.are app|lied to |
|00000a40| 79 6f 75 72 20 62 61 73 | 69 63 20 4d 6f 76 69 65 |your bas|ic Movie|
|00000a50| 73 2e 20 54 68 69 72 64 | 2c 20 79 6f 75 20 6d 75 |s. Third|, you mu|
|00000a60| 73 74 20 63 6f 6d 62 69 | 6e 65 20 79 6f 75 72 20 |st combi|ne your |
|00000a70| 62 61 73 69 63 20 4d 6f | 76 69 65 73 0d 69 6e 74 |basic Mo|vies.int|
|00000a80| 6f 20 79 6f 75 72 20 66 | 69 6e 61 6c 20 4d 6f 76 |o your f|inal Mov|
|00000a90| 69 65 2e 20 49 66 20 79 | 6f 75 20 77 61 6e 74 20 |ie. If y|ou want |
|00000aa0| 61 20 73 63 65 6e 65 20 | 6f 66 20 63 6c 6f 75 64 |a scene |of cloud|
|00000ab0| 73 20 61 6e 64 20 61 20 | 6d 61 6e 20 77 61 6c 6b |s and a |man walk|
|00000ac0| 69 6e 67 2c 20 79 6f 75 | 0d 6d 75 73 74 20 6f 76 |ing, you|.must ov|
|00000ad0| 65 72 6c 61 79 20 79 6f | 75 72 20 62 61 73 69 63 |erlay yo|ur basic|
|00000ae0| 20 4d 6f 76 69 65 20 6f | 66 20 63 6c 6f 75 64 73 | Movie o|f clouds|
|00000af0| 20 77 69 74 68 20 79 6f | 75 72 20 4d 6f 76 69 65 | with yo|ur Movie|
|00000b00| 20 6f 66 20 61 20 77 61 | 6c 6b 69 6e 67 20 6d 61 | of a wa|lking ma|
|00000b10| 6e 2e 0d 0d 5c 73 65 63 | 74 69 6f 6e 20 7b 4f 72 |n...\sec|tion {Or|
|00000b20| 69 67 69 6e 61 6c 20 49 | 6d 61 67 65 73 20 6f 72 |iginal I|mages or|
|00000b30| 20 50 69 63 73 7d 0d 0d | 09 41 20 4d 6f 76 69 65 | Pics}..|.A Movie|
|00000b40| 20 69 73 20 61 20 6c 69 | 73 74 20 6f 66 20 66 72 | is a li|st of fr|
|00000b50| 61 6d 65 73 20 63 61 6c | 6c 65 64 20 50 69 63 73 |ames cal|led Pics|
|00000b60| 2e 20 45 61 63 68 20 6f | 66 20 74 68 65 73 65 20 |. Each o|f these |
|00000b70| 50 69 63 73 20 69 73 20 | 61 20 6c 69 73 74 20 0d |Pics is |a list .|
|00000b80| 6f 66 20 63 6f 6c 6f 72 | 65 64 20 70 6f 6c 79 67 |of color|ed polyg|
|00000b90| 6f 6e 73 2e 20 54 68 65 | 20 50 69 63 20 69 73 20 |ons. The| Pic is |
|00000ba0| 61 20 43 6f 6c 6f 72 20 | 66 6f 6c 6c 6f 77 65 64 |a Color |followed|
|00000bb0| 20 62 79 20 61 20 6c 69 | 73 74 20 6f 66 20 56 65 | by a li|st of Ve|
|00000bc0| 63 74 6f 72 73 2c 20 0d | 72 65 70 72 65 73 65 6e |ctors, .|represen|
|00000bd0| 74 69 6e 67 20 74 68 65 | 20 76 65 72 74 69 63 65 |ting the| vertice|
|00000be0| 73 20 6f 66 20 74 68 65 | 20 50 6f 6c 79 67 6f 6e |s of the| Polygon|
|00000bf0| 2e 20 54 68 65 20 6f 72 | 69 67 69 6e 61 6c 20 50 |. The or|iginal P|
|00000c00| 69 63 20 75 73 75 61 6c | 6c 79 20 6d 75 73 74 0d |ic usual|ly must.|
|00000c10| 62 65 20 65 6e 74 65 72 | 65 64 20 62 79 20 68 61 |be enter|ed by ha|
|00000c20| 6e 64 2c 20 61 6c 74 68 | 6f 75 67 68 20 73 69 6d |nd, alth|ough sim|
|00000c30| 70 6c 65 20 67 65 6e 65 | 72 61 74 69 6f 6e 20 72 |ple gene|ration r|
|00000c40| 6f 75 74 69 6e 65 73 20 | 66 6f 72 20 62 6f 78 65 |outines |for boxe|
|00000c50| 73 2c 20 0d 74 72 69 61 | 6e 67 6c 65 73 20 61 6e |s, .tria|ngles an|
|00000c60| 64 20 63 69 72 63 6c 65 | 73 20 61 72 65 20 61 76 |d circle|s are av|
|00000c70| 61 69 6c 61 62 6c 65 2e | 20 59 6f 75 20 6e 65 65 |ailable.| You nee|
|00000c80| 64 20 74 6f 20 70 72 6f | 64 75 63 65 20 73 6f 6d |d to pro|duce som|
|00000c90| 65 20 6f 66 20 74 68 65 | 73 65 0d 62 61 73 69 63 |e of the|se.basic|
|00000ca0| 20 69 6d 61 67 65 73 20 | 69 6e 20 6f 6e 65 20 77 | images |in one w|
|00000cb0| 61 79 20 6f 72 20 61 6e | 6f 74 68 65 72 2c 20 73 |ay or an|other, s|
|00000cc0| 6f 20 74 68 61 74 20 79 | 6f 75 20 68 61 76 65 20 |o that y|ou have |
|00000cd0| 73 6f 6d 65 74 68 69 6e | 67 20 74 6f 20 0d 6d 61 |somethin|g to .ma|
|00000ce0| 6e 69 70 75 6c 61 74 65 | 2e 0d 0d 09 54 6f 20 6d |nipulate|....To m|
|00000cf0| 61 6b 65 20 61 20 4d 6f | 76 69 65 2c 20 79 6f 75 |ake a Mo|vie, you|
|00000d00| 20 6e 65 65 64 20 61 20 | 6c 69 73 74 20 6f 66 20 | need a |list of |
|00000d10| 74 68 65 73 65 20 50 69 | 63 73 2e 20 57 69 74 68 |these Pi|cs. With|
|00000d20| 20 61 20 73 69 6e 67 6c | 65 20 50 69 63 2c 20 79 | a singl|e Pic, y|
|00000d30| 6f 75 0d 63 61 6e 20 67 | 65 6e 65 72 61 74 65 20 |ou.can g|enerate |
|00000d40| 61 20 73 65 71 75 65 6e | 63 65 20 6f 66 20 74 68 |a sequen|ce of th|
|00000d50| 61 74 20 50 69 63 2e 20 | 57 69 74 68 20 73 65 76 |at Pic. |With sev|
|00000d60| 65 72 61 6c 20 50 69 63 | 73 2c 20 79 6f 75 20 63 |eral Pic|s, you c|
|00000d70| 61 6e 20 6f 73 63 69 6c | 6c 61 74 65 0d 74 68 72 |an oscil|late.thr|
|00000d80| 6f 75 67 68 20 74 68 65 | 20 50 69 63 73 20 69 6e |ough the| Pics in|
|00000d90| 20 61 6e 20 69 6e 69 66 | 69 6e 69 74 65 20 6c 69 | an inif|inite li|
|00000da0| 73 74 2e 20 54 6f 20 67 | 65 6e 65 72 61 74 65 20 |st. To g|enerate |
|00000db0| 61 6e 20 69 6e 66 69 6e | 69 74 65 20 6c 69 73 74 |an infin|ite list|
|00000dc0| 20 6f 66 0d 50 69 63 73 | 20 6f 66 20 70 31 2c 20 | of.Pics| of p1, |
|00000dd0| 64 65 66 69 6e 65 20 61 | 20 4d 6f 76 69 65 2c 20 |define a| Movie, |
|00000de0| 6d 31 20 3d 20 69 20 70 | 31 2e 20 0d 20 20 54 68 |m1 = i p|1. . Th|
|00000df0| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 64 61 74 61 |e follow|ing data|
|00000e00| 74 79 70 65 73 20 61 72 | 65 20 75 73 65 64 20 69 |types ar|e used i|
|00000e10| 6e 20 74 68 69 73 20 70 | 61 63 6b 61 67 65 3a 0d |n this p|ackage:.|
|00000e20| 0d 5c 62 65 67 69 6e 7b | 76 65 72 62 61 74 69 6d |.\begin{|verbatim|
|00000e30| 7d 0d 74 79 70 65 20 56 | 65 63 09 3d 20 28 49 6e |}.type V|ec.= (In|
|00000e40| 74 2c 49 6e 74 29 0d 74 | 79 70 65 20 43 6f 6c 6f |t,Int).t|ype Colo|
|00000e50| 72 09 3d 20 49 6e 74 0d | 74 79 70 65 20 50 6f 6c |r.= Int.|type Pol|
|00000e60| 79 09 3d 20 28 43 6f 6c | 6f 72 2c 5b 56 65 63 5d |y.= (Col|or,[Vec]|
|00000e70| 29 0d 74 79 70 65 20 50 | 69 63 20 09 3d 20 5b 50 |).type P|ic .= [P|
|00000e80| 6f 6c 79 5d 0d 74 79 70 | 65 20 4d 6f 76 69 65 09 |oly].typ|e Movie.|
|00000e90| 3d 20 5b 50 69 63 5d 0d | 74 79 70 65 20 42 65 68 |= [Pic].|type Beh|
|00000ea0| 61 76 69 6f 75 72 09 3d | 20 5b 50 69 63 20 2d 3e |aviour.=| [Pic ->|
|00000eb0| 20 50 69 63 5d 0d 5c 65 | 6e 64 7b 76 65 72 62 61 | Pic].\e|nd{verba|
|00000ec0| 74 69 6d 7d 0d 0d 0d 5c | 73 75 62 73 65 63 74 69 |tim}...\|subsecti|
|00000ed0| 6f 6e 20 7b 4d 6f 64 69 | 66 79 69 6e 67 20 50 69 |on {Modi|fying Pi|
|00000ee0| 63 73 7d 0d 0d 20 20 53 | 74 61 72 74 69 6e 67 20 |cs}.. S|tarting |
|00000ef0| 77 69 74 68 20 61 20 73 | 69 6e 67 6c 65 20 50 69 |with a s|ingle Pi|
|00000f00| 63 2c 20 69 74 20 69 73 | 20 70 6f 73 73 69 62 6c |c, it is| possibl|
|00000f10| 65 20 74 6f 20 63 72 65 | 61 74 65 20 61 20 73 68 |e to cre|ate a sh|
|00000f20| 6f 72 74 20 6c 69 73 74 | 20 6f 66 0d 50 69 63 73 |ort list| of.Pics|
|00000f30| 20 74 6f 20 6f 73 63 69 | 6c 6c 61 74 65 20 6f 6e | to osci|llate on|
|00000f40| 2e 20 59 6f 75 20 63 61 | 6e 20 66 6c 69 70 20 69 |. You ca|n flip i|
|00000f50| 74 2c 20 73 63 61 6c 65 | 20 69 74 2c 20 6f 72 20 |t, scale| it, or |
|00000f60| 6f 74 68 65 72 77 69 73 | 65 20 6d 6f 64 69 66 79 |otherwis|e modify|
|00000f70| 20 74 68 65 0d 6f 72 69 | 67 69 6e 61 6c 20 50 69 | the.ori|ginal Pi|
|00000f80| 63 20 28 70 31 29 20 69 | 6e 20 73 6f 6d 65 20 77 |c (p1) i|n some w|
|00000f90| 61 79 20 74 6f 20 63 72 | 65 61 74 65 20 61 6e 6f |ay to cr|eate ano|
|00000fa0| 74 68 65 72 20 50 69 63 | 20 28 70 32 29 2e 20 59 |ther Pic| (p2). Y|
|00000fb0| 6f 75 20 63 61 6e 20 65 | 69 74 68 65 72 0d 6b 65 |ou can e|ither.ke|
|00000fc0| 65 70 20 64 6f 69 6e 67 | 20 74 68 69 73 20 61 6e |ep doing| this an|
|00000fd0| 64 20 70 72 6f 64 75 63 | 65 20 4e 20 69 6d 61 67 |d produc|e N imag|
|00000fe0| 65 73 20 66 6f 72 20 61 | 20 4d 6f 76 69 65 20 6f |es for a| Movie o|
|00000ff0| 66 20 5b 70 31 2c 70 32 | 2c 2e 2e 2e 2c 70 4e 5d |f [p1,p2|,...,pN]|
|00001000| 2c 20 6f 72 20 75 73 65 | 0d 74 68 65 20 69 6e 74 |, or use|.the int|
|00001010| 65 72 70 6f 6c 61 74 69 | 6f 6e 20 66 75 6e 63 74 |erpolati|on funct|
|00001020| 69 6f 6e 73 20 61 76 61 | 69 6c 61 62 6c 65 20 74 |ions ava|ilable t|
|00001030| 6f 20 73 68 69 66 74 20 | 66 72 6f 6d 20 70 31 20 |o shift |from p1 |
|00001040| 74 6f 20 70 32 20 69 6e | 20 4e 20 66 72 61 6d 65 |to p2 in| N frame|
|00001050| 73 2c 0d 72 65 73 75 6c | 74 69 6e 67 20 69 6e 20 |s,.resul|ting in |
|00001060| 61 20 4d 6f 76 69 65 20 | 5b 70 31 2c 69 6e 74 65 |a Movie |[p1,inte|
|00001070| 72 70 31 2c 69 6e 74 65 | 72 70 32 2c 2e 2e 2e 2c |rp1,inte|rp2,...,|
|00001080| 69 6e 74 65 72 70 4e 2d | 32 2c 70 32 5d 2e 0d 20 |interpN-|2,p2].. |
|00001090| 20 54 68 65 20 6c 69 73 | 74 20 6f 66 20 73 70 65 | The lis|t of spe|
|000010a0| 63 69 66 69 63 20 50 69 | 63 2d 74 6f 2d 50 69 63 |cific Pi|c-to-Pic|
|000010b0| 20 66 75 6e 63 74 69 6f | 6e 73 20 69 73 20 69 6e | functio|ns is in|
|000010c0| 63 6c 75 64 65 64 20 69 | 6e 20 74 68 65 20 6e 65 |cluded i|n the ne|
|000010d0| 78 74 20 73 65 63 74 69 | 6f 6e 2c 0d 61 6c 6f 6e |xt secti|on,.alon|
|000010e0| 67 20 77 69 74 68 20 73 | 68 6f 72 74 20 65 78 70 |g with s|hort exp|
|000010f0| 6c 61 6e 61 74 69 6f 6e | 73 20 6f 66 20 77 68 61 |lanation|s of wha|
|00001100| 74 20 74 68 65 79 20 64 | 6f 2e 0d 0d 5c 73 75 62 |t they d|o...\sub|
|00001110| 73 65 63 74 69 6f 6e 20 | 7b 50 69 63 2d 74 6f 2d |section |{Pic-to-|
|00001120| 50 69 63 20 46 75 6e 63 | 74 69 6f 6e 73 20 41 76 |Pic Func|tions Av|
|00001130| 61 69 6c 61 62 6c 65 7d | 0d 0d 5c 62 65 67 69 6e |ailable}|..\begin|
|00001140| 7b 76 65 72 62 61 74 69 | 6d 7d 0d 6f 76 65 72 6c |{verbati|m}.overl|
|00001150| 61 79 5f 50 69 63 20 20 | 20 20 20 41 72 67 73 3a |ay_Pic | Args:|
|00001160| 20 50 69 63 20 50 69 63 | 20 0d 20 20 20 20 20 20 | Pic Pic| . |
|00001170| 20 20 20 20 20 20 20 20 | 20 20 54 68 69 73 20 74 | | This t|
|00001180| 61 6b 65 73 20 32 20 50 | 69 63 73 20 61 6e 64 20 |akes 2 P|ics and |
|00001190| 6a 75 73 74 20 70 75 74 | 73 20 74 68 65 6d 20 74 |just put|s them t|
|000011a0| 6f 67 65 74 68 65 72 20 | 69 6e 74 6f 20 6f 6e 65 |ogether |into one|
|000011b0| 20 50 69 63 2e 0d 20 20 | 20 20 20 20 20 20 20 20 | Pic.. | |
|000011c0| 20 20 20 20 20 20 6d 6f | 64 75 6c 65 3a 20 52 5f | mo|dule: R_|
|000011d0| 50 69 63 74 75 72 65 0d | 0d 70 75 74 5f 50 69 63 |Picture.|.put_Pic|
|000011e0| 09 20 20 20 20 20 20 20 | 20 41 72 67 73 3a 20 56 |. | Args: V|
|000011f0| 65 63 20 50 69 63 20 50 | 69 63 0d 20 20 20 20 20 |ec Pic P|ic. |
|00001200| 20 20 20 20 20 20 20 20 | 20 20 20 54 68 69 73 20 | | This |
|00001210| 6f 76 65 72 6c 61 79 73 | 20 74 68 65 20 74 77 6f |overlays| the two|
|00001220| 20 50 69 63 73 2c 20 70 | 75 74 74 69 6e 67 20 50 | Pics, p|utting P|
|00001230| 69 63 2d 31 27 73 20 63 | 65 6e 74 65 72 20 74 68 |ic-1's c|enter th|
|00001240| 65 20 56 65 63 20 0d 20 | 20 20 20 20 20 20 20 20 |e Vec . | |
|00001250| 20 20 20 20 20 20 20 64 | 69 73 74 61 6e 63 65 20 | d|istance |
|00001260| 61 77 61 79 20 66 72 6f | 6d 20 50 69 63 2d 32 27 |away fro|m Pic-2'|
|00001270| 73 20 63 65 6e 74 65 72 | 2e 0d 20 20 20 20 20 20 |s center|.. |
|00001280| 20 20 20 20 20 20 20 20 | 20 20 6d 6f 64 75 6c 65 | | module|
|00001290| 3a 20 52 5f 50 69 63 74 | 75 72 65 0d 0d 6f 76 65 |: R_Pict|ure..ove|
|000012a0| 72 5f 50 69 63 20 20 20 | 20 20 20 20 20 41 72 67 |r_Pic | Arg|
|000012b0| 73 3a 20 50 69 63 20 50 | 69 63 0d 20 20 20 20 20 |s: Pic P|ic. |
|000012c0| 20 20 20 20 20 20 20 20 | 20 20 20 54 68 69 73 20 | | This |
|000012d0| 70 75 74 73 20 74 77 6f | 20 69 6d 61 67 65 73 20 |puts two| images |
|000012e0| 6f 6e 20 74 6f 70 20 6f | 66 20 6f 6e 65 20 61 6e |on top o|f one an|
|000012f0| 6f 74 68 65 72 2c 20 65 | 78 70 6c 69 63 69 74 6c |other, e|xplicitl|
|00001300| 79 20 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |y . | |
|00001310| 20 20 20 63 65 6e 74 65 | 72 69 6e 67 20 74 68 65 | cente|ring the|
|00001320| 20 66 69 72 73 74 20 6f | 6e 20 74 6f 70 20 6f 66 | first o|n top of|
|00001330| 20 74 68 65 20 73 65 63 | 6f 6e 64 20 61 6e 64 20 | the sec|ond and |
|00001340| 66 6f 72 6d 73 20 6f 6e | 65 20 50 69 63 2e 0d 20 |forms on|e Pic.. |
|00001350| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d | | m|
|00001360| 6f 64 75 6c 65 3a 20 52 | 5f 50 69 63 74 75 72 65 |odule: R|_Picture|
|00001370| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001380| 20 0d 61 62 6f 76 65 5f | 50 69 63 20 20 20 20 20 | .above_|Pic |
|00001390| 20 20 41 72 67 73 3a 20 | 50 69 63 20 50 69 63 0d | Args: |Pic Pic.|
|000013a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000013b0| 54 68 69 73 20 70 75 74 | 73 20 74 68 65 20 66 69 |This put|s the fi|
|000013c0| 72 73 74 20 50 69 63 20 | 61 62 6f 76 65 20 74 68 |rst Pic |above th|
|000013d0| 65 20 73 65 63 6f 6e 64 | 20 50 69 63 2c 20 61 74 |e second| Pic, at|
|000013e0| 20 61 20 64 69 73 74 61 | 6e 63 65 0d 20 20 20 20 | a dista|nce. |
|000013f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 6f 66 20 68 | | of h|
|00001400| 61 6c 66 20 74 68 65 20 | 63 6f 6d 62 69 6e 65 64 |alf the |combined|
|00001410| 20 68 65 69 67 68 74 73 | 20 6f 66 20 74 68 65 20 | heights| of the |
|00001420| 50 69 63 73 20 61 6e 64 | 20 6f 76 65 72 6c 61 79 |Pics and| overlay|
|00001430| 73 20 74 68 65 6d 0d 20 | 20 20 20 20 20 20 20 20 |s them. | |
|00001440| 20 20 20 20 20 20 20 74 | 6f 20 66 6f 72 6d 20 6f | t|o form o|
|00001450| 6e 65 20 50 69 63 2e 0d | 20 20 20 20 20 20 20 20 |ne Pic..| |
|00001460| 20 20 20 20 20 20 20 20 | 6d 6f 64 75 6c 65 3a 20 | |module: |
|00001470| 52 5f 50 69 63 74 75 72 | 65 0d 0d 62 65 73 69 64 |R_Pictur|e..besid|
|00001480| 65 5f 50 69 63 20 20 20 | 20 20 20 41 72 67 73 3a |e_Pic | Args:|
|00001490| 20 50 69 63 20 50 69 63 | 0d 20 20 20 20 20 20 20 | Pic Pic|. |
|000014a0| 20 20 20 20 20 20 20 20 | 20 54 68 69 73 20 70 75 | | This pu|
|000014b0| 74 73 20 74 68 65 20 66 | 69 72 73 74 20 50 69 63 |ts the f|irst Pic|
|000014c0| 20 74 6f 20 74 68 65 20 | 72 69 67 68 74 20 6f 66 | to the |right of|
|000014d0| 20 74 68 65 20 73 65 63 | 6f 6e 64 20 50 69 63 2c | the sec|ond Pic,|
|000014e0| 20 61 74 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 | at. | |
|000014f0| 20 20 20 20 61 20 64 69 | 73 74 61 6e 63 65 20 6f | a di|stance o|
|00001500| 66 20 68 61 6c 66 20 74 | 68 65 20 63 6f 6d 62 69 |f half t|he combi|
|00001510| 6e 65 64 20 77 69 64 74 | 68 73 20 6f 66 20 74 68 |ned widt|hs of th|
|00001520| 65 20 50 69 63 73 20 61 | 6e 64 20 0d 20 20 20 20 |e Pics a|nd . |
|00001530| 20 20 20 20 20 20 20 20 | 20 20 20 20 6f 76 65 72 | | over|
|00001540| 6c 61 79 73 20 74 68 65 | 6d 20 74 6f 20 66 6f 72 |lays the|m to for|
|00001550| 6d 20 6f 6e 65 20 50 69 | 63 2e 0d 20 20 20 20 20 |m one Pi|c.. |
|00001560| 20 20 20 20 20 20 20 20 | 20 20 20 6d 6f 64 75 6c | | modul|
|00001570| 65 3a 20 52 5f 50 69 63 | 74 75 72 65 0d 0d 62 65 |e: R_Pic|ture..be|
|00001580| 73 69 64 65 32 5f 50 69 | 63 20 20 20 20 20 41 72 |side2_Pi|c Ar|
|00001590| 67 73 3a 20 50 69 63 20 | 50 69 63 0d 20 20 20 20 |gs: Pic |Pic. |
|000015a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 57 69 74 68 | | With|
|000015b0| 6f 75 74 68 20 61 6e 61 | 6c 79 73 69 6e 67 20 74 |outh ana|lysing t|
|000015c0| 68 65 20 77 69 64 74 68 | 73 20 6f 66 20 74 68 65 |he width|s of the|
|000015d0| 20 50 69 63 73 2c 20 69 | 74 20 70 75 74 73 20 74 | Pics, i|t puts t|
|000015e0| 68 65 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |he. | |
|000015f0| 20 20 20 66 69 72 73 74 | 20 50 69 63 20 74 68 65 | first| Pic the|
|00001600| 20 77 69 64 74 68 20 6f | 66 20 74 68 65 20 73 65 | width o|f the se|
|00001610| 63 6f 6e 64 20 50 69 63 | 20 74 6f 20 74 68 65 20 |cond Pic| to the |
|00001620| 72 69 67 68 74 20 61 6e | 64 0d 20 20 20 20 20 20 |right an|d. |
|00001630| 20 20 20 20 20 20 20 20 | 20 20 6f 76 65 72 6c 61 | | overla|
|00001640| 79 73 20 74 68 65 6d 20 | 74 6f 20 66 6f 72 6d 20 |ys them |to form |
|00001650| 6f 6e 65 20 50 69 63 2e | 0d 20 20 20 20 20 20 20 |one Pic.|. |
|00001660| 20 20 20 20 20 20 20 20 | 20 6d 6f 64 75 6c 65 3a | | module:|
|00001670| 20 52 5f 50 69 63 74 75 | 72 65 0d 0d 73 63 61 6c | R_Pictu|re..scal|
|00001680| 65 5f 50 69 63 20 20 20 | 20 20 20 20 41 72 67 73 |e_Pic | Args|
|00001690| 3a 20 49 6e 74 20 50 69 | 63 20 0d 20 20 20 20 20 |: Int Pi|c . |
|000016a0| 20 20 20 20 20 20 20 20 | 20 20 20 54 68 69 73 20 | | This |
|000016b0| 73 63 61 6c 65 73 20 74 | 68 65 20 70 69 63 74 75 |scales t|he pictu|
|000016c0| 72 65 20 69 6e 20 65 6c | 65 76 65 6e 74 68 73 20 |re in el|evenths |
|000016d0| 61 72 6f 75 6e 64 20 69 | 74 73 20 6f 77 6e 20 6f |around i|ts own o|
|000016e0| 72 69 67 69 6e 0d 20 20 | 20 20 20 20 20 20 20 20 |rigin. | |
|000016f0| 20 20 20 20 20 20 61 6e | 64 20 72 65 74 75 72 6e | an|d return|
|00001700| 73 20 74 68 61 74 20 50 | 69 63 2e 20 53 6f 20 69 |s that P|ic. So i|
|00001710| 66 20 74 68 65 20 49 6e | 74 20 69 73 20 32 32 2c |f the In|t is 22,|
|00001720| 20 74 68 65 20 50 69 63 | 20 77 69 6c 6c 0d 20 20 | the Pic| will. |
|00001730| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 73 63 | | sc|
|00001740| 61 6c 65 64 20 62 79 20 | 61 20 66 61 63 74 6f 72 |aled by |a factor|
|00001750| 20 6f 66 20 32 20 28 32 | 32 2f 31 31 29 2e 0d 20 | of 2 (2|2/11).. |
|00001760| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d | | m|
|00001770| 6f 64 75 6c 65 3a 20 52 | 5f 50 69 63 74 75 72 65 |odule: R|_Picture|
|00001780| 0d 0d 73 63 61 6c 65 5f | 72 65 6c 5f 50 69 63 20 |..scale_|rel_Pic |
|00001790| 20 20 41 72 67 73 3a 20 | 56 65 76 20 49 6e 74 20 | Args: |Vev Int |
|000017a0| 50 69 63 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |Pic. | |
|000017b0| 20 20 20 20 54 68 69 73 | 20 69 73 20 61 6e 6f 74 | This| is anot|
|000017c0| 68 65 72 20 73 63 61 6c | 69 6e 67 20 66 75 6e 63 |her scal|ing func|
|000017d0| 74 69 6f 6e 2c 20 62 75 | 74 20 69 74 20 73 63 61 |tion, bu|t it sca|
|000017e0| 6c 65 73 20 74 68 65 20 | 69 6d 61 67 65 0d 20 20 |les the |image. |
|000017f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 66 72 | | fr|
|00001800| 6f 6d 20 74 68 65 20 56 | 65 63 2c 20 74 72 65 61 |om the V|ec, trea|
|00001810| 74 69 6e 67 20 69 74 20 | 61 73 20 74 68 65 20 6f |ting it |as the o|
|00001820| 72 69 67 69 6e 2e 20 0d | 20 20 20 20 20 20 20 20 |rigin. .| |
|00001830| 20 20 20 20 20 20 20 20 | 6d 6f 64 75 6c 65 3a 20 | |module: |
|00001840| 52 5f 50 69 63 74 75 72 | 65 0d 0d 6d 6f 76 5f 50 |R_Pictur|e..mov_P|
|00001850| 69 63 20 20 20 20 20 20 | 20 20 20 41 72 67 73 3a |ic | Args:|
|00001860| 20 56 65 63 20 50 69 63 | 0d 20 20 20 20 20 20 20 | Vec Pic|. |
|00001870| 20 20 20 20 20 20 20 20 | 20 54 68 69 73 20 6d 6f | | This mo|
|00001880| 76 65 73 20 74 68 65 20 | 50 69 63 20 62 79 20 74 |ves the |Pic by t|
|00001890| 68 65 20 61 6d 6f 75 6e | 74 20 6f 66 20 74 68 65 |he amoun|t of the|
|000018a0| 20 76 65 63 74 6f 72 2e | 20 20 0d 20 20 20 20 20 | vector.| . |
|000018b0| 20 20 20 20 20 20 20 20 | 20 20 20 6d 6f 64 75 6c | | modul|
|000018c0| 65 3a 20 52 5f 50 69 63 | 74 75 72 65 0d 0d 6d 6f |e: R_Pic|ture..mo|
|000018d0| 76 74 6f 5f 50 69 63 20 | 20 20 20 20 20 20 41 72 |vto_Pic | Ar|
|000018e0| 67 73 3a 20 56 65 63 20 | 50 69 63 0d 20 20 20 20 |gs: Vec |Pic. |
|000018f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 54 68 69 73 | | This|
|00001900| 20 6d 6f 76 65 73 20 74 | 68 65 20 50 69 63 27 73 | moves t|he Pic's|
|00001910| 20 63 65 6e 74 65 72 20 | 74 6f 20 74 68 65 20 56 | center |to the V|
|00001920| 65 63 2e 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |ec.. | |
|00001930| 20 20 20 20 6d 6f 64 75 | 6c 65 3a 20 52 5f 50 69 | modu|le: R_Pi|
|00001940| 63 74 75 72 65 0d 0d 74 | 6f 5f 6f 72 69 67 20 20 |cture..t|o_orig |
|00001950| 20 20 20 20 20 20 20 41 | 72 67 73 3a 20 50 69 63 | A|rgs: Pic|
|00001960| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001970| 20 54 68 69 73 20 6d 6f | 76 65 73 20 74 68 65 20 | This mo|ves the |
|00001980| 50 69 63 27 73 20 63 65 | 6e 74 65 72 20 74 6f 20 |Pic's ce|nter to |
|00001990| 74 68 65 20 6c 6f 77 65 | 72 2c 6c 65 66 74 20 73 |the lowe|r,left s|
|000019a0| 69 64 65 20 6f 66 0d 20 | 20 20 20 20 20 20 20 20 |ide of. | |
|000019b0| 20 20 20 20 20 20 20 74 | 68 65 20 50 69 63 2e 20 | t|he Pic. |
|000019c0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000019d0| 20 6d 6f 64 75 6c 65 3a | 20 52 5f 50 69 63 74 75 | module:| R_Pictu|
|000019e0| 72 65 0d 0d 72 6f 74 5f | 50 69 63 20 20 20 20 20 |re..rot_|Pic |
|000019f0| 20 20 20 20 41 72 67 73 | 3a 20 56 65 63 20 46 6c | Args|: Vec Fl|
|00001a00| 6f 61 74 20 50 69 63 0d | 20 20 20 20 20 20 20 20 |oat Pic.| |
|00001a10| 20 20 20 20 20 20 20 20 | 54 68 69 73 20 72 6f 74 | |This rot|
|00001a20| 61 74 65 73 20 74 68 65 | 20 50 69 63 20 62 79 20 |ates the| Pic by |
|00001a30| 74 68 65 20 46 6c 6f 61 | 74 20 69 6e 20 72 61 64 |the Floa|t in rad|
|00001a40| 69 61 6e 73 2c 20 75 73 | 69 6e 67 20 74 68 65 20 |ians, us|ing the |
|00001a50| 56 65 63 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |Vec. | |
|00001a60| 20 20 20 20 61 73 20 74 | 68 65 20 6f 72 69 67 69 | as t|he origi|
|00001a70| 6e 20 6f 66 20 72 6f 74 | 61 74 69 6f 6e 2e 0d 20 |n of rot|ation.. |
|00001a80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d | | m|
|00001a90| 6f 64 75 6c 65 3a 20 52 | 5f 50 69 63 74 75 72 65 |odule: R|_Picture|
|00001aa0| 0d 0d 74 77 69 73 74 5f | 50 69 63 20 20 20 20 20 |..twist_|Pic |
|00001ab0| 20 20 41 72 67 73 3a 20 | 46 6c 6f 61 74 20 50 69 | Args: |Float Pi|
|00001ac0| 63 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |c. | |
|00001ad0| 20 20 54 68 69 73 20 72 | 6f 74 61 74 65 73 20 74 | This r|otates t|
|00001ae0| 68 65 20 50 69 63 20 62 | 79 20 74 68 65 20 46 6c |he Pic b|y the Fl|
|00001af0| 6f 61 74 20 61 6d 6f 75 | 6e 74 20 6f 66 20 72 61 |oat amou|nt of ra|
|00001b00| 64 69 61 6e 73 20 61 72 | 6f 75 6e 64 0d 20 20 20 |dians ar|ound. |
|00001b10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 69 74 73 | | its|
|00001b20| 20 6f 77 6e 20 63 65 6e | 74 65 72 2e 20 0d 20 20 | own cen|ter. . |
|00001b30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6d 6f | | mo|
|00001b40| 64 75 6c 65 3a 20 52 5f | 50 69 63 74 75 72 65 0d |dule: R_|Picture.|
|00001b50| 0d 72 6f 74 5f 50 69 63 | 27 20 20 20 20 20 20 20 |.rot_Pic|' |
|00001b60| 20 41 72 67 73 3a 20 56 | 65 63 20 50 69 63 0d 20 | Args: V|ec Pic. |
|00001b70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 54 | | T|
|00001b80| 68 69 73 20 72 6f 74 61 | 74 65 73 20 74 68 65 20 |his rota|tes the |
|00001b90| 50 69 63 20 62 79 20 61 | 20 63 65 72 74 61 69 6e |Pic by a| certain|
|00001ba0| 20 61 6d 6f 75 6e 74 20 | 28 73 65 74 20 69 6e 20 | amount |(set in |
|00001bb0| 52 5f 43 6f 6e 73 74 61 | 6e 74 73 29 0d 20 20 20 |R_Consta|nts). |
|00001bc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 75 73 69 | | usi|
|00001bd0| 6e 67 20 74 68 65 20 56 | 65 63 20 61 73 20 74 68 |ng the V|ec as th|
|00001be0| 65 20 63 65 6e 74 65 72 | 20 6f 66 20 72 6f 74 61 |e center| of rota|
|00001bf0| 74 69 6f 6e 2e 20 54 68 | 65 20 73 65 74 20 61 6d |tion. Th|e set am|
|00001c00| 6f 75 6e 74 20 6f 66 0d | 20 20 20 20 20 20 20 20 |ount of.| |
|00001c10| 20 20 20 20 20 20 20 20 | 72 6f 74 61 74 69 6f 6e | |rotation|
|00001c20| 20 6d 61 6b 65 73 20 69 | 74 20 66 61 73 74 65 72 | makes i|t faster|
|00001c30| 20 74 68 61 6e 20 72 6f | 74 5f 50 69 63 2e 0d 20 | than ro|t_Pic.. |
|00001c40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d | | m|
|00001c50| 6f 64 75 6c 65 3a 20 52 | 5f 50 69 63 74 75 72 65 |odule: R|_Picture|
|00001c60| 0d 0d 74 77 69 73 74 5f | 50 69 63 27 20 20 20 20 |..twist_|Pic' |
|00001c70| 20 20 41 72 67 73 3a 20 | 50 69 63 0d 20 20 20 20 | Args: |Pic. |
|00001c80| 20 20 20 20 20 20 20 20 | 20 20 20 20 54 68 69 73 | | This|
|00001c90| 20 72 6f 74 61 74 65 73 | 20 74 68 65 20 50 69 63 | rotates| the Pic|
|00001ca0| 20 62 79 20 61 20 63 65 | 72 74 61 69 6e 20 61 6d | by a ce|rtain am|
|00001cb0| 6f 75 74 6e 20 28 73 65 | 74 20 69 6e 20 52 5f 43 |outn (se|t in R_C|
|00001cc0| 6f 6e 73 74 61 6e 74 73 | 29 0d 20 20 20 20 20 20 |onstants|). |
|00001cd0| 20 20 20 20 20 20 20 20 | 20 20 61 72 6f 75 6e 64 | | around|
|00001ce0| 20 74 68 65 20 50 69 63 | 27 73 20 6f 72 69 67 69 | the Pic|'s origi|
|00001cf0| 6e 2e 20 54 68 65 20 73 | 65 74 20 61 6d 6f 75 6e |n. The s|et amoun|
|00001d00| 74 20 6f 66 20 72 6f 74 | 61 74 69 6f 6e 20 6d 61 |t of rot|ation ma|
|00001d10| 6b 65 73 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |kes. | |
|00001d20| 20 20 20 20 69 74 20 66 | 61 73 74 65 72 20 74 68 | it f|aster th|
|00001d30| 61 6e 20 74 77 69 73 74 | 5f 50 69 63 2e 0d 20 20 |an twist|_Pic.. |
|00001d40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6d 6f | | mo|
|00001d50| 64 75 6c 65 3a 20 52 5f | 50 69 63 74 75 72 65 0d |dule: R_|Picture.|
|00001d60| 0d 66 6c 69 70 78 5f 50 | 69 63 20 20 20 20 20 20 |.flipx_P|ic |
|00001d70| 20 41 72 67 73 3a 20 49 | 6e 74 20 50 69 63 0d 20 | Args: I|nt Pic. |
|00001d80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 54 | | T|
|00001d90| 68 69 73 20 66 6c 69 70 | 73 20 74 68 65 20 50 69 |his flip|s the Pi|
|00001da0| 63 20 61 72 6f 75 6e 64 | 20 74 68 65 20 6c 69 6e |c around| the lin|
|00001db0| 65 20 78 3d 49 6e 74 2c | 20 65 73 73 65 6e 74 69 |e x=Int,| essenti|
|00001dc0| 61 6c 6c 79 20 67 69 76 | 69 6e 67 0d 20 20 20 20 |ally giv|ing. |
|00001dd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 61 20 6d 69 | | a mi|
|00001de0| 72 72 6f 72 20 69 6d 61 | 67 65 20 6f 66 20 74 68 |rror ima|ge of th|
|00001df0| 65 20 50 69 63 2c 20 72 | 65 76 65 72 73 69 6e 67 |e Pic, r|eversing|
|00001e00| 20 72 69 67 68 74 20 61 | 6e 64 20 6c 65 66 74 2e | right a|nd left.|
|00001e10| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001e20| 20 6d 6f 64 75 6c 65 3a | 20 52 5f 50 69 63 74 75 | module:| R_Pictu|
|00001e30| 72 65 0d 0d 0d 66 6c 69 | 70 79 5f 50 69 63 20 20 |re...fli|py_Pic |
|00001e40| 20 20 20 20 20 41 72 67 | 73 3a 20 49 6e 74 20 50 | Arg|s: Int P|
|00001e50| 69 63 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ic. | |
|00001e60| 20 20 20 54 68 69 73 20 | 66 6c 69 70 73 20 74 68 | This |flips th|
|00001e70| 65 20 50 69 63 20 61 72 | 6f 75 6e 64 20 74 68 65 |e Pic ar|ound the|
|00001e80| 20 6c 69 6e 65 20 79 3d | 49 6e 74 2c 20 6d 69 72 | line y=|Int, mir|
|00001e90| 72 6f 72 2d 69 6d 61 67 | 69 6e 67 20 74 68 65 0d |ror-imag|ing the.|
|00001ea0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001eb0| 50 69 63 2c 20 72 65 76 | 65 72 73 69 6e 67 20 75 |Pic, rev|ersing u|
|00001ec0| 70 20 61 6e 64 20 64 6f | 77 6e 2e 0d 20 20 20 20 |p and do|wn.. |
|00001ed0| 20 20 20 20 20 20 20 20 | 20 20 20 20 6d 6f 64 75 | | modu|
|00001ee0| 6c 65 3a 20 52 5f 50 69 | 63 74 75 72 65 0d 0d 66 |le: R_Pi|cture..f|
|00001ef0| 6c 69 70 5f 50 69 63 20 | 20 20 20 20 20 20 20 41 |lip_Pic | A|
|00001f00| 72 67 73 3a 20 50 69 63 | 0d 20 20 20 20 20 20 20 |rgs: Pic|. |
|00001f10| 20 20 20 20 20 20 20 20 | 20 54 68 69 73 20 66 6c | | This fl|
|00001f20| 69 70 73 20 74 68 65 20 | 50 69 63 20 61 72 6f 75 |ips the |Pic arou|
|00001f30| 6e 64 20 69 74 73 20 6f | 77 6e 20 78 2d 6f 72 69 |nd its o|wn x-ori|
|00001f40| 67 69 6e 2c 20 72 65 76 | 65 72 73 69 6e 67 0d 20 |gin, rev|ersing. |
|00001f50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6c | | l|
|00001f60| 65 66 74 20 61 6e 64 20 | 72 69 67 68 74 2e 20 0d |eft and |right. .|
|00001f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f80| 6d 6f 64 75 6c 65 3a 20 | 52 5f 50 69 63 74 75 72 |module: |R_Pictur|
|00001f90| 65 0d 0d 66 6c 6f 63 6b | 5f 50 69 63 20 20 20 20 |e..flock|_Pic |
|00001fa0| 20 20 20 41 72 67 73 3a | 20 49 6e 74 20 50 69 63 | Args:| Int Pic|
|00001fb0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001fc0| 20 54 68 69 73 20 74 61 | 6b 65 73 20 74 68 65 20 | This ta|kes the |
|00001fd0| 69 6d 61 67 65 20 50 69 | 63 20 61 6e 64 20 63 6f |image Pi|c and co|
|00001fe0| 70 69 65 73 20 69 74 20 | 6f 75 74 20 49 6e 74 2a |pies it |out Int*|
|00001ff0| 49 6e 74 20 74 69 6d 65 | 73 20 69 6e 0d 20 20 20 |Int time|s in. |
|00002000| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 61 20 49 | | a I|
|00002010| 6e 74 20 62 79 20 49 6e | 74 20 67 72 69 64 20 70 |nt by In|t grid p|
|00002020| 61 74 74 65 72 6e 2c 20 | 61 6e 64 20 72 65 74 75 |attern, |and retu|
|00002030| 72 6e 73 20 74 68 61 74 | 20 61 73 20 61 6e 20 50 |rns that| as an P|
|00002040| 69 63 2e 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |ic.. | |
|00002050| 20 20 20 20 6d 6f 64 75 | 6c 65 3a 20 52 5f 50 69 | modu|le: R_Pi|
|00002060| 63 74 75 72 65 0d 0d 73 | 65 74 5f 43 6f 6c 6f 72 |cture..s|et_Color|
|00002070| 20 20 20 20 20 20 20 41 | 72 67 73 3a 20 49 6e 74 | A|rgs: Int|
|00002080| 20 50 69 63 0d 20 20 20 | 20 20 20 20 20 20 20 20 | Pic. | |
|00002090| 20 20 20 20 20 54 68 69 | 73 20 74 61 6b 65 73 20 | Thi|s takes |
|000020a0| 61 6e 20 49 6e 74 20 73 | 74 61 6e 64 69 6e 67 20 |an Int s|tanding |
|000020b0| 66 6f 72 20 61 20 63 6f | 6c 6f 72 2c 20 61 6e 64 |for a co|lor, and|
|000020c0| 20 63 68 61 6e 67 65 73 | 20 74 68 65 0d 20 20 20 | changes| the. |
|000020d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 63 6f 6c | | col|
|000020e0| 6f 72 20 6f 66 20 74 68 | 65 20 50 69 63 20 74 6f |or of th|e Pic to|
|000020f0| 20 74 68 61 74 2e 0d 20 | 20 20 20 20 20 20 20 20 | that.. | |
|00002100| 20 20 20 20 20 20 20 6d | 6f 64 75 6c 65 3a 20 52 | m|odule: R|
|00002110| 5f 50 69 63 74 75 72 65 | 20 0d 5c 65 6e 64 7b 76 |_Picture| .\end{v|
|00002120| 65 72 62 61 74 69 6d 7d | 0d 0d 5c 73 75 62 73 65 |erbatim}|..\subse|
|00002130| 63 74 69 6f 6e 7b 4f 74 | 68 65 72 20 46 75 6e 63 |ction{Ot|her Func|
|00002140| 74 69 6f 6e 73 20 66 6f | 72 20 4d 61 6e 69 70 75 |tions fo|r Manipu|
|00002150| 6c 61 74 69 6e 67 20 50 | 69 63 73 7d 0d 0d 5c 62 |lating P|ics}..\b|
|00002160| 65 67 69 6e 7b 76 65 72 | 62 61 74 69 6d 7d 0d 69 |egin{ver|batim}.i|
|00002170| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 41 | | A|
|00002180| 72 67 73 3a 20 41 6e 79 | 09 09 0d 20 20 20 20 20 |rgs: Any|... |
|00002190| 20 20 20 20 20 20 20 20 | 20 20 20 54 68 69 73 20 | | This |
|000021a0| 77 69 6c 6c 20 74 61 6b | 65 20 61 6e 79 74 68 69 |will tak|e anythi|
|000021b0| 6e 67 20 61 6e 64 20 72 | 65 74 75 72 6e 20 61 6e |ng and r|eturn an|
|000021c0| 20 69 6e 66 69 6e 69 74 | 65 20 73 74 72 65 61 6d | infinit|e stream|
|000021d0| 20 6f 66 20 74 68 65 6d | 2e 0d 20 20 20 20 20 20 | of them|.. |
|000021e0| 20 20 20 20 20 20 20 20 | 20 20 6d 6f 64 75 6c 65 | | module|
|000021f0| 3a 20 52 5f 55 74 69 6c | 69 74 79 0d 0d 6f 73 63 |: R_Util|ity..osc|
|00002200| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 41 72 67 | | Arg|
|00002210| 73 3a 20 5b 41 6e 79 5d | 0d 20 20 20 20 20 20 20 |s: [Any]|. |
|00002220| 20 20 20 20 20 20 20 20 | 20 54 68 69 73 20 77 69 | | This wi|
|00002230| 6c 6c 20 74 61 6b 65 20 | 61 20 4d 6f 76 69 65 2c |ll take |a Movie,|
|00002240| 20 77 68 69 63 68 20 69 | 73 20 61 20 6c 69 73 74 | which i|s a list|
|00002250| 20 6f 66 20 50 69 63 73 | 20 61 6e 64 20 0d 20 20 | of Pics| and . |
|00002260| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6f 73 | | os|
|00002270| 63 69 6c 6c 61 74 65 20 | 74 68 65 6d 2e 20 0d 20 |cillate |them. . |
|00002280| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002290| 20 20 20 5b 70 31 5d 20 | 20 20 20 20 20 20 20 20 | [p1] | |
|000022a0| 20 20 77 69 6c 6c 20 67 | 69 76 65 20 5b 70 31 2c | will g|ive [p1,|
|000022b0| 70 31 2c 70 31 2c 70 31 | 2e 2e 2e 2e 5d 0d 20 20 |p1,p1,p1|....]. |
|000022c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000022d0| 20 20 5b 70 31 2c 70 32 | 2c 70 33 2c 70 34 5d 20 | [p1,p2|,p3,p4] |
|000022e0| 20 77 69 6c 6c 20 67 69 | 76 65 20 5b 70 31 2c 70 | will gi|ve [p1,p|
|000022f0| 32 2c 70 33 2c 70 34 2c | 70 33 2c 70 32 2c 70 31 |2,p3,p4,|p3,p2,p1|
|00002300| 2c 70 32 2e 2e 2e 5d 0d | 20 20 20 20 20 20 20 20 |,p2...].| |
|00002310| 20 20 20 20 20 20 20 20 | 6d 6f 64 75 6c 65 3a 20 | |module: |
|00002320| 52 5f 55 74 69 6c 69 74 | 79 0d 5c 65 6e 64 7b 76 |R_Utilit|y.\end{v|
|00002330| 65 72 62 61 74 69 6d 7d | 0d 0d 5c 73 65 63 74 69 |erbatim}|..\secti|
|00002340| 6f 6e 7b 42 65 68 61 76 | 69 6f 75 72 73 20 61 6e |on{Behav|iours an|
|00002350| 64 20 74 68 65 69 72 20 | 41 70 70 6c 69 63 61 74 |d their |Applicat|
|00002360| 69 6f 6e 20 74 6f 20 4d | 6f 76 69 65 73 7d 0d 0d |ion to M|ovies}..|
|00002370| 09 41 20 42 65 68 61 76 | 69 6f 75 72 20 69 73 20 |.A Behav|iour is |
|00002380| 61 20 6c 69 73 74 20 6f | 66 20 66 75 6e 63 74 69 |a list o|f functi|
|00002390| 6f 6e 73 20 74 68 61 74 | 20 77 69 6c 6c 20 63 6f |ons that| will co|
|000023a0| 6e 76 65 72 74 20 6f 6e | 65 20 50 69 63 20 74 6f |nvert on|e Pic to|
|000023b0| 0d 61 6e 6f 74 68 65 72 | 20 50 69 63 2e 20 54 68 |.another| Pic. Th|
|000023c0| 69 73 20 6c 69 73 74 20 | 74 68 65 6e 20 63 61 6e |is list |then can|
|000023d0| 20 62 65 20 61 70 70 6c | 69 65 64 20 74 6f 20 61 | be appl|ied to a|
|000023e0| 6e 79 20 4d 6f 76 69 65 | 20 77 69 74 68 20 6f 6e |ny Movie| with on|
|000023f0| 65 0d 6f 66 20 74 68 65 | 20 61 70 70 6c 69 63 61 |e.of the| applica|
|00002400| 74 69 6f 6e 20 66 75 6e | 63 74 69 6f 6e 73 20 28 |tion fun|ctions (|
|00002410| 6d 6f 73 74 20 6f 66 74 | 65 6e 20 61 70 70 6c 79 |most oft|en apply|
|00002420| 29 2e 20 54 68 65 20 62 | 65 61 75 74 79 20 6f 66 |). The b|eauty of|
|00002430| 20 74 68 65 20 42 65 68 | 61 76 69 6f 75 72 0d 69 | the Beh|aviour.i|
|00002440| 73 20 74 68 61 74 20 6f | 6e 63 65 20 79 6f 75 20 |s that o|nce you |
|00002450| 68 61 76 65 20 61 20 62 | 65 68 61 76 69 6f 75 72 |have a b|ehaviour|
|00002460| 20 66 6f 72 20 6d 6f 76 | 69 6e 67 20 6c 65 66 74 | for mov|ing left|
|00002470| 2c 20 79 6f 75 20 63 61 | 6e 20 6d 6f 76 65 20 61 |, you ca|n move a|
|00002480| 6e 79 0d 4d 6f 76 69 65 | 20 6c 65 66 74 20 77 69 |ny.Movie| left wi|
|00002490| 74 68 6f 75 74 20 72 65 | 77 72 69 74 69 6e 67 20 |thout re|writing |
|000024a0| 74 68 65 20 72 6f 75 74 | 69 6e 65 20 65 76 65 72 |the rout|ine ever|
|000024b0| 79 20 74 69 6d 65 2e 0d | 20 20 0d 09 54 68 65 72 |y time..| ..Ther|
|000024c0| 65 20 61 72 65 20 73 70 | 65 63 69 66 69 63 20 66 |e are sp|ecific f|
|000024d0| 75 6e 63 74 69 6f 6e 73 | 20 74 68 61 74 20 74 61 |unctions| that ta|
|000024e0| 6b 65 20 61 20 42 65 68 | 61 76 69 6f 75 72 20 61 |ke a Beh|aviour a|
|000024f0| 6e 64 20 61 20 4d 6f 76 | 69 65 20 61 6e 64 0d 72 |nd a Mov|ie and.r|
|00002500| 65 74 75 72 6e 20 61 20 | 6e 65 77 20 4d 6f 76 69 |eturn a |new Movi|
|00002510| 65 2e 20 54 68 65 73 65 | 20 61 72 65 20 61 70 70 |e. These| are app|
|00002520| 6c 79 20 61 6e 64 20 77 | 68 69 6c 65 2e 20 49 66 |ly and w|hile. If|
|00002530| 20 79 6f 75 20 68 61 64 | 20 61 20 4d 6f 76 69 65 | you had| a Movie|
|00002540| 20 6f 66 20 61 0d 6d 61 | 6e 20 77 61 6c 6b 69 6e | of a.ma|n walkin|
|00002550| 67 20 69 6e 20 70 6c 61 | 63 65 2c 20 61 6e 64 20 |g in pla|ce, and |
|00002560| 61 20 42 65 68 61 76 69 | 6f 75 72 20 63 61 6c 6c |a Behavi|our call|
|00002570| 65 64 20 6c 65 66 74 20 | 74 68 61 74 20 6d 6f 76 |ed left |that mov|
|00002580| 65 73 20 50 69 63 73 20 | 65 76 65 72 0d 69 6e 63 |es Pics |ever.inc|
|00002590| 72 65 61 73 69 6e 67 20 | 64 69 73 74 61 6e 63 65 |reasing |distance|
|000025a0| 73 20 6c 65 66 74 2c 20 | 74 68 65 6e 20 79 6f 75 |s left, |then you|
|000025b0| 20 63 6f 75 6c 64 20 63 | 72 65 61 74 65 20 61 20 | could c|reate a |
|000025c0| 6d 61 6e 20 77 61 6c 6b | 69 6e 67 20 6c 65 66 74 |man walk|ing left|
|000025d0| 20 62 79 3a 0d 5c 62 65 | 67 69 6e 7b 76 65 72 62 | by:.\be|gin{verb|
|000025e0| 61 74 69 6d 7d 0d 20 20 | 20 20 20 20 20 20 61 70 |atim}. | ap|
|000025f0| 70 6c 79 20 6c 65 66 74 | 20 6d 61 6e 0d 5c 65 6e |ply left| man.\en|
|00002600| 64 7b 76 65 72 62 61 74 | 69 6d 7d 0d 0d 09 49 66 |d{verbat|im}...If|
|00002610| 20 79 6f 75 20 77 61 6e | 74 20 74 6f 20 61 70 70 | you wan|t to app|
|00002620| 6c 79 20 6d 6f 72 65 20 | 74 68 61 6e 20 6f 6e 65 |ly more |than one|
|00002630| 20 42 65 68 61 76 69 6f | 75 72 20 74 6f 20 61 20 | Behavio|ur to a |
|00002640| 4d 6f 76 69 65 2c 20 79 | 6f 75 20 6d 75 73 74 20 |Movie, y|ou must |
|00002650| 66 69 72 73 74 0d 64 65 | 63 69 64 65 20 77 68 65 |first.de|cide whe|
|00002660| 74 68 65 72 20 74 6f 20 | 64 6f 20 74 68 61 74 20 |ther to |do that |
|00002670| 69 6e 20 73 65 71 75 65 | 6e 63 65 20 6f 72 20 69 |in seque|nce or i|
|00002680| 6e 20 70 61 72 61 6c 6c | 65 6c 2c 20 61 6e 64 20 |n parall|el, and |
|00002690| 75 73 65 20 62 53 65 71 | 20 61 6e 64 20 62 50 61 |use bSeq| and bPa|
|000026a0| 72 0d 74 6f 20 72 65 64 | 75 63 65 20 74 68 65 20 |r.to red|uce the |
|000026b0| 6c 69 73 74 20 6f 66 20 | 42 65 68 61 76 69 6f 75 |list of |Behaviou|
|000026c0| 72 73 20 74 6f 20 61 20 | 73 69 6e 67 6c 65 20 42 |rs to a |single B|
|000026d0| 65 68 61 76 69 6f 75 72 | 2c 20 61 6e 64 20 74 68 |ehaviour|, and th|
|000026e0| 65 6e 20 61 70 70 6c 79 | 0d 74 68 61 74 20 74 6f |en apply|.that to|
|000026f0| 20 61 20 6d 6f 76 69 65 | 2e 20 46 6f 72 20 65 78 | a movie|. For ex|
|00002700| 61 6d 70 6c 65 3a 0d 5c | 62 65 67 69 6e 7b 76 65 |ample:.\|begin{ve|
|00002710| 72 62 61 74 69 6d 7d 0d | 20 20 20 20 20 20 20 20 |rbatim}.| |
|00002720| 61 70 70 6c 79 20 28 62 | 50 61 72 20 6c 65 66 74 |apply (b|Par left|
|00002730| 20 75 70 29 20 67 75 6c | 6c 0d 5c 65 6e 64 7b 76 | up) gul|l.\end{v|
|00002740| 65 72 62 61 74 69 6d 7d | 0d 77 69 6c 6c 20 74 61 |erbatim}|.will ta|
|00002750| 6b 65 20 61 20 4d 6f 76 | 69 65 20 6f 66 20 61 20 |ke a Mov|ie of a |
|00002760| 67 75 6c 6c 20 61 6e 64 | 20 6d 6f 76 65 20 74 68 |gull and| move th|
|00002770| 65 20 50 69 63 73 20 75 | 70 20 61 6e 64 20 6c 65 |e Pics u|p and le|
|00002780| 66 74 2e 0d 0d 09 4d 6f | 73 74 20 6f 66 20 74 68 |ft....Mo|st of th|
|00002790| 65 20 62 61 73 69 63 20 | 42 65 68 61 76 69 6f 75 |e basic |Behaviou|
|000027a0| 72 73 20 61 72 65 20 64 | 65 66 69 6e 65 64 20 69 |rs are d|efined i|
|000027b0| 6e 20 52 5c 5f 42 65 68 | 61 76 69 6f 75 72 2e 20 |n R\_Beh|aviour. |
|000027c0| 0d 0d 20 20 20 20 0d 5c | 73 75 62 73 65 63 74 69 |.. .\|subsecti|
|000027d0| 6f 6e 7b 44 65 66 69 6e | 69 6e 67 20 43 75 73 74 |on{Defin|ing Cust|
|000027e0| 6f 6d 69 7a 65 64 20 50 | 61 63 6b 61 67 65 73 20 |omized P|ackages |
|000027f0| 6f 66 20 42 65 68 61 76 | 69 6f 75 72 73 7d 0d 0d |of Behav|iours}..|
|00002800| 09 4f 66 74 65 6e 20 79 | 6f 75 20 77 69 6c 6c 20 |.Often y|ou will |
|00002810| 68 61 76 65 20 6d 6f 72 | 65 20 73 70 65 63 69 61 |have mor|e specia|
|00002820| 6c 69 7a 65 64 2c 20 6f | 72 20 6a 75 73 74 20 73 |lized, o|r just s|
|00002830| 69 6d 70 6c 65 72 20 42 | 65 68 61 76 69 6f 75 72 |impler B|ehaviour|
|00002840| 73 20 79 6f 75 0d 77 61 | 6e 74 20 74 6f 20 75 73 |s you.wa|nt to us|
|00002850| 65 2e 20 55 73 69 6e 67 | 20 74 68 65 20 42 65 68 |e. Using| the Beh|
|00002860| 61 76 69 6f 75 72 73 20 | 61 6e 64 20 50 69 63 2d |aviours |and Pic-|
|00002870| 74 6f 2d 50 69 63 20 66 | 75 6e 63 74 69 6f 6e 73 |to-Pic f|unctions|
|00002880| 2c 20 69 74 20 69 73 20 | 76 65 72 79 0d 65 61 73 |, it is |very.eas|
|00002890| 79 20 74 6f 20 63 72 65 | 61 74 65 20 79 6f 75 72 |y to cre|ate your|
|000028a0| 20 6f 77 6e 20 73 6d 61 | 6c 6c 20 6c 69 62 72 61 | own sma|ll libra|
|000028b0| 72 79 20 6f 66 20 42 65 | 68 61 76 69 6f 75 72 73 |ry of Be|haviours|
|000028c0| 2e 20 52 5c 5f 44 65 66 | 61 75 6c 74 73 20 69 73 |. R\_Def|aults is|
|000028d0| 20 61 0d 6d 6f 64 75 6c | 65 20 6f 66 20 73 75 63 | a.modul|e of suc|
|000028e0| 68 20 42 65 68 61 76 69 | 6f 75 72 73 2e 20 46 6f |h Behavi|ours. Fo|
|000028f0| 72 20 65 78 61 6d 70 6c | 65 2c 20 74 6f 20 63 72 |r exampl|e, to cr|
|00002900| 65 61 74 65 20 61 20 42 | 65 68 61 76 69 6f 75 72 |eate a B|ehaviour|
|00002910| 20 74 6f 20 6d 6f 76 65 | 0d 61 20 4d 6f 76 69 65 | to move|.a Movie|
|00002920| 20 72 69 67 68 74 2c 20 | 79 6f 75 20 20 77 6f 75 | right, |you wou|
|00002930| 6c 64 20 63 72 65 61 74 | 65 20 61 20 6c 69 73 74 |ld creat|e a list|
|00002940| 20 6f 66 20 6d 6f 76 5c | 5f 50 69 63 27 73 2c 20 | of mov\|_Pic's, |
|00002950| 65 61 63 68 20 74 61 6b | 69 6e 67 20 61 0d 65 76 |each tak|ing a.ev|
|00002960| 65 72 69 6e 63 72 65 61 | 73 69 6e 67 6c 79 20 6c |erincrea|singly l|
|00002970| 61 72 67 65 20 78 2d 63 | 6f 6f 72 64 69 6e 61 74 |arge x-c|oordinat|
|00002980| 65 2e 0d 5c 62 65 67 69 | 6e 7b 76 65 72 62 61 74 |e..\begi|n{verbat|
|00002990| 69 6d 7d 0d 20 20 20 20 | 20 20 20 20 72 69 67 68 |im}. | righ|
|000029a0| 74 20 3d 20 5b 20 6d 6f | 76 5f 50 69 63 20 28 78 |t = [ mo|v_Pic (x|
|000029b0| 2c 79 29 20 7c 20 28 78 | 2c 79 29 20 3c 2d 20 7a |,y) | (x|,y) <- z|
|000029c0| 69 70 20 5b 30 2c 31 30 | 2c 2e 2e 5d 20 5b 30 2c |ip [0,10|,..] [0,|
|000029d0| 2e 2e 5d 20 5d 20 0d 5c | 65 6e 64 7b 76 65 72 62 |..] ] .\|end{verb|
|000029e0| 61 74 69 6d 7d 0d 0d 09 | 4f 72 20 69 66 20 79 6f |atim}...|Or if yo|
|000029f0| 75 20 77 61 6e 74 65 64 | 20 61 20 62 65 68 61 76 |u wanted| a behav|
|00002a00| 6f 75 72 20 74 6f 20 70 | 6c 61 63 65 20 61 20 4d |our to p|lace a M|
|00002a10| 6f 76 69 65 20 61 74 20 | 28 31 30 30 2c 31 30 30 |ovie at |(100,100|
|00002a20| 29 20 74 77 69 63 65 20 | 61 73 0d 6c 61 72 67 65 |) twice |as.large|
|00002a30| 20 61 73 20 62 65 66 6f | 72 65 2c 20 79 6f 75 20 | as befo|re, you |
|00002a40| 63 6f 75 6c 64 20 63 72 | 65 61 74 65 20 61 20 6e |could cr|eate a n|
|00002a50| 65 77 20 42 65 68 61 76 | 69 6f 75 72 20 66 72 6f |ew Behav|iour fro|
|00002a60| 6d 20 6f 6c 64 20 6f 6e | 65 73 20 61 73 3a 0d 20 |m old on|es as:. |
|00002a70| 20 20 20 73 63 61 6c 65 | 61 74 3d 20 62 50 61 72 | scale|at= bPar|
|00002a80| 20 5b 6d 6f 76 74 6f 20 | 28 69 20 28 31 30 30 2c | [movto |(i (100,|
|00002a90| 31 30 30 29 29 2c 20 73 | 63 61 6c 65 20 28 69 20 |100)), s|cale (i |
|00002aa0| 32 32 29 5d 0d 0d 5c 73 | 75 62 73 65 63 74 69 6f |22)]..\s|ubsectio|
|00002ab0| 6e 7b 42 65 68 61 76 69 | 6f 75 72 73 20 41 76 61 |n{Behavi|ours Ava|
|00002ac0| 69 6c 61 62 6c 65 7d 0d | 5c 62 65 67 69 6e 7b 76 |ilable}.|\begin{v|
|00002ad0| 65 72 62 61 74 69 6d 7d | 0d 66 6c 69 70 20 20 20 |erbatim}|.flip |
|00002ae0| 20 20 20 20 20 20 20 20 | 20 41 72 67 73 3a 20 6e | | Args: n|
|00002af0| 6f 6e 65 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |one. | |
|00002b00| 20 20 20 20 54 68 69 73 | 20 77 69 6c 6c 20 66 6c | This| will fl|
|00002b10| 69 70 20 65 76 65 72 79 | 20 50 69 63 20 61 72 6f |ip every| Pic aro|
|00002b20| 75 6e 64 20 69 74 73 20 | 78 2d 6f 72 69 67 69 6e |und its |x-origin|
|00002b30| 2c 20 72 65 73 75 6c 74 | 69 6e 67 20 69 6e 0d 20 |, result|ing in. |
|00002b40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d | | m|
|00002b50| 69 72 72 6f 72 20 69 6d | 61 67 65 73 20 72 65 76 |irror im|ages rev|
|00002b60| 65 72 73 69 6e 67 20 6c | 65 66 74 20 61 6e 64 20 |ersing l|eft and |
|00002b70| 72 69 67 68 74 2e 0d 20 | 20 20 20 20 20 20 20 20 |right.. | |
|00002b80| 20 20 20 20 20 20 20 6d | 6f 64 75 6c 65 3a 20 52 | m|odule: R|
|00002b90| 5f 42 65 68 61 76 69 6f | 75 72 0d 20 09 09 0d 74 |_Behavio|ur. ...t|
|00002ba0| 77 69 73 74 27 20 20 20 | 20 20 20 20 20 20 20 41 |wist' | A|
|00002bb0| 72 67 73 3a 20 6e 6f 6e | 65 0d 20 20 20 20 20 20 |rgs: non|e. |
|00002bc0| 20 20 20 20 20 20 20 20 | 20 20 54 68 69 73 20 77 | | This w|
|00002bd0| 69 6c 6c 20 72 6f 74 61 | 74 65 20 65 61 63 68 20 |ill rota|te each |
|00002be0| 50 69 63 20 62 79 20 74 | 68 65 20 61 6d 6f 75 6e |Pic by t|he amoun|
|00002bf0| 74 20 72 6f 74 75 6e 69 | 74 20 28 73 65 65 20 0d |t rotuni|t (see .|
|00002c00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002c10| 52 5f 43 6f 6e 73 74 61 | 6e 74 73 29 20 61 72 6f |R_Consta|nts) aro|
|00002c20| 75 6e 64 20 69 74 73 20 | 6f 72 69 67 69 6e 2e 0d |und its |origin..|
|00002c30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002c40| 6d 6f 64 75 6c 65 3a 20 | 52 5f 42 65 68 61 76 69 |module: |R_Behavi|
|00002c50| 6f 75 72 0d 0d 6d 6f 76 | 20 20 20 20 20 20 20 20 |our..mov| |
|00002c60| 20 20 20 20 20 41 72 67 | 73 3a 20 5b 56 65 63 5d | Arg|s: [Vec]|
|00002c70| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00002c80| 20 54 68 69 73 20 77 69 | 6c 6c 20 6d 6f 76 65 20 | This wi|ll move |
|00002c90| 65 61 63 68 20 50 69 63 | 20 62 79 20 69 74 73 20 |each Pic| by its |
|00002ca0| 63 6f 72 72 65 73 70 6f | 6e 64 69 6e 67 20 76 65 |correspo|nding ve|
|00002cb0| 63 74 6f 72 2e 0d 20 20 | 20 20 20 20 20 20 20 20 |ctor.. | |
|00002cc0| 20 20 20 20 20 20 6d 6f | 64 75 6c 65 3a 20 52 5f | mo|dule: R_|
|00002cd0| 42 65 68 61 76 69 6f 75 | 72 0d 0d 6d 6f 76 74 6f |Behaviou|r..movto|
|00002ce0| 20 20 20 20 20 20 20 20 | 20 20 20 41 72 67 73 3a | | Args:|
|00002cf0| 20 5b 56 65 63 5d 0d 20 | 20 20 20 20 20 20 20 20 | [Vec]. | |
|00002d00| 20 20 20 20 20 20 20 54 | 68 69 73 20 77 69 6c 6c | T|his will|
|00002d10| 20 6d 6f 76 65 20 65 61 | 63 68 20 50 69 63 27 73 | move ea|ch Pic's|
|00002d20| 20 6f 72 69 67 69 6e 20 | 74 6f 20 69 74 73 20 63 | origin |to its c|
|00002d30| 6f 72 72 65 73 70 6f 6e | 64 69 6e 67 20 76 65 63 |orrespon|ding vec|
|00002d40| 74 6f 72 2e 0d 20 20 20 | 20 20 20 20 20 20 20 20 |tor.. | |
|00002d50| 20 20 20 20 20 6d 6f 64 | 75 6c 65 3a 20 52 5f 42 | mod|ule: R_B|
|00002d60| 65 68 61 76 69 6f 75 72 | 0d 0d 63 69 72 63 5f 6d |ehaviour|..circ_m|
|00002d70| 6f 76 20 20 20 20 20 20 | 20 20 41 72 67 73 3a 20 |ov | Args: |
|00002d80| 46 6c 6f 61 74 20 46 6c | 6f 61 74 0d 20 20 20 20 |Float Fl|oat. |
|00002d90| 20 20 20 20 20 20 20 20 | 20 20 20 20 54 68 69 73 | | This|
|00002da0| 20 77 69 6c 6c 20 6d 6f | 76 65 20 65 61 63 68 20 | will mo|ve each |
|00002db0| 50 69 63 20 69 6e 20 61 | 20 63 69 72 63 6c 65 2c |Pic in a| circle,|
|00002dc0| 20 6f 66 20 72 61 64 69 | 75 73 20 6f 66 20 74 68 | of radi|us of th|
|00002dd0| 65 20 66 69 72 73 74 0d | 20 20 20 20 20 20 20 20 |e first.| |
|00002de0| 20 20 20 20 20 20 20 20 | 46 6c 6f 61 74 20 61 6e | |Float an|
|00002df0| 64 20 62 79 20 61 6e 20 | 69 6e 63 72 65 6d 65 6e |d by an |incremen|
|00002e00| 74 20 6f 66 20 74 68 65 | 20 73 65 63 6f 6e 64 20 |t of the| second |
|00002e10| 46 6c 6f 61 74 2c 20 75 | 73 69 6e 67 20 28 30 2c |Float, u|sing (0,|
|00002e20| 30 29 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |0). | |
|00002e30| 20 20 20 61 73 20 74 68 | 65 20 6f 72 69 67 69 6e | as th|e origin|
|00002e40| 20 6f 66 20 72 6f 74 61 | 74 69 6f 6e 2e 0d 20 20 | of rota|tion.. |
|00002e50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6d 6f | | mo|
|00002e60| 64 75 6c 65 3a 20 52 5f | 42 65 68 61 76 69 6f 75 |dule: R_|Behaviou|
|00002e70| 72 0d 0d 73 63 61 6c 65 | 20 20 20 20 20 20 20 20 |r..scale| |
|00002e80| 20 20 20 41 72 67 73 3a | 20 5b 49 6e 74 5d 0d 20 | Args:| [Int]. |
|00002e90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 53 | | S|
|00002ea0| 63 61 6c 65 73 20 65 76 | 65 72 79 20 50 69 63 20 |cales ev|ery Pic |
|00002eb0| 6f 6e 20 69 74 73 20 6f | 72 69 67 69 6e 20 62 79 |on its o|rigin by|
|00002ec0| 20 74 68 65 20 74 68 65 | 20 63 6f 72 72 65 73 70 | the the| corresp|
|00002ed0| 6f 6e 64 69 6e 67 20 49 | 6e 74 0d 20 20 20 20 20 |onding I|nt. |
|00002ee0| 20 20 20 20 20 20 20 20 | 20 20 20 69 6e 20 74 68 | | in th|
|00002ef0| 65 20 6c 69 73 74 2e 20 | 54 68 65 73 65 20 49 6e |e list. |These In|
|00002f00| 74 73 20 72 65 70 72 65 | 73 65 6e 74 73 20 65 6c |ts repre|sents el|
|00002f10| 65 76 65 6e 74 68 73 2c | 20 73 6f 20 74 68 61 74 |evenths,| so that|
|00002f20| 20 61 20 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 | a . | |
|00002f30| 20 20 20 20 5b 32 2c 32 | 2c 2e 2e 2e 5d 20 77 69 | [2,2|,...] wi|
|00002f40| 6c 6c 20 73 63 61 6c 65 | 20 65 76 65 72 79 20 50 |ll scale| every P|
|00002f50| 69 63 20 62 79 20 32 2f | 31 31 20 2e 0d 20 20 20 |ic by 2/|11 .. |
|00002f60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6d 6f 64 | | mod|
|00002f70| 75 6c 65 3a 20 52 5f 42 | 65 68 61 76 69 6f 75 72 |ule: R_B|ehaviour|
|00002f80| 0d 0d 73 63 61 6c 65 5f | 72 65 6c 20 20 20 20 20 |..scale_|rel |
|00002f90| 20 20 41 72 67 73 3a 20 | 56 65 63 20 5b 49 6e 74 | Args: |Vec [Int|
|00002fa0| 5d 09 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |].. | |
|00002fb0| 20 20 20 53 61 6d 65 20 | 61 73 20 73 63 61 6c 65 | Same |as scale|
|00002fc0| 2c 20 65 78 63 65 70 74 | 20 74 68 61 74 20 74 68 |, except| that th|
|00002fd0| 65 20 50 69 63 73 20 61 | 72 65 20 61 6c 6c 20 73 |e Pics a|re all s|
|00002fe0| 63 61 6c 65 64 20 75 73 | 69 6e 67 20 74 68 65 0d |caled us|ing the.|
|00002ff0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003000| 56 65 63 20 61 73 20 74 | 68 65 20 70 6f 69 6e 74 |Vec as t|he point|
|00003010| 20 6f 66 20 6f 72 69 67 | 69 6e 2e 0d 20 20 20 20 | of orig|in.. |
|00003020| 20 20 20 20 20 20 20 20 | 20 20 20 20 6d 6f 64 75 | | modu|
|00003030| 6c 65 3a 20 52 5f 42 65 | 68 61 76 69 6f 75 72 0d |le: R_Be|haviour.|
|00003040| 0d 74 77 69 73 74 20 20 | 20 20 20 20 20 20 20 20 |.twist | |
|00003050| 20 41 72 67 73 3a 20 5b | 46 6c 6f 61 74 5d 0d 20 | Args: [|Float]. |
|00003060| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 54 | | T|
|00003070| 68 69 73 20 77 69 6c 6c | 20 72 6f 74 61 74 65 20 |his will| rotate |
|00003080| 65 76 65 72 79 20 50 69 | 63 20 62 79 20 69 74 73 |every Pi|c by its|
|00003090| 20 63 6f 72 72 65 73 70 | 6f 6e 64 69 6e 67 20 46 | corresp|onding F|
|000030a0| 6c 6f 61 74 20 66 72 6f | 6d 0d 20 20 20 20 20 20 |loat fro|m. |
|000030b0| 20 20 20 20 20 20 20 20 | 20 20 74 68 65 20 6c 69 | | the li|
|000030c0| 73 74 20 69 6e 20 72 61 | 64 69 61 6e 73 2e 0d 20 |st in ra|dians.. |
|000030d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d | | m|
|000030e0| 6f 64 75 6c 65 3a 20 52 | 5f 42 65 68 61 76 69 6f |odule: R|_Behavio|
|000030f0| 75 72 0d 0d 73 65 74 5f | 63 6f 6c 6f 72 20 20 20 |ur..set_|color |
|00003100| 20 20 20 20 41 72 67 73 | 3a 20 5b 49 6e 74 5d 0d | Args|: [Int].|
|00003110| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003120| 54 68 69 73 20 73 65 74 | 73 20 65 61 63 68 20 50 |This set|s each P|
|00003130| 69 63 20 74 6f 20 74 68 | 65 20 63 6f 6c 6f 72 20 |ic to th|e color |
|00003140| 69 6e 64 69 63 61 74 65 | 64 20 62 79 20 69 74 73 |indicate|d by its|
|00003150| 20 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | . | |
|00003160| 20 20 63 6f 72 72 65 73 | 70 6f 6e 64 69 6e 67 20 | corres|ponding |
|00003170| 69 6e 74 20 69 6e 20 74 | 68 65 20 6c 69 73 74 2e |int in t|he list.|
|00003180| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003190| 20 6d 6f 64 75 6c 65 3a | 20 52 5f 42 65 68 61 76 | module:| R_Behav|
|000031a0| 69 6f 75 72 0d 09 0d 72 | 6f 74 20 20 20 20 20 20 |iour...r|ot |
|000031b0| 20 20 20 20 20 20 20 41 | 72 67 73 3a 20 5b 56 65 | A|rgs: [Ve|
|000031c0| 63 5d 20 5b 46 6c 6f 61 | 74 5d 0d 20 20 20 20 20 |c] [Floa|t]. |
|000031d0| 20 20 20 20 20 20 20 20 | 20 20 20 54 68 69 73 20 | | This |
|000031e0| 77 69 6c 6c 20 72 6f 74 | 61 74 65 20 65 61 63 68 |will rot|ate each|
|000031f0| 20 50 69 63 20 61 72 6f | 75 6e 64 20 69 74 73 20 | Pic aro|und its |
|00003200| 63 6f 72 72 65 73 70 6f | 6e 64 69 6e 67 20 56 65 |correspo|nding Ve|
|00003210| 63 20 62 79 0d 20 20 20 | 20 20 20 20 20 20 20 20 |c by. | |
|00003220| 20 20 20 20 20 69 74 73 | 20 63 6f 72 72 65 73 70 | its| corresp|
|00003230| 6f 6e 64 69 6e 67 20 46 | 6c 6f 61 74 20 69 6e 20 |onding F|loat in |
|00003240| 72 61 64 69 61 6e 73 2e | 0d 20 20 20 20 20 20 20 |radians.|. |
|00003250| 20 20 20 20 20 20 20 20 | 20 6d 6f 64 75 6c 65 3a | | module:|
|00003260| 20 52 5f 42 65 68 61 76 | 69 6f 75 72 0d 0d 62 69 | R_Behav|iour..bi|
|00003270| 67 20 20 20 20 20 20 20 | 20 20 20 20 20 20 41 72 |g | Ar|
|00003280| 67 73 3a 20 6e 6f 6e 65 | 0d 20 20 20 20 20 20 20 |gs: none|. |
|00003290| 20 20 20 20 20 20 20 20 | 20 53 63 61 6c 65 73 20 | | Scales |
|000032a0| 65 76 65 72 79 20 50 69 | 63 20 75 70 20 62 79 20 |every Pi|c up by |
|000032b0| 73 63 61 6c 65 75 6e 69 | 74 0d 20 20 20 20 20 20 |scaleuni|t. |
|000032c0| 20 20 20 20 20 20 20 20 | 20 20 6d 6f 64 75 6c 65 | | module|
|000032d0| 3a 20 52 5f 44 65 66 61 | 75 6c 74 73 0d 0d 68 75 |: R_Defa|ults..hu|
|000032e0| 67 65 20 20 20 20 20 20 | 20 20 20 20 20 20 41 72 |ge | Ar|
|000032f0| 67 73 3a 20 6e 6f 6e 65 | 0d 20 20 20 20 20 20 20 |gs: none|. |
|00003300| 20 20 20 20 20 20 20 20 | 20 54 68 69 73 20 73 63 | | This sc|
|00003310| 61 6c 65 73 20 65 76 65 | 72 79 20 50 69 63 20 75 |ales eve|ry Pic u|
|00003320| 70 20 62 79 20 32 2a 73 | 63 61 6c 65 75 6e 69 74 |p by 2*s|caleunit|
|00003330| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003340| 20 6d 6f 64 75 6c 65 3a | 20 52 5f 44 65 66 61 75 | module:| R_Defau|
|00003350| 6c 74 73 0d 0d 73 6d 61 | 6c 6c 20 20 20 20 20 20 |lts..sma|ll |
|00003360| 20 20 20 20 20 41 72 67 | 73 3a 20 6e 6f 6e 65 0d | Arg|s: none.|
|00003370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003380| 54 68 69 73 20 73 63 61 | 6c 65 73 20 65 76 65 72 |This sca|les ever|
|00003390| 79 20 50 69 63 20 64 6f | 77 6e 20 62 79 20 31 30 |y Pic do|wn by 10|
|000033a0| 2f 31 31 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |/11. | |
|000033b0| 20 20 20 20 6d 6f 64 75 | 6c 65 3a 20 52 5f 44 65 | modu|le: R_De|
|000033c0| 66 61 75 6c 74 73 0d 0d | 74 69 6e 79 20 20 20 20 |faults..|tiny |
|000033d0| 20 20 20 20 20 20 20 20 | 41 72 67 73 3a 20 6e 6f | |Args: no|
|000033e0| 6e 65 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ne. | |
|000033f0| 20 20 20 54 68 69 73 20 | 73 63 61 6c 65 20 65 76 | This |scale ev|
|00003400| 65 72 79 20 50 69 63 20 | 64 6f 77 6e 20 62 79 20 |ery Pic |down by |
|00003410| 35 2f 31 31 0d 20 20 20 | 20 20 20 20 20 20 20 20 |5/11. | |
|00003420| 20 20 20 20 20 6d 6f 64 | 75 6c 65 3a 20 52 5f 44 | mod|ule: R_D|
|00003430| 65 66 61 75 6c 74 73 0d | 0d 62 69 67 67 65 72 20 |efaults.|.bigger |
|00003440| 20 20 20 20 20 20 20 20 | 20 41 72 67 73 3a 20 6e | | Args: n|
|00003450| 6f 6e 65 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |one. | |
|00003460| 20 20 20 20 54 68 69 73 | 20 73 63 61 6c 65 73 20 | This| scales |
|00003470| 65 76 65 72 79 20 50 69 | 63 20 69 6e 20 74 68 65 |every Pi|c in the|
|00003480| 20 6c 69 73 74 20 62 79 | 20 73 63 61 6c 65 75 6e | list by| scaleun|
|00003490| 69 74 20 6d 6f 72 65 20 | 0d 20 20 20 20 20 20 20 |it more |. |
|000034a0| 20 20 20 20 20 20 20 20 | 20 74 68 61 6e 20 74 68 | | than th|
|000034b0| 65 20 70 72 65 76 69 6f | 75 73 20 50 69 63 2c 20 |e previo|us Pic, |
|000034c0| 73 6f 20 74 68 61 74 20 | 74 68 65 20 6e 2d 74 68 |so that |the n-th|
|000034d0| 20 65 6c 65 6d 65 6e 74 | 20 69 73 0d 20 20 20 20 | element| is. |
|000034e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 73 63 61 6c | | scal|
|000034f0| 65 64 20 75 70 20 62 79 | 20 28 6e 2d 31 29 2a 73 |ed up by| (n-1)*s|
|00003500| 63 61 6c 65 75 6e 69 74 | 20 0d 20 20 20 20 20 20 |caleunit| . |
|00003510| 20 20 20 20 20 20 20 20 | 20 20 6d 6f 64 75 6c 65 | | module|
|00003520| 3a 20 52 5f 44 65 66 61 | 75 6c 74 73 0d 0d 73 6d |: R_Defa|ults..sm|
|00003530| 61 6c 6c 65 72 20 20 20 | 20 20 20 20 20 20 41 72 |aller | Ar|
|00003540| 67 73 3a 20 6e 6f 6e 65 | 0d 20 20 20 20 20 20 20 |gs: none|. |
|00003550| 20 20 20 20 20 20 20 20 | 20 54 68 69 73 20 73 63 | | This sc|
|00003560| 61 6c 65 73 20 65 76 65 | 72 79 20 50 69 63 20 64 |ales eve|ry Pic d|
|00003570| 6f 77 6e 2c 20 73 6f 20 | 74 68 61 74 20 74 68 65 |own, so |that the|
|00003580| 20 6e 2d 74 68 20 65 6c | 65 6d 65 6e 74 0d 09 09 | n-th el|ement...|
|00003590| 69 73 20 73 63 61 6c 65 | 64 20 64 6f 77 6e 20 62 |is scale|d down b|
|000035a0| 79 20 28 6e 2d 31 29 2a | 28 31 30 2f 31 31 29 0d |y (n-1)*|(10/11).|
|000035b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000035c0| 6d 6f 64 75 6c 65 3a 20 | 52 5f 44 65 66 61 75 6c |module: |R_Defaul|
|000035d0| 74 73 0d 0d 63 63 77 20 | 20 20 20 20 20 20 20 20 |ts..ccw | |
|000035e0| 20 20 20 20 41 72 67 73 | 3a 20 6e 6f 6e 65 0d 20 | Args|: none. |
|000035f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 54 | | T|
|00003600| 68 69 73 20 72 6f 74 61 | 74 65 73 20 65 76 65 72 |his rota|tes ever|
|00003610| 79 20 50 69 63 20 62 79 | 20 6f 6e 65 20 72 6f 74 |y Pic by| one rot|
|00003620| 75 6e 69 74 20 6d 6f 72 | 65 20 74 68 61 6e 20 74 |unit mor|e than t|
|00003630| 68 65 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |he. | |
|00003640| 20 20 20 70 72 65 76 69 | 6f 75 73 20 50 69 63 2c | previ|ous Pic,|
|00003650| 20 69 6e 20 61 20 63 6f | 75 6e 74 65 72 63 6c 6f | in a co|unterclo|
|00003660| 63 6b 77 69 73 65 20 66 | 61 73 68 69 6f 6e 2e 0d |ckwise f|ashion..|
|00003670| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003680| 6d 6f 64 75 6c 65 3a 20 | 52 5f 44 65 66 61 75 6c |module: |R_Defaul|
|00003690| 74 73 0d 0d 63 77 20 20 | 20 20 20 20 20 20 20 20 |ts..cw | |
|000036a0| 20 20 20 20 41 72 67 73 | 3a 20 6e 6f 6e 65 0d 20 | Args|: none. |
|000036b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 54 | | T|
|000036c0| 68 69 73 20 72 6f 74 61 | 74 65 73 20 65 76 65 72 |his rota|tes ever|
|000036d0| 79 20 50 69 63 20 62 79 | 20 6f 6e 65 20 72 6f 74 |y Pic by| one rot|
|000036e0| 75 6e 69 74 20 6d 6f 72 | 65 20 74 68 61 6e 20 74 |unit mor|e than t|
|000036f0| 68 65 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |he. | |
|00003700| 20 20 20 70 72 65 76 69 | 6f 75 73 20 50 69 63 2c | previ|ous Pic,|
|00003710| 20 69 6e 20 61 20 63 6c | 6f 63 6b 77 69 73 65 20 | in a cl|ockwise |
|00003720| 66 61 73 68 69 6f 6e 2e | 0d 20 20 20 20 20 20 20 |fashion.|. |
|00003730| 20 20 20 20 20 20 20 20 | 20 6d 6f 64 75 6c 65 3a | | module:|
|00003740| 20 52 5f 44 65 66 61 75 | 6c 74 73 0d 0d 75 70 20 | R_Defau|lts..up |
|00003750| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 41 72 67 | | Arg|
|00003760| 73 3a 20 6e 6f 6e 65 0d | 20 20 20 20 20 20 20 20 |s: none.| |
|00003770| 20 20 20 20 20 20 20 20 | 54 68 69 73 20 6d 6f 76 | |This mov|
|00003780| 65 73 20 65 76 65 72 79 | 20 50 69 63 20 75 70 20 |es every| Pic up |
|00003790| 62 79 20 6f 6e 65 20 75 | 6e 69 74 20 6d 6f 72 65 |by one u|nit more|
|000037a0| 20 74 68 61 6e 20 74 68 | 65 20 0d 20 20 20 20 20 | than th|e . |
|000037b0| 20 20 20 20 20 20 20 20 | 20 20 20 50 72 65 76 69 | | Previ|
|000037c0| 6f 75 73 20 50 69 63 2c | 20 73 6f 20 74 68 61 74 |ous Pic,| so that|
|000037d0| 20 74 68 65 20 6e 2d 74 | 68 20 65 6c 65 6d 65 6e | the n-t|h elemen|
|000037e0| 74 20 69 73 20 6d 6f 76 | 65 64 20 75 70 20 0d 20 |t is mov|ed up . |
|000037f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 28 | | (|
|00003800| 6e 2d 31 29 20 75 6e 69 | 74 73 2e 0d 20 20 20 20 |n-1) uni|ts.. |
|00003810| 20 20 20 20 20 20 20 20 | 20 20 20 20 6d 6f 64 75 | | modu|
|00003820| 6c 65 3a 20 52 5f 44 65 | 66 61 75 6c 74 73 0d 0d |le: R_De|faults..|
|00003830| 64 6f 77 6e 20 20 20 20 | 20 20 20 20 20 20 20 20 |down | |
|00003840| 41 72 67 73 3a 20 6e 6f | 6e 65 0d 20 20 20 20 20 |Args: no|ne. |
|00003850| 20 20 20 20 20 20 20 20 | 20 20 20 54 68 69 73 20 | | This |
|00003860| 69 73 20 73 61 6d 65 20 | 61 73 20 75 70 2c 20 62 |is same |as up, b|
|00003870| 75 74 20 74 68 65 20 50 | 69 63 73 20 6d 6f 76 65 |ut the P|ics move|
|00003880| 20 64 6f 77 6e 2e 0d 20 | 20 20 20 20 20 20 20 20 | down.. | |
|00003890| 20 20 20 20 20 20 20 6d | 6f 64 75 6c 65 3a 20 52 | m|odule: R|
|000038a0| 5f 44 65 66 61 75 6c 74 | 73 0d 0d 72 69 67 68 74 |_Default|s..right|
|000038b0| 20 20 20 20 20 20 20 20 | 20 20 20 41 72 67 73 3a | | Args:|
|000038c0| 20 6e 6f 6e 65 0d 20 20 | 20 20 20 20 20 20 20 20 | none. | |
|000038d0| 20 20 20 20 20 20 54 68 | 69 73 20 69 73 20 73 61 | Th|is is sa|
|000038e0| 6d 65 20 61 73 20 75 70 | 2c 20 62 75 74 20 74 68 |me as up|, but th|
|000038f0| 65 20 50 69 63 73 20 6d | 6f 76 65 20 72 69 67 68 |e Pics m|ove righ|
|00003900| 74 2e 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t.. | |
|00003910| 20 20 20 6d 6f 64 75 6c | 65 3a 20 52 5f 44 65 66 | modul|e: R_Def|
|00003920| 61 75 6c 74 73 0d 0d 6c | 65 66 74 20 20 20 20 20 |aults..l|eft |
|00003930| 20 20 20 20 20 20 20 41 | 72 67 73 3a 20 6e 6f 6e | A|rgs: non|
|00003940| 65 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e. | |
|00003950| 20 20 54 68 69 73 20 69 | 73 20 73 61 6d 65 20 61 | This i|s same a|
|00003960| 73 20 75 70 2c 20 62 75 | 74 20 74 68 65 20 50 69 |s up, bu|t the Pi|
|00003970| 63 73 20 6d 6f 76 65 20 | 6c 65 66 74 2e 0d 20 20 |cs move |left.. |
|00003980| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6d 6f | | mo|
|00003990| 64 75 6c 65 3a 20 52 5f | 44 65 66 61 75 6c 74 73 |dule: R_|Defaults|
|000039a0| 0d 5c 65 6e 64 7b 76 65 | 72 62 61 74 69 6d 7d 0d |.\end{ve|rbatim}.|
|000039b0| 0d 5c 73 75 62 73 65 63 | 74 69 6f 6e 7b 46 75 6e |.\subsec|tion{Fun|
|000039c0| 63 74 69 6f 6e 73 20 46 | 6f 72 20 42 65 68 61 76 |ctions F|or Behav|
|000039d0| 69 6f 75 72 73 7d 0d 0d | 5c 62 65 67 69 6e 7b 76 |iours}..|\begin{v|
|000039e0| 65 72 62 61 74 69 6d 7d | 0d 64 6f 20 20 20 20 20 |erbatim}|.do |
|000039f0| 20 20 20 20 20 20 20 20 | 20 41 72 67 73 3a 20 49 | | Args: I|
|00003a00| 6e 74 20 42 65 68 61 76 | 69 6f 75 72 0d 20 20 20 |nt Behav|iour. |
|00003a10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 54 68 69 | | Thi|
|00003a20| 73 20 74 61 6b 65 73 20 | 74 68 65 20 66 69 72 73 |s takes |the firs|
|00003a30| 74 20 49 6e 74 20 65 6c | 65 6d 65 6e 74 73 20 6f |t Int el|ements o|
|00003a40| 66 20 74 68 65 20 42 65 | 68 61 76 69 6f 75 72 20 |f the Be|haviour |
|00003a50| 61 6e 64 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |and. | |
|00003a60| 20 20 20 20 72 65 74 75 | 72 6e 20 74 68 61 74 2e | retu|rn that.|
|00003a70| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003a80| 20 6d 6f 64 75 6c 65 3a | 20 52 5f 42 65 68 61 76 | module:| R_Behav|
|00003a90| 69 6f 75 72 0d 0d 72 70 | 74 20 20 20 20 20 20 20 |iour..rp|t |
|00003aa0| 20 20 20 20 20 20 41 72 | 67 73 3a 20 49 6e 74 20 | Ar|gs: Int |
|00003ab0| 42 65 68 61 76 69 6f 75 | 72 0d 20 20 20 20 20 20 |Behaviou|r. |
|00003ac0| 20 20 20 20 20 20 20 20 | 20 20 54 68 69 73 20 74 | | This t|
|00003ad0| 61 6b 65 73 20 61 6e 20 | 49 6e 74 20 61 6e 64 20 |akes an |Int and |
|00003ae0| 72 65 74 75 72 6e 73 20 | 61 20 42 65 68 61 76 69 |returns |a Behavi|
|00003af0| 6f 75 72 20 6f 66 20 6c | 65 6e 67 74 68 20 49 6e |our of l|ength In|
|00003b00| 74 2e 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t.. | |
|00003b10| 20 20 20 48 6f 77 65 76 | 65 72 2c 20 74 68 65 20 | Howev|er, the |
|00003b20| 6e 2d 74 68 20 50 69 63 | 2d 74 6f 2d 50 69 63 20 |n-th Pic|-to-Pic |
|00003b30| 69 6e 20 74 68 65 20 42 | 65 68 61 76 69 6f 75 72 |in the B|ehaviour|
|00003b40| 20 72 65 74 75 72 6e 65 | 64 0d 20 20 20 20 20 20 | returne|d. |
|00003b50| 20 20 20 20 20 20 20 20 | 20 20 69 73 20 6d 61 64 | | is mad|
|00003b60| 65 20 75 70 20 6f 66 20 | 74 68 65 20 66 69 72 73 |e up of |the firs|
|00003b70| 74 20 74 68 72 6f 75 67 | 68 20 28 6e 2d 31 29 74 |t throug|h (n-1)t|
|00003b80| 68 65 20 50 69 63 2d 74 | 6f 2d 50 69 63 73 20 6f |he Pic-t|o-Pics o|
|00003b90| 66 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |f. | |
|00003ba0| 20 20 74 68 65 20 69 6e | 70 75 74 20 6c 69 73 74 | the in|put list|
|00003bb0| 2e 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00003bc0| 20 20 6d 6f 64 75 6c 65 | 3a 20 52 5f 42 65 68 61 | module|: R_Beha|
|00003bd0| 76 69 6f 75 72 0d 0d 66 | 6f 72 65 76 65 72 20 20 |viour..f|orever |
|00003be0| 20 20 20 20 20 20 20 41 | 72 67 73 3a 20 42 65 68 | A|rgs: Beh|
|00003bf0| 61 76 69 6f 75 72 0d 20 | 20 20 20 20 20 20 20 20 |aviour. | |
|00003c00| 20 20 20 20 20 20 20 54 | 68 69 73 20 6d 61 6b 65 | T|his make|
|00003c10| 73 20 61 20 66 69 6e 69 | 74 65 20 42 65 68 61 76 |s a fini|te Behav|
|00003c20| 69 6f 75 72 20 6c 69 73 | 74 20 61 6e 20 69 6e 66 |iour lis|t an inf|
|00003c30| 69 6e 69 74 65 20 6f 6e | 65 20 62 79 0d 20 20 20 |inite on|e by. |
|00003c40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 61 70 70 | | app|
|00003c50| 65 6e 64 69 6e 67 20 74 | 68 65 20 6c 69 73 74 20 |ending t|he list |
|00003c60| 74 6f 20 69 74 73 65 6c | 66 20 65 6e 64 6c 65 73 |to itsel|f endles|
|00003c70| 73 6c 79 2e 0d 20 20 20 | 20 20 20 20 20 20 20 20 |sly.. | |
|00003c80| 20 20 20 20 20 6d 6f 64 | 75 6c 65 3a 20 52 5f 42 | mod|ule: R_B|
|00003c90| 65 68 61 76 69 6f 75 72 | 0d 0d 61 70 70 6c 79 20 |ehaviour|..apply |
|00003ca0| 20 20 20 20 20 20 20 20 | 20 20 41 72 67 73 3a 20 | | Args: |
|00003cb0| 42 65 68 61 76 69 6f 75 | 72 20 4d 6f 76 69 65 0d |Behaviou|r Movie.|
|00003cc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003cd0| 54 68 69 73 20 74 61 6b | 65 73 20 61 20 42 65 68 |This tak|es a Beh|
|00003ce0| 61 76 69 6f 75 72 20 61 | 6e 64 20 61 70 70 6c 69 |aviour a|nd appli|
|00003cf0| 65 73 20 69 74 20 74 6f | 20 61 20 4d 6f 76 69 65 |es it to| a Movie|
|00003d00| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003d10| 20 6d 6f 64 75 6c 65 3a | 20 52 5f 42 65 68 61 76 | module:| R_Behav|
|00003d20| 69 6f 75 72 0d 0d 77 68 | 69 6c 65 20 20 20 20 20 |iour..wh|ile |
|00003d30| 20 20 20 20 20 20 41 72 | 67 73 3a 20 28 42 6f 6f | Ar|gs: (Boo|
|00003d40| 6c 65 61 6e 20 66 75 6e | 63 74 69 6f 6e 29 20 42 |lean fun|ction) B|
|00003d50| 65 68 61 76 69 6f 75 72 | 20 4d 6f 76 69 65 0d 20 |ehaviour| Movie. |
|00003d60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 41 | | A|
|00003d70| 73 20 6c 6f 6e 67 20 61 | 73 20 74 68 65 20 42 6f |s long a|s the Bo|
|00003d80| 6f 6c 65 61 6e 20 66 75 | 6e 63 74 69 6f 6e 20 65 |olean fu|nction e|
|00003d90| 76 61 6c 75 61 74 65 73 | 20 74 72 75 65 2c 20 74 |valuates| true, t|
|00003da0| 68 69 73 20 0d 20 20 20 | 20 20 20 20 20 20 20 20 |his . | |
|00003db0| 20 20 20 20 20 74 61 6b | 65 73 20 61 20 42 65 68 | tak|es a Beh|
|00003dc0| 61 76 69 6f 75 72 20 61 | 6e 64 20 61 70 70 6c 69 |aviour a|nd appli|
|00003dd0| 65 73 20 69 74 20 74 6f | 20 61 20 4d 6f 76 69 65 |es it to| a Movie|
|00003de0| 2e 20 57 68 65 6e 20 69 | 74 0d 20 20 20 20 20 20 |. When i|t. |
|00003df0| 20 20 20 20 20 20 20 20 | 20 20 65 76 61 6c 75 61 | | evalua|
|00003e00| 74 65 73 20 74 6f 20 66 | 61 6c 73 65 2c 20 6e 6f |tes to f|alse, no|
|00003e10| 20 6d 6f 72 65 20 50 69 | 63 73 20 61 72 65 20 70 | more Pi|cs are p|
|00003e20| 72 6f 64 75 63 65 64 20 | 61 6e 64 0d 20 20 20 20 |roduced |and. |
|00003e30| 20 20 20 20 20 20 20 20 | 20 20 20 20 74 68 65 20 | | the |
|00003e40| 4d 6f 76 69 65 20 69 73 | 20 63 75 74 20 73 68 6f |Movie is| cut sho|
|00003e50| 72 74 20 74 68 65 72 65 | 2e 0d 20 20 20 20 20 20 |rt there|.. |
|00003e60| 20 20 20 20 20 20 20 20 | 20 20 6d 6f 64 75 6c 65 | | module|
|00003e70| 3a 20 52 5f 42 65 68 61 | 76 69 6f 75 72 0d 0d 62 |: R_Beha|viour..b|
|00003e80| 73 65 71 20 20 20 20 20 | 20 20 20 20 20 20 20 41 |seq | A|
|00003e90| 72 67 73 3a 20 42 65 68 | 61 76 69 6f 75 72 20 42 |rgs: Beh|aviour B|
|00003ea0| 65 68 61 76 69 6f 75 72 | 0d 20 20 20 20 20 20 20 |ehaviour|. |
|00003eb0| 20 20 20 20 20 20 20 20 | 20 54 68 69 73 20 74 61 | | This ta|
|00003ec0| 6b 65 73 20 74 77 6f 20 | 42 65 68 61 76 69 6f 75 |kes two |Behaviou|
|00003ed0| 72 20 61 6e 64 20 63 72 | 65 61 74 65 73 20 6f 6e |r and cr|eates on|
|00003ee0| 65 20 42 65 68 61 76 69 | 6f 75 72 20 6d 61 64 65 |e Behavi|our made|
|00003ef0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003f00| 20 75 70 20 6f 66 20 74 | 68 65 20 74 77 6f 20 69 | up of t|he two i|
|00003f10| 6e 70 75 74 73 20 61 70 | 70 6c 69 65 73 20 69 6e |nputs ap|plies in|
|00003f20| 20 73 65 71 75 65 6e 63 | 65 2e 0d 20 20 20 20 20 | sequenc|e.. |
|00003f30| 20 20 20 20 20 20 20 20 | 20 20 20 6d 6f 64 75 6c | | modul|
|00003f40| 65 3a 20 52 5f 42 65 68 | 61 76 69 6f 75 72 0d 0d |e: R_Beh|aviour..|
|00003f50| 62 53 65 71 20 20 20 20 | 20 20 20 20 20 20 20 20 |bSeq | |
|00003f60| 41 72 67 73 3a 20 5b 42 | 65 68 61 76 69 6f 75 72 |Args: [B|ehaviour|
|00003f70| 5d 20 42 65 68 61 76 69 | 6f 75 72 0d 20 20 20 20 |] Behavi|our. |
|00003f80| 20 20 20 20 20 20 20 20 | 20 20 20 20 54 68 69 73 | | This|
|00003f90| 20 74 61 6b 65 73 20 74 | 77 6f 20 42 65 68 61 76 | takes t|wo Behav|
|00003fa0| 69 6f 75 72 20 61 6e 64 | 20 63 72 65 61 74 65 73 |iour and| creates|
|00003fb0| 20 6f 6e 65 20 42 65 68 | 61 76 69 6f 75 72 20 6d | one Beh|aviour m|
|00003fc0| 61 64 65 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |ade. | |
|00003fd0| 20 20 20 20 75 70 20 6f | 66 20 74 68 65 20 74 77 | up o|f the tw|
|00003fe0| 6f 20 69 6e 70 75 74 73 | 20 61 70 70 6c 69 65 73 |o inputs| applies|
|00003ff0| 20 69 6e 20 73 65 71 75 | 65 6e 63 65 2e 0d 20 20 | in sequ|ence.. |
|00004000| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6d 6f | | mo|
|00004010| 64 75 6c 65 3a 20 52 5f | 42 65 68 61 76 69 6f 75 |dule: R_|Behaviou|
|00004020| 72 0d 0d 62 70 61 72 20 | 20 20 20 20 20 20 20 20 |r..bpar | |
|00004030| 20 20 20 41 72 67 73 3a | 20 42 65 68 61 76 69 6f | Args:| Behavio|
|00004040| 75 72 20 42 65 68 61 76 | 69 6f 75 72 0d 20 20 20 |ur Behav|iour. |
|00004050| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 54 68 69 | | Thi|
|00004060| 73 20 74 61 6b 65 73 20 | 74 77 6f 20 42 65 68 61 |s takes |two Beha|
|00004070| 76 69 6f 75 72 20 61 6e | 64 20 63 72 65 61 74 65 |viour an|d create|
|00004080| 73 20 6f 6e 65 20 42 65 | 68 61 76 69 6f 75 72 20 |s one Be|haviour |
|00004090| 6d 61 64 65 0d 20 20 20 | 20 20 20 20 20 20 20 20 |made. | |
|000040a0| 20 20 20 20 20 75 70 20 | 6f 66 20 74 68 65 20 74 | up |of the t|
|000040b0| 77 6f 20 69 6e 70 75 74 | 73 20 61 70 70 6c 69 65 |wo input|s applie|
|000040c0| 73 20 69 6e 20 70 61 72 | 61 6c 6c 65 6c 2e 0d 20 |s in par|allel.. |
|000040d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d | | m|
|000040e0| 6f 64 75 6c 65 3a 20 52 | 5f 42 65 68 61 76 69 6f |odule: R|_Behavio|
|000040f0| 75 72 0d 0d 62 50 61 72 | 20 20 20 20 20 20 20 20 |ur..bPar| |
|00004100| 20 20 20 20 41 72 67 73 | 3a 20 5b 42 65 68 61 76 | Args|: [Behav|
|00004110| 69 6f 75 72 5d 20 42 65 | 68 61 76 69 6f 75 72 0d |iour] Be|haviour.|
|00004120| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004130| 54 68 69 73 20 74 61 6b | 65 73 20 74 77 6f 20 42 |This tak|es two B|
|00004140| 65 68 61 76 69 6f 75 72 | 20 61 6e 64 20 63 72 65 |ehaviour| and cre|
|00004150| 61 74 65 73 20 6f 6e 65 | 20 42 65 68 61 76 69 6f |ates one| Behavio|
|00004160| 75 72 20 6d 61 64 65 0d | 20 20 20 20 20 20 20 20 |ur made.| |
|00004170| 20 20 20 20 20 20 20 20 | 75 70 20 6f 66 20 74 68 | |up of th|
|00004180| 65 20 74 77 6f 20 69 6e | 70 75 74 73 20 61 70 70 |e two in|puts app|
|00004190| 6c 69 65 73 20 69 6e 20 | 70 61 72 61 6c 6c 65 6c |lies in |parallel|
|000041a0| 2e 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|000041b0| 20 20 6d 6f 64 75 6c 65 | 3a 20 52 5f 42 65 68 61 | module|: R_Beha|
|000041c0| 76 69 6f 75 72 0d 5c 65 | 6e 64 7b 76 65 72 62 61 |viour.\e|nd{verba|
|000041d0| 74 69 6d 7d 0d 0d 5c 73 | 65 63 74 69 6f 6e 7b 43 |tim}..\s|ection{C|
|000041e0| 72 65 61 74 69 6e 67 20 | 74 68 65 20 46 69 6e 61 |reating |the Fina|
|000041f0| 6c 20 4d 6f 76 69 65 7d | 0d 0d 09 46 69 6e 61 6c |l Movie}|...Final|
|00004200| 6c 79 2c 20 79 6f 75 20 | 68 61 76 65 20 79 6f 75 |ly, you |have you|
|00004210| 72 20 62 61 73 69 63 20 | 4d 6f 76 69 65 73 20 6d |r basic |Movies m|
|00004220| 61 64 65 20 75 70 20 6f | 66 20 50 69 63 74 75 72 |ade up o|f Pictur|
|00004230| 65 73 20 61 6e 64 20 42 | 65 68 61 76 69 6f 75 72 |es and B|ehaviour|
|00004240| 73 2e 0d 4e 6f 77 20 79 | 6f 75 20 6e 65 65 64 20 |s..Now y|ou need |
|00004250| 74 6f 20 63 6f 6d 62 69 | 6e 65 20 74 68 65 6d 20 |to combi|ne them |
|00004260| 69 6e 74 6f 20 6f 6e 65 | 20 4d 6f 76 69 65 2e 20 |into one| Movie. |
|00004270| 54 68 65 20 66 75 6e 63 | 74 69 6f 6e 73 20 74 68 |The func|tions th|
|00004280| 61 74 20 64 6f 20 74 68 | 69 73 0d 61 72 65 20 66 |at do th|is.are f|
|00004290| 6f 75 6e 64 20 69 6e 20 | 74 68 65 20 6d 6f 64 75 |ound in |the modu|
|000042a0| 6c 65 20 52 5c 5f 4d 6f | 76 69 65 2e 20 54 68 65 |le R\_Mo|vie. The|
|000042b0| 73 65 20 66 75 6e 63 74 | 69 6f 6e 73 20 77 69 6c |se funct|ions wil|
|000042c0| 6c 20 74 61 6b 65 20 61 | 20 6c 69 73 74 20 6f 66 |l take a| list of|
|000042d0| 0d 4d 6f 76 69 65 73 20 | 61 6e 64 20 72 65 74 75 |.Movies |and retu|
|000042e0| 72 6e 20 61 20 73 69 6e | 67 6c 65 20 4d 6f 76 69 |rn a sin|gle Movi|
|000042f0| 65 20 63 6f 6d 62 69 6e | 69 6e 67 20 61 6c 6c 20 |e combin|ing all |
|00004300| 74 68 65 20 4d 6f 76 69 | 65 73 20 69 6e 20 74 68 |the Movi|es in th|
|00004310| 65 20 6c 69 73 74 2e 0d | 48 6f 77 20 74 68 65 79 |e list..|How they|
|00004320| 20 61 72 65 20 63 6f 6d | 62 69 6e 65 64 20 63 61 | are com|bined ca|
|00004330| 6e 20 62 65 20 63 6f 6e | 74 72 6f 6c 6c 65 64 20 |n be con|trolled |
|00004340| 74 6f 20 73 6f 6d 65 20 | 65 78 74 65 6e 74 2e 20 |to some |extent. |
|00004350| 55 73 75 61 6c 6c 79 20 | 74 68 65 79 20 61 72 65 |Usually |they are|
|00004360| 0d 6a 75 73 74 20 6f 76 | 65 72 6c 61 79 65 64 2c |.just ov|erlayed,|
|00004370| 20 62 75 74 20 74 68 65 | 79 20 63 61 6e 20 62 65 | but the|y can be|
|00004380| 20 70 75 74 20 62 65 73 | 69 64 65 20 6f 6e 65 20 | put bes|ide one |
|00004390| 61 6e 6f 74 68 65 72 2c | 20 6f 72 20 6f 6e 20 74 |another,| or on t|
|000043a0| 6f 70 20 6f 66 0d 6f 6e | 65 20 61 6e 6f 74 68 65 |op of.on|e anothe|
|000043b0| 72 2c 20 6f 72 20 70 75 | 74 20 61 20 56 65 63 20 |r, or pu|t a Vec |
|000043c0| 64 69 73 74 61 6e 63 65 | 20 61 70 61 72 74 2e 0d |distance| apart..|
|000043d0| 0d 09 49 74 20 69 73 20 | 61 6c 73 6f 20 70 6f 73 |..It is |also pos|
|000043e0| 73 69 62 6c 65 20 74 6f | 20 75 73 65 20 61 20 63 |sible to| use a c|
|000043f0| 6f 6d 62 69 6e 61 74 69 | 6f 6e 20 6f 66 20 74 68 |ombinati|on of th|
|00004400| 65 73 65 20 66 6f 72 6d | 73 2e 20 49 66 20 79 6f |ese form|s. If yo|
|00004410| 75 20 77 61 6e 74 65 64 | 0d 74 6f 20 6f 76 65 72 |u wanted|.to over|
|00004420| 61 6c 79 20 4d 31 20 61 | 6e 64 20 4d 32 2c 20 61 |aly M1 a|nd M2, a|
|00004430| 6e 64 20 74 68 65 6e 20 | 70 75 74 20 74 68 61 74 |nd then |put that|
|00004440| 20 62 65 73 69 64 65 20 | 4d 33 2c 20 79 6f 75 20 | beside |M3, you |
|00004450| 77 6f 75 6c 64 20 64 6f | 3a 0d 5c 62 65 67 69 6e |would do|:.\begin|
|00004460| 7b 76 65 72 62 61 74 69 | 6d 7d 0d 20 20 20 20 20 |{verbati|m}. |
|00004470| 20 20 20 72 42 45 53 49 | 44 45 20 5b 4d 33 2c 20 | rBESI|DE [M3, |
|00004480| 72 4f 56 45 52 4c 41 59 | 20 5b 4d 31 2c 4d 32 5d |rOVERLAY| [M1,M2]|
|00004490| 20 5d 0d 5c 65 6e 64 7b | 76 65 72 62 61 74 69 6d | ].\end{|verbatim|
|000044a0| 7d 0d 54 68 69 73 20 69 | 73 20 61 63 63 65 70 74 |}.This i|s accept|
|000044b0| 61 62 6c 65 20 61 73 20 | 72 4f 56 45 52 4c 41 59 |able as |rOVERLAY|
|000044c0| 20 77 69 6c 6c 20 72 65 | 74 75 72 6e 20 61 20 73 | will re|turn a s|
|000044d0| 69 6e 67 6c 65 20 4d 6f | 76 69 65 2e 20 0d 0d 5c |ingle Mo|vie. ..\|
|000044e0| 73 75 62 73 65 63 74 69 | 6f 6e 7b 4d 6f 76 69 65 |subsecti|on{Movie|
|000044f0| 20 43 6f 6d 62 69 6e 69 | 6e 67 20 46 75 6e 63 74 | Combini|ng Funct|
|00004500| 69 6f 6e 73 7d 0d 0d 5c | 62 65 67 69 6e 7b 76 65 |ions}..\|begin{ve|
|00004510| 72 62 61 74 69 6d 7d 0d | 72 41 42 4f 56 45 20 20 |rbatim}.|rABOVE |
|00004520| 20 20 20 20 20 20 20 20 | 41 72 67 73 3a 20 5b 4d | |Args: [M|
|00004530| 6f 76 69 65 5d 0d 20 20 | 20 20 20 20 20 20 20 20 |ovie]. | |
|00004540| 20 20 20 20 20 20 50 75 | 74 73 20 61 6c 6c 20 74 | Pu|ts all t|
|00004550| 68 65 20 4d 6f 76 69 65 | 73 20 69 6e 74 6f 20 6f |he Movie|s into o|
|00004560| 6e 65 20 6d 6f 76 69 65 | 2c 20 61 6c 6c 20 61 62 |ne movie|, all ab|
|00004570| 6f 76 65 20 6f 6e 65 20 | 61 6e 6f 74 68 65 72 2e |ove one |another.|
|00004580| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004590| 20 6d 6f 64 75 6c 65 3a | 20 52 5f 4d 6f 76 69 65 | module:| R_Movie|
|000045a0| 0d 0d 72 42 45 53 49 44 | 45 20 20 20 20 20 20 20 |..rBESID|E |
|000045b0| 20 20 41 72 67 73 3a 20 | 5b 4d 6f 76 69 65 5d 0d | Args: |[Movie].|
|000045c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000045d0| 50 75 74 73 20 61 6c 6c | 20 74 68 65 20 4d 6f 76 |Puts all| the Mov|
|000045e0| 69 65 73 20 69 6e 74 6f | 20 6f 6e 65 20 6d 6f 76 |ies into| one mov|
|000045f0| 69 65 2c 20 61 6c 6c 20 | 62 65 73 69 64 65 20 6f |ie, all |beside o|
|00004600| 6e 65 20 61 6e 6f 74 68 | 65 72 2e 0d 20 20 20 20 |ne anoth|er.. |
|00004610| 20 20 20 20 20 20 20 20 | 20 20 20 20 6d 6f 64 75 | | modu|
|00004620| 6c 65 3a 20 52 5f 4d 6f | 76 69 65 0d 0d 72 42 45 |le: R_Mo|vie..rBE|
|00004630| 53 49 44 45 32 20 20 20 | 20 20 20 20 20 41 72 67 |SIDE2 | Arg|
|00004640| 73 3a 20 5b 4d 6f 76 69 | 65 5d 0d 20 20 20 20 20 |s: [Movi|e]. |
|00004650| 20 20 20 20 20 20 20 20 | 20 20 20 55 73 69 6e 67 | | Using|
|00004660| 20 74 68 65 69 72 20 61 | 62 73 6f 6c 75 74 65 20 | their a|bsolute |
|00004670| 63 6f 6f 72 64 69 6e 61 | 74 65 73 2c 20 70 75 74 |coordina|tes, put|
|00004680| 73 20 61 6c 6c 20 74 68 | 65 20 4d 6f 76 69 65 73 |s all th|e Movies|
|00004690| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000046a0| 20 62 65 73 69 64 65 20 | 6f 6e 65 20 61 6e 6f 74 | beside |one anot|
|000046b0| 68 65 72 2e 0d 20 20 20 | 20 20 20 20 20 20 20 20 |her.. | |
|000046c0| 20 20 20 20 20 6d 6f 64 | 75 6c 65 3a 20 52 5f 4d | mod|ule: R_M|
|000046d0| 6f 76 69 65 0d 0d 72 4f | 56 45 52 20 20 20 20 20 |ovie..rO|VER |
|000046e0| 20 20 20 20 20 20 41 72 | 67 73 3a 20 5b 4d 6f 76 | Ar|gs: [Mov|
|000046f0| 69 65 5d 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |ie]. | |
|00004700| 20 20 20 20 54 68 69 73 | 20 6c 61 79 73 20 74 68 | This| lays th|
|00004710| 65 20 4d 6f 76 69 65 73 | 20 6f 6e 20 74 6f 70 20 |e Movies| on top |
|00004720| 6f 66 20 6f 6e 65 20 61 | 6e 6f 74 68 65 72 2c 20 |of one a|nother, |
|00004730| 63 65 6e 74 65 72 69 6e | 67 20 0d 20 20 20 20 20 |centerin|g . |
|00004740| 20 20 20 20 20 20 20 20 | 20 20 20 65 61 63 68 20 | | each |
|00004750| 50 69 63 20 73 6f 20 74 | 68 61 74 20 74 68 65 79 |Pic so t|hat they|
|00004760| 20 73 68 61 72 65 20 74 | 68 65 20 73 61 6d 65 20 | share t|he same |
|00004770| 6f 72 69 67 69 6e 2e 0d | 20 20 20 20 20 20 20 20 |origin..| |
|00004780| 20 20 20 20 20 20 20 20 | 6d 6f 64 75 6c 65 3a 20 | |module: |
|00004790| 52 5f 4d 6f 76 69 65 0d | 0d 72 4f 56 45 52 4c 41 |R_Movie.|.rOVERLA|
|000047a0| 59 20 20 20 20 20 20 20 | 20 41 72 67 73 3a 20 5b |Y | Args: [|
|000047b0| 4d 6f 76 69 65 5d 0d 20 | 20 20 20 20 20 20 20 20 |Movie]. | |
|000047c0| 20 20 20 20 20 20 20 54 | 68 69 73 20 6c 61 79 73 | T|his lays|
|000047d0| 20 74 68 65 20 4d 6f 76 | 69 65 73 20 6f 6e 20 74 | the Mov|ies on t|
|000047e0| 6f 70 20 6f 66 20 6f 6e | 65 20 61 6e 6f 74 68 65 |op of on|e anothe|
|000047f0| 72 2c 20 63 65 6e 74 65 | 72 69 6e 67 0d 20 20 20 |r, cente|ring. |
|00004800| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 65 61 63 | | eac|
|00004810| 68 20 50 69 63 20 73 6f | 20 74 68 61 74 20 74 68 |h Pic so| that th|
|00004820| 65 79 20 73 68 61 72 65 | 20 74 68 65 20 73 6d 61 |ey share| the sma|
|00004830| 65 20 6f 72 69 67 69 6e | 2e 0d 20 20 20 20 20 20 |e origin|.. |
|00004840| 20 20 20 20 20 20 20 20 | 20 20 6d 6f 64 75 6c 65 | | module|
|00004850| 3a 20 52 5f 4d 6f 76 69 | 65 0d 0d 70 55 54 20 20 |: R_Movi|e..pUT |
|00004860| 20 20 20 20 20 20 20 20 | 20 20 20 41 72 67 73 3a | | Args:|
|00004870| 20 5b 56 65 63 5d 20 4d | 6f 76 69 65 20 4d 6f 76 | [Vec] M|ovie Mov|
|00004880| 69 65 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ie. | |
|00004890| 20 20 20 54 68 69 73 20 | 74 61 6b 65 73 20 61 20 | This |takes a |
|000048a0| 6c 69 73 74 20 6f 66 20 | 56 65 63 2c 20 61 6e 64 |list of |Vec, and|
|000048b0| 20 70 75 74 73 20 65 61 | 63 68 20 50 69 63 20 6f | puts ea|ch Pic o|
|000048c0| 66 20 74 68 65 0d 20 20 | 20 20 20 20 20 20 20 20 |f the. | |
|000048d0| 20 20 20 20 20 20 66 69 | 72 73 74 20 4d 6f 76 69 | fi|rst Movi|
|000048e0| 65 20 69 6e 20 74 68 65 | 20 6c 6f 63 61 74 69 6f |e in the| locatio|
|000048f0| 6e 20 6f 66 20 74 68 65 | 20 63 6f 72 72 65 73 70 |n of the| corresp|
|00004900| 6f 6e 64 69 6e 67 0d 20 | 20 20 20 20 20 20 20 20 |onding. | |
|00004910| 20 20 20 20 20 20 20 56 | 65 63 20 6f 6e 20 74 6f | V|ec on to|
|00004920| 70 20 6f 66 20 74 68 65 | 20 50 69 63 20 6f 66 20 |p of the| Pic of |
|00004930| 74 68 65 20 73 65 63 6f | 6e 64 20 4d 6f 76 69 65 |the seco|nd Movie|
|00004940| 20 61 6e 64 0d 20 20 20 | 20 20 20 20 20 20 20 20 | and. | |
|00004950| 20 20 20 20 20 72 65 74 | 75 72 6e 73 20 74 68 61 | ret|urns tha|
|00004960| 74 20 6c 69 73 74 20 61 | 73 20 74 68 65 20 6e 65 |t list a|s the ne|
|00004970| 77 20 4d 6f 76 69 65 2e | 0d 20 20 20 20 20 20 20 |w Movie.|. |
|00004980| 20 20 20 20 20 20 20 20 | 20 6d 6f 64 75 6c 65 3a | | module:|
|00004990| 20 52 5f 4d 6f 76 69 65 | 0d 0d 5c 65 6e 64 7b 76 | R_Movie|..\end{v|
|000049a0| 65 72 62 61 74 69 6d 7d | 0d 0d 5c 73 65 63 74 69 |erbatim}|..\secti|
|000049b0| 6f 6e 7b 44 69 73 70 6c | 61 79 69 6e 67 20 59 6f |on{Displ|aying Yo|
|000049c0| 75 72 20 4d 6f 76 69 65 | 7d 0d 0d 09 4f 6e 63 65 |ur Movie|}...Once|
|000049d0| 20 79 6f 75 20 68 61 76 | 65 20 79 6f 75 72 20 66 | you hav|e your f|
|000049e0| 75 6e 63 74 69 6f 6e 20 | 66 6f 72 20 74 68 65 20 |unction |for the |
|000049f0| 4d 6f 76 69 65 20 64 65 | 66 69 6e 65 64 2c 20 79 |Movie de|fined, y|
|00004a00| 6f 75 20 6e 65 65 64 20 | 74 6f 20 6f 75 74 70 75 |ou need |to outpu|
|00004a10| 74 0d 69 74 20 69 6e 20 | 73 6f 6d 65 20 77 61 79 |t.it in |some way|
|00004a20| 2e 20 43 75 72 72 65 6e | 74 6c 79 2c 20 74 68 69 |. Curren|tly, thi|
|00004a30| 73 20 69 73 20 64 6f 6e | 65 20 62 79 20 6f 75 74 |s is don|e by out|
|00004a40| 70 75 74 74 69 6e 67 20 | 63 68 61 72 61 63 74 65 |putting |characte|
|00004a50| 72 73 20 74 6f 20 61 20 | 66 69 6c 65 20 61 6e 64 |rs to a |file and|
|00004a60| 0d 72 75 6e 6e 69 6e 67 | 20 61 20 43 20 50 72 6f |.running| a C Pro|
|00004a70| 67 72 61 6d 20 69 6e 20 | 58 2d 57 69 6e 64 6f 77 |gram in |X-Window|
|00004a80| 73 20 74 68 61 74 20 64 | 69 73 70 6c 61 79 73 20 |s that d|isplays |
|00004a90| 74 68 65 20 63 6f 6e 74 | 65 6e 74 73 20 6f 66 20 |the cont|ents of |
|00004aa0| 74 68 65 20 66 69 6c 65 | 0d 61 73 20 61 20 67 72 |the file|.as a gr|
|00004ab0| 61 70 68 69 63 20 69 6e | 20 74 68 65 20 58 20 73 |aphic in| the X s|
|00004ac0| 79 73 74 65 6d 2e 20 46 | 69 72 73 74 20 6f 66 20 |ystem. F|irst of |
|00004ad0| 61 6c 6c 2c 20 79 6f 75 | 20 6d 75 73 74 20 63 6f |all, you| must co|
|00004ae0| 6e 76 65 72 74 20 74 68 | 65 0d 4d 6f 76 69 65 20 |nvert th|e.Movie |
|00004af0| 76 61 72 69 61 62 6c 65 | 20 74 6f 20 61 20 73 74 |variable| to a st|
|00004b00| 72 65 61 6d 20 6f 66 20 | 63 68 61 72 61 63 74 65 |ream of |characte|
|00004b10| 72 73 2e 20 54 68 69 73 | 20 69 73 20 64 6f 6e 65 |rs. This| is done|
|00004b20| 20 62 79 20 72 75 6e 6e | 69 6e 67 20 0d 22 73 68 | by runn|ing ."sh|
|00004b30| 6f 77 6d 22 20 6f 6e 20 | 74 68 65 20 4d 6f 76 69 |owm" on |the Movi|
|00004b40| 65 2e 20 42 65 20 63 61 | 72 65 66 75 6c 6c 20 79 |e. Be ca|refull y|
|00004b50| 6f 75 20 64 6f 6e 27 74 | 20 74 72 79 20 74 6f 20 |ou don't| try to |
|00004b60| 63 6f 6e 76 65 72 74 20 | 61 6e 20 69 6e 66 69 6e |convert |an infin|
|00004b70| 69 74 65 20 6c 69 73 74 | 0d 69 6e 74 6f 20 63 68 |ite list|.into ch|
|00004b80| 61 72 61 63 74 65 72 73 | 20 61 73 20 74 68 65 20 |aracters| as the |
|00004b90| 63 6f 6d 70 69 6c 65 72 | 20 77 69 6c 6c 20 74 61 |compiler| will ta|
|00004ba0| 6b 65 20 61 77 68 69 6c | 65 20 74 6f 20 64 6f 20 |ke awhil|e to do |
|00004bb0| 74 68 69 73 2e 20 49 6e | 73 74 65 61 64 2c 20 74 |this. In|stead, t|
|00004bc0| 61 6b 65 0d 61 20 63 65 | 72 74 61 69 6e 20 6e 75 |ake.a ce|rtain nu|
|00004bd0| 6d 62 65 72 20 6f 66 20 | 66 72 61 6d 65 73 20 61 |mber of |frames a|
|00004be0| 6e 64 20 63 6f 6e 76 65 | 72 74 20 74 68 65 6d 20 |nd conve|rt them |
|00004bf0| 77 69 74 68 20 22 73 68 | 6f 77 6d 22 2e 0d 5c 62 |with "sh|owm"..\b|
|00004c00| 65 67 69 6e 7b 76 65 72 | 62 61 74 69 6d 7d 0d 20 |egin{ver|batim}. |
|00004c10| 20 20 20 20 20 20 20 6d | 61 6e 5c 5f 76 6d 20 3d | m|an\_vm =|
|00004c20| 20 72 4f 56 45 52 4c 41 | 59 20 5b 6d 61 6e 2c 76 | rOVERLA|Y [man,v|
|00004c30| 6d 5d 0d 20 20 20 20 20 | 20 20 20 6d 61 6e 5c 5f |m]. | man\_|
|00004c40| 76 6d 73 74 72 69 6e 67 | 20 3d 20 73 68 6f 77 6d |vmstring| = showm|
|00004c50| 20 28 74 61 6b 65 20 32 | 30 20 6d 61 6e 26 76 6d | (take 2|0 man&vm|
|00004c60| 29 0d 5c 65 6e 64 7b 76 | 65 72 62 61 74 69 6d 7d |).\end{v|erbatim}|
|00004c70| 0d 20 20 4e 6f 77 20 74 | 68 61 74 20 79 6f 75 20 |. Now t|hat you |
|00004c80| 68 61 76 65 20 74 68 69 | 73 20 73 74 72 69 6e 67 |have thi|s string|
|00004c90| 2c 20 79 6f 75 20 6e 65 | 65 64 20 74 6f 20 77 72 |, you ne|ed to wr|
|00004ca0| 69 74 65 20 69 74 20 74 | 6f 20 64 69 73 6b 2e 20 |ite it t|o disk. |
|00004cb0| 54 68 65 20 0d 22 77 72 | 69 74 65 74 6f 66 69 6c |The ."wr|itetofil|
|00004cc0| 65 22 20 66 75 6e 63 74 | 69 6f 6e 20 64 6f 65 73 |e" funct|ion does|
|00004cd0| 20 74 68 69 73 2e 20 49 | 74 20 74 61 6b 65 73 20 | this. I|t takes |
|00004ce0| 61 20 63 68 61 72 61 63 | 61 74 65 72 20 73 74 72 |a charac|ater str|
|00004cf0| 69 6e 67 28 69 65 20 5b | 43 68 61 72 5d 20 29 0d |ing(ie [|Char] ).|
|00004d00| 61 73 20 61 6e 20 61 72 | 67 75 6d 65 6e 74 2c 20 |as an ar|gument, |
|00004d10| 61 6e 64 20 74 68 65 6e | 20 70 72 6f 6d 70 74 73 |and then| prompts|
|00004d20| 20 79 6f 75 20 66 6f 72 | 20 61 20 66 69 6c 65 6e | you for| a filen|
|00004d30| 61 6d 65 2e 20 49 74 20 | 74 68 65 6e 20 77 72 69 |ame. It |then wri|
|00004d40| 74 65 73 20 74 68 65 0d | 73 74 72 69 6e 67 20 74 |tes the.|string t|
|00004d50| 6f 20 74 68 65 20 66 69 | 6c 65 6e 61 6d 65 2e 20 |o the fi|lename. |
|00004d60| 53 6f 20 74 6f 20 70 75 | 74 20 6d 61 6e 5c 5f 76 |So to pu|t man\_v|
|00004d70| 6d 20 73 74 72 69 6e 67 | 20 69 6e 74 6f 20 61 20 |m string| into a |
|00004d80| 66 69 6c 65 3a 0d 5c 62 | 65 67 69 6e 7b 76 65 72 |file:.\b|egin{ver|
|00004d90| 62 61 74 69 6d 7d 0d 20 | 20 20 20 20 20 20 20 6d |batim}. | m|
|00004da0| 61 69 6e 20 3d 20 77 72 | 69 74 65 74 6f 66 69 6c |ain = wr|itetofil|
|00004db0| 65 20 6d 61 6e 5f 76 6d | 73 74 72 69 6e 67 0d 5c |e man_vm|string.\|
|00004dc0| 65 6e 64 7b 76 65 72 62 | 61 74 69 6d 7d 0d 61 6e |end{verb|atim}.an|
|00004dd0| 64 20 72 75 6e 20 74 68 | 65 20 70 72 6f 67 72 61 |d run th|e progra|
|00004de0| 6d 2c 20 77 68 65 72 65 | 20 79 6f 75 20 77 69 6c |m, where| you wil|
|00004df0| 6c 20 70 72 6f 6d 70 74 | 65 64 20 66 6f 72 20 74 |l prompt|ed for t|
|00004e00| 68 65 20 66 69 6c 65 6e | 61 6d 65 2e 20 4f 72 20 |he filen|ame. Or |
|00004e10| 79 6f 75 20 63 6f 75 6c | 64 3a 0d 5c 62 65 67 69 |you coul|d:.\begi|
|00004e20| 6e 7b 76 65 72 62 61 74 | 69 6d 7d 0d 20 20 20 20 |n{verbat|im}. |
|00004e30| 20 20 20 20 6d 61 69 6e | 20 3d 20 77 72 69 74 65 | main| = write|
|00004e40| 74 6f 66 69 6c 65 20 28 | 73 68 6f 77 6d 20 28 74 |tofile (|showm (t|
|00004e50| 61 6b 65 20 32 30 20 6d | 61 6e 5f 76 6d 29 29 0d |ake 20 m|an_vm)).|
|00004e60| 5c 65 6e 64 7b 76 65 72 | 62 61 74 69 6d 7d 0d 74 |\end{ver|batim}.t|
|00004e70| 6f 20 6d 61 6b 65 20 69 | 74 20 6d 6f 72 65 20 63 |o make i|t more c|
|00004e80| 6f 6d 70 61 63 74 2e 0d | 0d 0d 5c 73 75 62 73 65 |ompact..|..\subse|
|00004e90| 63 74 69 6f 6e 7b 4d 69 | 73 63 65 6c 6c 61 6e 65 |ction{Mi|scellane|
|00004ea0| 6f 75 73 20 55 73 65 66 | 75 6c 6c 20 46 75 6e 63 |ous Usef|ull Func|
|00004eb0| 74 69 6f 6e 73 7d 0d 0d | 5c 62 65 67 69 6e 7b 76 |tions}..|\begin{v|
|00004ec0| 65 72 62 61 74 69 6d 7d | 0d 69 6e 62 65 74 77 65 |erbatim}|.inbetwe|
|00004ed0| 65 6e 20 20 20 20 20 20 | 20 41 72 67 73 3a 20 49 |en | Args: I|
|00004ee0| 6e 74 20 50 69 63 20 50 | 69 63 0d 20 20 20 20 20 |nt Pic P|ic. |
|00004ef0| 20 20 20 20 20 20 20 20 | 20 20 20 54 68 69 73 20 | | This |
|00004f00| 74 61 6b 65 73 20 61 6e | 20 49 6e 74 20 61 6e 64 |takes an| Int and|
|00004f10| 20 74 77 6f 20 50 69 63 | 73 20 61 6e 64 20 72 65 | two Pic|s and re|
|00004f20| 74 75 72 6e 73 20 61 20 | 4d 6f 76 69 65 20 0d 20 |turns a |Movie . |
|00004f30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 77 | | w|
|00004f40| 69 74 68 20 49 6e 74 20 | 50 69 63 73 20 69 6e 74 |ith Int |Pics int|
|00004f50| 65 72 70 6f 6c 61 74 69 | 6e 67 20 62 65 74 77 65 |erpolati|ng betwe|
|00004f60| 65 6e 20 74 68 65 20 74 | 77 6f 20 50 69 63 73 2e |en the t|wo Pics.|
|00004f70| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004f80| 20 6d 6f 64 75 6c 65 3a | 20 52 5f 49 6e 62 65 74 | module:| R_Inbet|
|00004f90| 77 65 65 6e 0d 0d 74 77 | 65 65 6e 20 20 20 20 20 |ween..tw|een |
|00004fa0| 20 20 20 20 20 20 41 72 | 67 73 3a 20 49 6e 74 20 | Ar|gs: Int |
|00004fb0| 4d 6f 76 69 65 20 4d 6f | 76 69 65 0d 20 20 20 20 |Movie Mo|vie. |
|00004fc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 54 68 69 73 | | This|
|00004fd0| 20 74 61 6b 65 73 20 61 | 6e 20 49 6e 74 20 61 6e | takes a|n Int an|
|00004fe0| 64 20 74 77 6f 20 4d 6f | 76 69 65 73 20 61 6e 64 |d two Mo|vies and|
|00004ff0| 20 72 65 74 75 72 6e 73 | 20 6f 6e 65 0d 20 20 20 | returns| one. |
|00005000| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 4d 6f 76 | | Mov|
|00005010| 69 65 20 6d 61 64 65 20 | 75 70 20 6f 66 20 74 68 |ie made |up of th|
|00005020| 65 20 66 69 72 73 74 20 | 4d 6f 76 69 65 2c 20 49 |e first |Movie, I|
|00005030| 6e 74 20 6e 75 6d 62 65 | 72 20 6f 66 0d 20 20 20 |nt numbe|r of. |
|00005040| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 66 72 61 | | fra|
|00005050| 6d 65 73 20 6f 66 20 50 | 69 63 73 20 69 6e 74 65 |mes of P|ics inte|
|00005060| 72 70 6f 6c 61 74 69 6e | 67 20 62 65 74 77 65 65 |rpolatin|g betwee|
|00005070| 6e 20 74 68 65 20 6c 61 | 73 74 0d 20 20 20 20 20 |n the la|st. |
|00005080| 20 20 20 20 20 20 20 20 | 20 20 20 50 69 63 20 6f | | Pic o|
|00005090| 66 20 74 68 65 20 66 69 | 72 73 74 20 4d 6f 76 69 |f the fi|rst Movi|
|000050a0| 65 20 61 6e 64 20 74 68 | 65 20 66 69 72 73 74 20 |e and th|e first |
|000050b0| 50 69 63 20 6f 66 20 74 | 68 65 0d 20 20 20 20 20 |Pic of t|he. |
|000050c0| 20 20 20 20 20 20 20 20 | 20 20 20 73 65 63 6f 6e | | secon|
|000050d0| 64 20 4d 6f 76 69 65 2c | 20 66 6f 6c 6c 6f 77 65 |d Movie,| followe|
|000050e0| 64 20 62 79 20 74 68 65 | 20 73 65 63 6f 6e 64 20 |d by the| second |
|000050f0| 4d 6f 76 69 65 0d 20 20 | 20 20 20 20 20 20 20 20 |Movie. | |
|00005100| 20 20 20 20 20 20 6d 6f | 64 75 6c 65 3a 20 52 5f | mo|dule: R_|
|00005110| 49 6e 62 65 74 77 65 65 | 6e 0d 0d 62 6f 78 20 20 |Inbetwee|n..box |
|00005120| 20 20 20 20 20 20 20 20 | 20 20 20 41 72 67 73 3a | | Args:|
|00005130| 20 49 6e 74 20 49 6e 74 | 20 49 6e 74 0d 20 20 20 | Int Int| Int. |
|00005140| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 54 68 69 | | Thi|
|00005150| 73 20 74 61 6b 65 73 20 | 33 20 49 6e 74 73 2c 20 |s takes |3 Ints, |
|00005160| 74 68 65 20 63 6f 6c 6f | 72 2c 20 77 69 64 74 68 |the colo|r, width|
|00005170| 20 61 6e 64 20 68 65 69 | 67 68 74 20 6f 66 20 0d | and hei|ght of .|
|00005180| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005190| 74 68 65 20 62 6f 78 20 | 61 6e 64 20 72 65 74 75 |the box |and retu|
|000051a0| 72 6e 73 20 61 20 50 69 | 63 20 6f 66 20 61 20 62 |rns a Pi|c of a b|
|000051b0| 6f 78 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ox. | |
|000051c0| 20 20 20 6d 6f 64 75 6c | 65 3a 20 52 5f 53 68 61 | modul|e: R_Sha|
|000051d0| 70 65 73 0d 0d 74 72 69 | 20 20 20 20 20 20 20 20 |pes..tri| |
|000051e0| 20 20 20 20 20 41 72 67 | 73 3a 20 49 6e 74 20 56 | Arg|s: Int V|
|000051f0| 65 63 20 56 65 63 20 56 | 65 63 0d 20 20 20 20 20 |ec Vec V|ec. |
|00005200| 20 20 20 20 20 20 20 20 | 20 20 20 54 68 69 73 20 | | This |
|00005210| 74 61 6b 65 73 20 61 20 | 63 6f 6c 6f 72 20 61 6e |takes a |color an|
|00005220| 64 20 74 68 72 65 65 20 | 76 65 63 74 6f 72 73 20 |d three |vectors |
|00005230| 61 6e 64 20 72 65 74 75 | 72 6e 73 20 61 0d 20 20 |and retu|rns a. |
|00005240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 50 69 | | Pi|
|00005250| 63 20 6f 66 20 61 20 74 | 72 69 61 6e 67 6c 65 20 |c of a t|riangle |
|00005260| 6f 66 20 74 68 61 74 20 | 63 6f 6c 6f 75 72 20 77 |of that |colour w|
|00005270| 69 74 68 20 74 68 6f 73 | 65 20 76 65 72 74 69 63 |ith thos|e vertic|
|00005280| 65 73 2e 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |es.. | |
|00005290| 20 20 20 20 6d 6f 64 75 | 6c 65 3a 20 52 5f 53 68 | modu|le: R_Sh|
|000052a0| 61 70 65 73 0d 0d 63 69 | 72 63 20 20 20 20 20 20 |apes..ci|rc |
|000052b0| 20 20 20 20 20 20 41 72 | 67 73 3a 20 49 6e 74 20 | Ar|gs: Int |
|000052c0| 49 6e 74 20 49 6e 74 0d | 20 20 20 20 20 20 20 20 |Int Int.| |
|000052d0| 20 20 20 20 20 20 20 20 | 54 68 69 73 20 74 61 6b | |This tak|
|000052e0| 65 73 20 61 20 63 6f 6c | 6f 72 2c 20 74 68 65 20 |es a col|or, the |
|000052f0| 72 61 64 69 75 73 20 61 | 6e 64 20 74 68 65 20 6e |radius a|nd the n|
|00005300| 75 6d 62 65 72 20 6f 66 | 20 70 6f 69 6e 74 73 0d |umber of| points.|
|00005310| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005320| 61 72 6f 75 6e 64 20 74 | 68 65 20 63 69 72 63 6c |around t|he circl|
|00005330| 65 2c 20 61 6e 64 20 72 | 65 74 75 72 6e 73 20 61 |e, and r|eturns a|
|00005340| 20 63 69 72 63 6c 65 20 | 77 69 74 68 20 6f 72 69 | circle |with ori|
|00005350| 67 69 6e 20 61 74 0d 20 | 20 20 20 20 20 20 20 20 |gin at. | |
|00005360| 20 20 20 20 20 20 20 28 | 30 2c 30 29 2e 0d 20 20 | (|0,0).. |
|00005370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6d 6f | | mo|
|00005380| 64 75 6c 65 3a 20 52 5f | 53 68 61 70 65 73 0d 5c |dule: R_|Shapes.\|
|00005390| 65 6e 64 7b 76 65 72 62 | 61 74 69 6d 7d 0d 0d 5c |end{verb|atim}..\|
|000053a0| 70 61 67 65 62 72 65 61 | 6b 0d 5c 6c 61 72 67 65 |pagebrea|k.\large|
|000053b0| 20 7b 5c 62 66 20 41 70 | 70 65 6e 64 69 78 3a 20 | {\bf Ap|pendix: |
|000053c0| 20 43 20 50 72 6f 67 72 | 61 6d 73 20 74 6f 20 44 | C Progr|ams to D|
|000053d0| 69 73 70 6c 61 79 20 6f | 6e 20 58 2d 57 69 6e 64 |isplay o|n X-Wind|
|000053e0| 6f 77 73 7d 0d 5c 5c 0d | 5c 5c 0d 09 54 68 65 20 |ows}.\\.|\\..The |
|000053f0| 70 72 6f 67 72 61 6d 20 | 63 75 72 72 65 6e 74 6c |program |currentl|
|00005400| 79 20 75 73 65 64 20 74 | 6f 20 72 75 6e 20 74 68 |y used t|o run th|
|00005410| 65 73 65 20 67 72 61 70 | 68 69 63 73 20 69 73 20 |ese grap|hics is |
|00005420| 63 61 6c 6c 65 64 20 22 | 78 63 73 68 6f 77 22 2e |called "|xcshow".|
|00005430| 0d 54 68 69 73 20 74 61 | 6b 65 73 20 6f 6e 65 20 |.This ta|kes one |
|00005440| 61 72 67 75 6d 65 6e 74 | 2c 20 74 68 65 20 6e 61 |argument|, the na|
|00005450| 6d 65 20 6f 66 20 74 68 | 65 20 66 69 6c 65 20 74 |me of th|e file t|
|00005460| 6f 20 62 65 20 72 75 6e | 2e 20 57 68 65 6e 20 72 |o be run|. When r|
|00005470| 75 6e 0d 69 6e 20 58 2d | 57 69 6e 64 6f 77 73 2c |un.in X-|Windows,|
|00005480| 20 69 74 20 77 69 6c 6c | 20 70 72 6f 64 75 63 65 | it will| produce|
|00005490| 20 61 20 77 69 6e 64 6f | 77 20 77 69 74 68 20 74 | a windo|w with t|
|000054a0| 68 65 20 66 69 72 73 74 | 20 50 69 63 2e 20 54 6f |he first| Pic. To|
|000054b0| 20 72 75 6e 20 69 74 2c | 20 63 6c 69 63 6b 0d 6f | run it,| click.o|
|000054c0| 6e 20 74 68 65 20 6c 65 | 66 74 20 6d 6f 75 73 65 |n the le|ft mouse|
|000054d0| 20 62 75 74 74 6f 6e 20 | 69 6e 73 69 64 65 20 74 | button |inside t|
|000054e0| 68 65 20 77 69 6e 64 6f | 77 2e 20 43 6c 69 63 6b |he windo|w. Click|
|000054f0| 69 6e 67 20 61 67 61 69 | 6e 20 77 69 6c 6c 20 66 |ing agai|n will f|
|00005500| 72 65 65 7a 65 20 69 74 | 2e 0d 54 68 69 73 20 77 |reeze it|..This w|
|00005510| 69 6c 6c 20 6b 65 65 70 | 20 63 79 63 6c 69 6e 67 |ill keep| cycling|
|00005520| 20 74 68 72 6f 75 67 68 | 20 74 68 65 20 66 69 6c | through| the fil|
|00005530| 65 2c 20 72 65 70 6c 61 | 79 69 6e 67 20 61 67 61 |e, repla|ying aga|
|00005540| 69 6e 20 77 68 65 6e 20 | 69 74 20 68 69 74 73 20 |in when |it hits |
|00005550| 74 68 65 0d 65 6e 64 20 | 6f 66 20 74 68 65 20 66 |the.end |of the f|
|00005560| 69 6c 65 2c 20 75 6e 74 | 69 6c 20 74 68 65 20 77 |ile, unt|il the w|
|00005570| 69 6e 64 6f 77 20 69 73 | 20 6b 69 6c 6c 65 64 2e |indow is| killed.|
|00005580| 0d 0d 09 54 68 65 72 65 | 20 69 73 20 61 6c 73 6f |...There| is also|
|00005590| 20 22 78 73 68 6f 77 22 | 20 77 68 69 63 68 20 69 | "xshow"| which i|
|000055a0| 73 20 75 73 65 64 20 74 | 6f 20 72 75 6e 20 74 68 |s used t|o run th|
|000055b0| 65 20 6d 6f 6e 6f 63 68 | 72 6f 6d 65 20 4d 6f 76 |e monoch|rome Mov|
|000055c0| 69 65 73 2c 20 61 73 0d | 22 78 63 73 68 6f 77 22 |ies, as.|"xcshow"|
|000055d0| 20 69 73 20 75 73 65 64 | 20 74 6f 20 72 75 6e 20 | is used| to run |
|000055e0| 74 68 65 20 63 6f 6c 6f | 72 20 4d 6f 76 69 65 73 |the colo|r Movies|
|000055f0| 2e 20 41 73 20 74 68 69 | 73 20 61 6e 69 6d 61 74 |. As thi|s animat|
|00005600| 69 6f 6e 20 70 61 63 6b | 61 67 65 0d 6f 6e 6c 79 |ion pack|age.only|
|00005610| 20 70 72 6f 64 75 63 65 | 73 20 63 6f 6c 6f 72 20 | produce|s color |
|00005620| 4d 6f 76 69 65 73 2c 20 | 69 74 20 69 73 6e 27 74 |Movies, |it isn't|
|00005630| 20 74 6f 6f 20 75 73 65 | 66 75 6c 6c 2e 0d 0d 0d | too use|full....|
|00005640| 5c 70 61 67 65 62 72 65 | 61 6b 0d 5c 6c 61 72 67 |\pagebre|ak.\larg|
|00005650| 65 20 7b 5c 62 66 20 52 | 65 66 65 72 65 6e 63 65 |e {\bf R|eference|
|00005660| 73 7d 0d 5c 5c 0d 5c 5c | 0d 5c 62 65 67 69 6e 7b |s}.\\.\\|.\begin{|
|00005670| 76 65 72 62 61 74 69 6d | 7d 0d 5b 41 52 59 41 38 |verbatim|}.[ARYA8|
|00005680| 38 5d 20 22 54 68 65 20 | 46 6f 72 6d 61 6c 20 41 |8] "The |Formal A|
|00005690| 6e 61 6c 79 73 69 73 20 | 6f 66 20 61 20 46 75 6e |nalysis |of a Fun|
|000056a0| 63 74 69 6f 6e 61 20 41 | 6e 69 6d 61 74 69 6f 6e |ctiona A|nimation|
|000056b0| 20 53 79 73 74 65 6d 22 | 2c 20 4b 65 76 69 20 41 | System"|, Kevi A|
|000056c0| 72 79 61 2c 0d 20 20 20 | 20 20 20 20 20 20 20 44 |rya,. | D|
|000056d0| 50 68 69 6c 2c 54 68 65 | 73 69 73 2c 4f 78 66 6f |Phil,The|sis,Oxfo|
|000056e0| 72 64 20 55 6e 69 76 65 | 72 73 69 74 79 2c 20 50 |rd Unive|rsity, P|
|000056f0| 72 6f 67 72 61 6d 6d 69 | 6e 67 20 52 65 73 65 61 |rogrammi|ng Resea|
|00005700| 72 63 68 20 47 72 6f 75 | 70 2c 0d 20 20 20 20 20 |rch Grou|p,. |
|00005710| 20 20 20 20 20 41 70 72 | 69 6c 20 31 39 38 38 0d | Apr|il 1988.|
|00005720| 0d 5b 41 52 59 41 38 39 | 5d 20 22 50 72 6f 63 65 |.[ARYA89|] "Proce|
|00005730| 73 73 65 73 20 49 6e 20 | 41 20 46 75 6e 63 74 69 |sses In |A Functi|
|00005740| 6f 6e 61 6c 20 41 6e 69 | 6d 61 74 69 6f 6e 20 53 |onal Ani|mation S|
|00005750| 79 73 74 65 6d 22 2c 20 | 4b 65 76 69 20 41 72 79 |ystem", |Kevi Ary|
|00005760| 61 2c 49 42 4d 0d 20 20 | 20 20 20 20 20 20 20 20 |a,IBM. | |
|00005770| 54 2e 4a 2e 20 52 65 73 | 65 61 72 63 68 20 43 65 |T.J. Res|earch Ce|
|00005780| 6e 74 65 72 2c 20 31 39 | 38 39 20 0d 0d 5b 48 41 |nter, 19|89 ..[HA|
|00005790| 53 4b 39 30 5d 20 22 52 | 65 70 6f 72 74 20 4f 6e |SK90] "R|eport On|
|000057a0| 20 54 68 65 20 50 72 6f | 67 72 61 6d 6d 69 6e 67 | The Pro|gramming|
|000057b0| 20 4c 61 6e 67 75 61 67 | 65 20 48 61 73 6b 65 6c | Languag|e Haskel|
|000057c0| 6c 2c 20 56 65 72 73 69 | 6f 6e 20 31 2e 30 22 2c |l, Versi|on 1.0",|
|000057d0| 0d 20 20 20 20 20 20 20 | 20 20 20 59 41 4c 45 55 |. | YALEU|
|000057e0| 2f 44 43 53 2f 52 52 2d | 37 37 37 2c 59 61 6c 65 |/DCS/RR-|777,Yale|
|000057f0| 20 55 6e 69 76 65 72 73 | 69 74 79 2c 31 39 39 30 | Univers|ity,1990|
|00005800| 0d 5c 65 6e 64 7b 76 65 | 72 62 61 74 69 6d 7d 0d |.\end{ve|rbatim}.|
|00005810| 0d 5c 65 6e 64 7b 64 6f | 63 75 6d 65 6e 74 7d 0d |.\end{do|cument}.|
+--------+-------------------------+-------------------------+--------+--------+