home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / doc / guide / animate.tex next >
LaTeX Document  |  1994-08-09  |  4.1 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

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

You can browse this item here: animate.tex

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



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 63 68 61 70 74 65 72 | 7b 41 6e 69 6d 61 74 69 |\chapter|{Animati|
|00000010| 6f 6e 7d 0a 0a 7b 5c 52 | 61 79 73 68 61 64 65 7d |on}..{\R|ayshade}|
|00000020| 5c 20 70 72 6f 76 69 64 | 65 73 20 62 61 73 69 63 |\ provid|es basic|
|00000030| 20 61 6e 69 6d 61 74 69 | 6f 6e 20 61 6e 69 6d 61 | animati|on anima|
|00000040| 74 69 6f 6e 20 73 75 70 | 70 6f 72 74 20 62 79 0a |tion sup|port by.|
|00000050| 61 6c 6c 6f 77 69 6e 67 | 20 74 69 6d 65 2d 76 61 |allowing| time-va|
|00000060| 72 79 69 6e 67 0a 74 72 | 61 6e 73 66 6f 72 6d 61 |rying.tr|ansforma|
|00000070| 74 69 6f 6e 73 20 74 6f | 20 62 65 20 61 73 73 6f |tions to| be asso|
|00000080| 63 69 61 74 65 64 20 77 | 69 74 68 20 70 72 69 6d |ciated w|ith prim|
|00000090| 69 74 69 76 65 73 20 61 | 6e 64 20 61 67 67 72 65 |itives a|nd aggre|
|000000a0| 67 61 74 65 20 6f 62 6a | 65 63 74 73 2e 0a 43 6f |gate obj|ects..Co|
|000000b0| 6d 6d 61 6e 64 73 20 61 | 72 65 20 70 72 6f 76 69 |mmands a|re provi|
|000000c0| 64 65 64 20 66 6f 72 20 | 63 6f 6e 74 72 6f 6c 6c |ded for |controll|
|000000d0| 69 6e 67 20 74 68 65 20 | 61 6d 6f 75 6e 74 20 6f |ing the |amount o|
|000000e0| 66 20 74 69 6d 65 20 62 | 65 74 77 65 65 6e 20 65 |f time b|etween e|
|000000f0| 61 63 68 0a 66 72 61 6d | 65 2c 20 74 68 65 20 73 |ach.fram|e, the s|
|00000100| 70 65 65 64 20 6f 66 20 | 74 68 65 20 63 61 6d 65 |peed of |the came|
|00000110| 72 61 20 73 68 75 74 74 | 65 72 2c 20 61 6e 64 20 |ra shutt|er, and |
|00000120| 74 68 65 20 74 6f 74 61 | 6c 20 6e 75 6d 62 65 72 |the tota|l number|
|00000130| 20 6f 66 20 66 72 61 6d | 65 73 0a 74 6f 20 62 65 | of fram|es.to be|
|00000140| 20 72 65 6e 64 65 72 65 | 64 2e 0a 0a 42 79 20 64 | rendere|d...By d|
|00000150| 65 66 61 75 6c 74 2c 20 | 7b 5c 72 61 79 73 68 61 |efault, |{\raysha|
|00000160| 64 65 7d 20 72 65 6e 64 | 65 72 73 20 61 20 73 69 |de} rend|ers a si|
|00000170| 6e 67 6c 65 20 66 72 61 | 6d 65 2c 20 77 69 74 68 |ngle fra|me, with|
|00000180| 20 74 68 65 20 73 68 75 | 74 74 65 72 20 6f 70 65 | the shu|tter ope|
|00000190| 6e 20 66 6f 72 0a 61 6e | 20 69 6e 73 74 61 6e 74 |n for.an| instant|
|000001a0| 20 28 30 20 75 6e 69 74 | 73 20 6f 66 20 74 69 6d | (0 unit|s of tim|
|000001b0| 65 2c 20 69 6e 20 66 61 | 63 74 29 2e 20 20 54 68 |e, in fa|ct). Th|
|000001c0| 65 20 73 68 75 74 74 65 | 72 20 73 70 65 65 64 20 |e shutte|r speed |
|000001d0| 69 6e 20 6e 6f 20 77 61 | 79 0a 63 68 61 6e 67 65 |in no wa|y.change|
|000001e0| 73 20 74 68 65 20 6c 69 | 67 68 74 2d 67 61 74 68 |s the li|ght-gath|
|000001f0| 65 72 69 6e 67 20 70 72 | 6f 70 65 72 74 69 65 73 |ering pr|operties|
|00000200| 20 6f 66 20 74 68 65 20 | 63 61 6d 65 72 61 2c 20 | of the |camera, |
|00000210| 69 2e 65 2e 2c 20 66 72 | 61 6d 65 73 0a 72 65 6e |i.e., fr|ames.ren|
|00000220| 64 65 72 65 64 20 75 73 | 69 6e 67 0a 61 20 6c 6f |dered us|ing.a lo|
|00000230| 6e 67 65 72 20 65 78 70 | 6f 73 75 72 65 20 77 69 |nger exp|osure wi|
|00000240| 6c 6c 20 6e 6f 74 20 61 | 70 70 65 61 72 20 62 72 |ll not a|ppear br|
|00000250| 69 67 68 74 65 72 20 74 | 68 61 6e 20 74 68 6f 73 |ighter t|han thos|
|00000260| 65 20 77 69 74 68 20 61 | 20 73 68 6f 72 74 65 72 |e with a| shorter|
|00000270| 0a 65 78 70 6f 73 75 72 | 65 2e 20 20 54 68 65 20 |.exposur|e. The |
|00000280| 6f 6e 6c 79 20 63 68 61 | 6e 67 65 20 77 69 6c 6c |only cha|nge will|
|00000290| 20 62 65 20 69 6e 20 74 | 68 65 20 70 6f 74 65 6e | be in t|he poten|
|000002a0| 74 69 61 6c 20 61 6d 6f | 75 6e 74 20 6f 66 20 6d |tial amo|unt of m|
|000002b0| 6f 76 65 6d 65 6e 74 0a | 74 68 61 74 20 74 68 65 |ovement.|that the|
|000002c0| 0a 66 72 61 6d 65 20 60 | 60 73 65 65 73 27 27 20 |.frame `|`sees'' |
|000002d0| 64 75 72 69 6e 67 20 74 | 68 65 20 74 69 6d 65 20 |during t|he time |
|000002e0| 74 68 61 74 20 74 68 65 | 20 73 68 75 74 74 65 72 |that the| shutter|
|000002f0| 20 69 73 20 6f 70 65 6e | 2e 0a 0a 45 61 63 68 20 | is open|...Each |
|00000300| 72 61 79 20 63 61 73 74 | 20 62 79 20 7b 5c 72 61 |ray cast| by {\ra|
|00000310| 79 73 68 61 64 65 7d 20 | 73 61 6d 70 6c 65 73 20 |yshade} |samples |
|00000320| 61 20 70 61 72 74 69 63 | 75 6c 61 72 20 6d 6f 6d |a partic|ular mom|
|00000330| 65 6e 74 20 69 6e 20 74 | 69 6d 65 2e 0a 54 68 65 |ent in t|ime..The|
|00000340| 20 74 69 6d 65 20 76 61 | 6c 75 65 20 61 73 73 69 | time va|lue assi|
|00000350| 67 6e 65 64 20 74 6f 20 | 61 20 72 61 79 0a 72 61 |gned to |a ray.ra|
|00000360| 6e 67 65 73 20 66 72 6f | 6d 20 74 68 65 20 73 74 |nges fro|m the st|
|00000370| 61 72 74 69 6e 67 20 74 | 69 6d 65 20 6f 66 20 74 |arting t|ime of t|
|00000380| 68 65 20 63 75 72 72 65 | 6e 74 20 66 72 61 6d 65 |he curre|nt frame|
|00000390| 20 74 6f 20 74 68 65 20 | 73 74 61 72 74 69 6e 67 | to the |starting|
|000003a0| 0a 74 69 6d 65 20 70 6c | 75 73 20 74 68 65 20 61 |.time pl|us the a|
|000003b0| 6d 6f 75 6e 74 20 6f 66 | 20 74 69 6d 65 20 74 68 |mount of| time th|
|000003c0| 65 20 73 68 75 74 74 65 | 72 20 69 73 20 6f 70 65 |e shutte|r is ope|
|000003d0| 6e 2e 20 20 57 68 65 6e | 0a 61 20 72 61 79 20 65 |n. When|.a ray e|
|000003e0| 6e 63 6f 75 6e 74 65 72 | 73 20 61 6e 20 6f 62 6a |ncounter|s an obj|
|000003f0| 65 63 74 20 6f 72 20 74 | 65 78 74 75 72 65 20 74 |ect or t|exture t|
|00000400| 68 61 74 20 70 6f 73 73 | 65 73 73 65 73 20 61 6e |hat poss|esses an|
|00000410| 20 61 6e 69 6d 61 74 65 | 64 0a 74 72 61 6e 73 66 | animate|d.transf|
|00000420| 6f 72 6d 61 74 69 6f 6e | 2c 20 74 68 65 20 74 72 |ormation|, the tr|
|00000430| 61 6e 73 66 6f 72 6d 65 | 64 0a 65 6e 74 69 74 79 |ansforme|d.entity|
|00000440| 20 69 73 20 6d 6f 76 65 | 64 20 69 6e 74 6f 20 77 | is move|d into w|
|00000450| 68 61 74 65 76 65 72 20 | 70 6f 73 69 74 69 6f 6e |hatever |position|
|00000460| 20 69 73 20 61 70 70 72 | 6f 70 72 69 61 74 65 0a | is appr|opriate.|
|00000470| 66 6f 72 20 74 68 65 20 | 72 61 79 27 73 20 63 75 |for the |ray's cu|
|00000480| 72 72 65 6e 74 20 74 69 | 6d 65 20 76 61 6c 75 65 |rrent ti|me value|
|00000490| 20 62 65 66 6f 72 65 20 | 69 6e 74 65 72 73 65 63 | before |intersec|
|000004a0| 74 69 6f 6e 2c 20 73 68 | 61 64 69 6e 67 2c 20 6f |tion, sh|ading, o|
|000004b0| 72 20 74 65 78 74 75 72 | 69 6e 67 0a 63 6f 6d 70 |r textur|ing.comp|
|000004c0| 75 74 61 74 69 6f 6e 73 | 20 61 72 65 20 70 65 72 |utations| are per|
|000004d0| 66 6f 72 6d 65 64 2e 0a | 0a 54 68 65 20 73 74 61 |formed..|.The sta|
|000004e0| 72 74 69 6e 67 20 74 69 | 6d 65 20 6f 66 20 74 68 |rting ti|me of th|
|000004f0| 65 20 63 75 72 72 65 6e | 74 20 66 72 61 6d 65 20 |e curren|t frame |
|00000500| 69 73 20 63 6f 6d 70 75 | 74 65 64 20 75 73 69 6e |is compu|ted usin|
|00000510| 67 20 74 68 65 0a 6c 65 | 6e 67 74 68 20 6f 66 20 |g the.le|ngth of |
|00000520| 65 61 63 68 20 66 72 61 | 6d 65 0a 74 68 65 20 63 |each fra|me.the c|
|00000530| 75 72 72 65 6e 74 20 66 | 72 61 6d 65 20 6e 75 6d |urrent f|rame num|
|00000540| 62 65 72 2c 20 61 6e 64 | 20 74 68 65 20 73 74 61 |ber, and| the sta|
|00000550| 72 74 69 6e 67 20 74 69 | 6d 65 20 6f 66 20 74 68 |rting ti|me of th|
|00000560| 65 20 66 69 72 73 74 20 | 66 72 61 6d 65 2e 0a 0a |e first |frame...|
|00000570| 5c 62 65 67 69 6e 7b 64 | 65 66 6b 65 79 7d 7b 73 |\begin{d|efkey}{s|
|00000580| 68 75 74 74 65 72 7d 7b | 7b 5c 65 6d 20 74 7d 7d |hutter}{|{\em t}}|
|00000590| 0a 09 53 70 65 63 69 66 | 69 65 73 20 74 68 61 74 |..Specif|ies that|
|000005a0| 20 74 68 65 20 73 68 75 | 74 74 65 72 20 69 73 20 | the shu|tter is |
|000005b0| 6f 70 65 6e 20 66 6f 72 | 20 74 20 75 6e 69 74 73 |open for| t units|
|000005c0| 20 6f 66 0a 09 74 69 6d | 65 20 66 6f 72 20 65 61 | of..tim|e for ea|
|000005d0| 63 68 20 65 78 70 6f 73 | 75 72 65 2e 0a 5c 65 6e |ch expos|ure..\en|
|000005e0| 64 7b 64 65 66 6b 65 79 | 7d 0a 41 20 6c 61 72 67 |d{defkey|}.A larg|
|000005f0| 65 72 20 76 61 6c 75 65 | 20 6f 66 20 7b 5c 65 6d |er value| of {\em|
|00000600| 20 74 7d 20 77 69 6c 6c | 20 6c 65 61 64 20 74 6f | t} will| lead to|
|00000610| 20 6d 6f 72 65 20 6d 6f | 74 69 6f 6e 20 62 6c 75 | more mo|tion blu|
|00000620| 72 20 69 6e 20 74 68 65 | 20 66 69 6e 61 6c 0a 69 |r in the| final.i|
|00000630| 6d 61 67 65 2e 20 20 20 | 4e 6f 74 65 20 74 68 61 |mage. |Note tha|
|00000640| 74 20 7b 5c 65 6d 20 74 | 7d 20 6d 61 79 20 62 65 |t {\em t|} may be|
|00000650| 20 67 72 65 61 74 65 72 | 20 74 68 61 6e 20 74 68 | greater| than th|
|00000660| 65 20 61 63 74 75 61 6c | 20 6c 65 6e 67 74 68 0a |e actual| length.|
|00000670| 6f 66 20 61 20 66 72 61 | 6d 65 2e 20 20 42 79 20 |of a fra|me. By |
|00000680| 64 65 66 61 75 6c 74 2c | 20 7b 5c 65 6d 20 74 7d |default,| {\em t}|
|00000690| 20 69 73 20 7a 65 72 6f | 2c 20 77 68 69 63 68 20 | is zero|, which |
|000006a0| 70 72 65 76 65 6e 74 73 | 20 61 6c 6c 20 6d 6f 74 |prevents| all mot|
|000006b0| 69 6f 6e 20 62 6c 75 72 | 2e 0a 0a 5c 62 65 67 69 |ion blur|...\begi|
|000006c0| 6e 7b 64 65 66 6b 65 79 | 7d 7b 66 72 61 6d 65 6c |n{defkey|}{framel|
|000006d0| 65 6e 67 74 68 7d 7b 7b | 5c 65 6d 20 66 72 61 6d |ength}{{|\em fram|
|000006e0| 65 69 6e 63 7d 7d 0a 09 | 53 70 65 63 69 66 69 65 |einc}}..|Specifie|
|000006f0| 73 20 74 68 65 20 74 69 | 6d 65 20 69 6e 63 72 65 |s the ti|me incre|
|00000700| 6d 65 6e 74 20 62 65 74 | 77 65 65 6e 20 66 72 61 |ment bet|ween fra|
|00000710| 6d 65 73 2e 0a 5c 65 6e | 64 7b 64 65 66 6b 65 79 |mes..\en|d{defkey|
|00000720| 7d 0a 54 68 65 20 64 65 | 66 61 75 6c 74 20 74 69 |}.The de|fault ti|
|00000730| 6d 65 20 62 65 74 77 65 | 65 6e 20 66 72 61 6d 65 |me betwe|en frame|
|00000740| 73 20 69 73 20 31 20 75 | 6e 69 74 2e 0a 0a 5c 62 |s is 1 u|nit...\b|
|00000750| 65 67 69 6e 7b 64 65 66 | 6b 65 79 7d 7b 73 74 61 |egin{def|key}{sta|
|00000760| 72 74 74 69 6d 65 7d 7b | 7b 5c 65 6d 20 74 69 6d |rttime}{|{\em tim|
|00000770| 65 7d 7d 0a 09 53 70 65 | 63 69 66 69 65 73 20 74 |e}}..Spe|cifies t|
|00000780| 68 65 20 73 74 61 72 74 | 69 6e 67 20 74 69 6d 65 |he start|ing time|
|00000790| 20 6f 66 20 74 68 65 20 | 66 69 72 73 74 20 66 72 | of the |first fr|
|000007a0| 61 6d 65 2e 0a 5c 65 6e | 64 7b 64 65 66 6b 65 79 |ame..\en|d{defkey|
|000007b0| 7d 0a 42 79 20 64 65 66 | 61 75 6c 74 2c 20 7b 5c |}.By def|ault, {\|
|000007c0| 65 6d 20 74 69 6d 65 7d | 20 69 73 20 7a 65 72 6f |em time}| is zero|
|000007d0| 2e 0a 0a 56 61 72 69 61 | 62 6c 65 73 20 6d 61 79 |...Varia|bles may|
|000007e0| 20 62 65 20 64 65 66 69 | 6e 65 64 20 74 68 6f 72 | be defi|ned thor|
|000007f0| 75 67 68 20 74 68 65 20 | 75 73 65 20 6f 66 20 74 |ugh the |use of t|
|00000800| 68 65 20 7b 5c 74 74 20 | 64 65 66 69 6e 65 7d 20 |he {\tt |define} |
|00000810| 6b 65 79 77 6f 72 64 3a | 0a 0a 5c 62 65 67 69 6e |keyword:|..\begin|
|00000820| 7b 64 65 66 6b 65 79 7d | 7b 64 65 66 69 6e 65 7d |{defkey}|{define}|
|00000830| 7b 7b 5c 65 6d 20 6e 61 | 6d 65 20 76 61 6c 75 65 |{{\em na|me value|
|00000840| 7d 7d 0a 09 41 73 73 6f | 63 69 61 74 65 20 7b 5c |}}..Asso|ciate {\|
|00000850| 65 6d 20 6e 61 6d 65 7d | 20 77 69 74 68 20 74 68 |em name}| with th|
|00000860| 65 20 67 69 76 65 6e 20 | 7b 5c 65 6d 20 76 61 6c |e given |{\em val|
|00000870| 75 65 7d 2e 20 20 56 61 | 6c 75 65 20 6d 61 79 0a |ue}. Va|lue may.|
|00000880| 09 62 65 20 61 20 63 6f | 6e 73 74 61 6e 74 20 6f |.be a co|nstant o|
|00000890| 72 20 61 20 70 61 72 65 | 6e 74 68 65 73 69 7a 65 |r a pare|nthesize|
|000008a0| 64 20 65 78 70 72 65 73 | 73 69 6f 6e 2e 0a 5c 65 |d expres|sion..\e|
|000008b0| 6e 64 7b 64 65 66 6b 65 | 79 7d 0a 54 68 65 20 76 |nd{defke|y}.The v|
|000008c0| 61 72 69 61 62 6c 65 20 | 7b 5c 65 6d 20 6e 61 6d |ariable |{\em nam|
|000008d0| 65 7d 20 6d 61 79 20 74 | 68 65 72 65 61 66 74 65 |e} may t|hereafte|
|000008e0| 72 20 62 65 20 75 73 65 | 64 20 69 6e 20 65 78 70 |r be use|d in exp|
|000008f0| 72 65 73 73 69 6f 6e 73 | 20 69 6e 20 74 68 65 0a |ressions| in the.|
|00000900| 69 6e 70 75 74 20 66 69 | 6c 65 2e 0a 0a 41 6e 20 |input fi|le...An |
|00000910| 61 6e 69 6d 61 74 65 64 | 20 74 72 61 6e 73 66 6f |animated| transfo|
|00000920| 72 6d 61 74 69 6f 6e 20 | 69 73 20 6f 6e 65 20 66 |rmation |is one f|
|00000930| 6f 72 20 77 68 69 63 68 | 20 61 6e 69 6d 61 74 65 |or which| animate|
|00000940| 64 20 65 78 70 72 65 73 | 73 69 6f 6e 73 20 68 61 |d expres|sions ha|
|00000950| 76 65 0a 62 65 65 6e 20 | 75 73 65 64 20 74 6f 20 |ve.been |used to |
|00000960| 64 65 66 69 6e 65 20 6f | 6e 65 20 6f 72 20 6d 6f |define o|ne or mo|
|00000970| 72 65 20 6f 66 20 69 74 | 73 20 70 61 72 61 6d 65 |re of it|s parame|
|00000980| 74 65 72 73 20 28 65 2e | 67 2e 20 74 68 65 20 61 |ters (e.|g. the a|
|00000990| 6e 67 6c 65 20 74 68 72 | 6f 75 67 68 0a 77 68 69 |ngle thr|ough.whi|
|000009a0| 63 68 20 61 20 72 6f 74 | 61 74 69 6f 6e 20 6f 63 |ch a rot|ation oc|
|000009b0| 63 75 72 73 29 2e 20 20 | 41 6e 20 61 6e 69 6d 61 |curs). |An anima|
|000009c0| 74 65 64 20 65 78 70 72 | 65 73 73 69 6f 6e 20 69 |ted expr|ession i|
|000009d0| 73 20 6f 6e 65 20 74 68 | 61 74 20 6d 61 6b 65 73 |s one th|at makes|
|000009e0| 0a 75 73 65 20 6f 66 20 | 61 20 74 69 6d 65 2d 76 |.use of |a time-v|
|000009f0| 61 72 79 69 6e 67 20 28 | 60 60 61 6e 69 6d 61 74 |arying (|``animat|
|00000a00| 65 64 27 27 29 20 76 61 | 72 69 61 62 6c 65 20 6f |ed'') va|riable o|
|00000a10| 72 20 66 75 6e 63 74 69 | 6f 6e 2e 0a 0a 54 68 65 |r functi|on...The|
|00000a20| 72 65 20 61 72 65 20 74 | 77 6f 20 73 75 70 70 6f |re are t|wo suppo|
|00000a30| 72 74 65 64 20 61 6e 69 | 6d 61 74 65 64 20 76 61 |rted ani|mated va|
|00000a40| 72 69 61 62 6c 65 73 2e | 0a 54 68 65 20 66 69 72 |riables.|.The fir|
|00000a50| 73 74 2c 20 7b 5c 74 74 | 20 74 69 6d 65 7d 2c 20 |st, {\tt| time}, |
|00000a60| 69 73 20 65 71 75 61 6c | 20 74 6f 20 74 68 65 20 |is equal| to the |
|00000a70| 63 75 72 72 65 6e 74 20 | 74 69 6d 65 2e 0a 57 68 |current |time..Wh|
|00000a80| 65 6e 20 61 20 72 61 79 | 20 65 6e 63 6f 75 6e 74 |en a ray| encount|
|00000a90| 65 72 73 20 61 6e 20 61 | 6e 69 6d 61 74 65 64 0a |ers an a|nimated.|
|00000aa0| 74 72 61 6e 73 66 6f 72 | 6d 61 74 69 6f 6e 20 64 |transfor|mation d|
|00000ab0| 65 66 69 6e 65 64 20 75 | 73 69 6e 67 20 61 6e 20 |efined u|sing an |
|00000ac0| 65 78 70 72 65 73 73 69 | 6f 6e 20 63 6f 6e 74 61 |expressi|on conta|
|00000ad0| 69 6e 69 6e 67 20 7b 5c | 74 74 20 74 69 6d 65 7d |ining {\|tt time}|
|00000ae0| 2c 20 74 68 65 20 72 61 | 79 0a 73 75 62 73 74 69 |, the ra|y.substi|
|00000af0| 74 75 74 65 73 20 69 74 | 73 20 74 69 6d 65 20 76 |tutes it|s time v|
|00000b00| 61 6c 75 65 20 69 6e 74 | 6f 20 74 68 65 20 65 78 |alue int|o the ex|
|00000b10| 70 72 65 73 73 69 6f 6e | 20 62 65 66 6f 72 65 20 |pression| before |
|00000b20| 65 76 61 6c 75 61 74 69 | 6f 6e 2e 0a 55 73 69 6e |evaluati|on..Usin|
|00000b30| 67 20 74 68 65 20 7b 5c | 74 74 20 74 69 6d 65 7d |g the {\|tt time}|
|00000b40| 20 76 61 72 69 61 62 6c | 65 20 69 6e 20 61 6e 20 | variabl|e in an |
|00000b50| 61 6e 69 6d 61 74 65 64 | 20 65 78 70 72 65 73 73 |animated| express|
|00000b60| 69 6f 6e 20 69 73 20 74 | 68 65 20 6d 6f 73 74 0a |ion is t|he most.|
|00000b70| 62 61 73 69 63 20 77 61 | 79 20 74 6f 20 63 72 65 |basic wa|y to cre|
|00000b80| 61 74 65 20 62 6c 75 72 | 2d 63 61 75 73 69 6e 67 |ate blur|-causing|
|00000b90| 20 6d 6f 74 69 6f 6e 2e | 0a 0a 54 68 65 20 73 65 | motion.|..The se|
|00000ba0| 63 6f 6e 64 20 61 6e 69 | 6d 61 74 65 64 20 76 61 |cond ani|mated va|
|00000bb0| 72 69 61 62 6c 65 2c 20 | 7b 5c 74 74 20 66 72 61 |riable, |{\tt fra|
|00000bc0| 6d 65 7d 2c 20 69 73 20 | 65 71 75 61 6c 20 74 6f |me}, is |equal to|
|00000bd0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 0a 66 72 61 | the cur|rent.fra|
|00000be0| 6d 65 20 6e 75 6d 62 65 | 72 2e 20 20 55 6e 6c 69 |me numbe|r. Unli|
|00000bf0| 6b 65 20 74 68 65 20 7b | 5c 74 74 20 74 69 6d 65 |ke the {|\tt time|
|00000c00| 7d 20 76 61 72 69 61 62 | 6c 65 2c 20 7b 5c 74 74 |} variab|le, {\tt|
|00000c10| 20 66 72 61 6d 65 7d 20 | 74 61 6b 65 73 20 6f 6e | frame} |takes on|
|00000c20| 0a 61 20 73 69 6e 67 6c | 65 20 76 61 6c 75 65 20 |.a singl|e value |
|00000c30| 66 6f 72 20 74 68 65 20 | 64 75 72 61 74 69 6f 6e |for the |duration|
|00000c40| 20 6f 66 20 65 61 63 68 | 20 66 72 61 6d 65 2e 20 | of each| frame. |
|00000c50| 20 54 68 75 73 2c 20 74 | 72 61 6e 73 66 6f 72 6d | Thus, t|ransform|
|00000c60| 73 0a 61 6e 69 6d 61 74 | 65 64 20 74 68 72 6f 75 |s.animat|ed throu|
|00000c70| 67 68 20 74 68 65 20 75 | 73 65 20 6f 66 20 74 68 |gh the u|se of th|
|00000c80| 65 20 7b 5c 74 74 20 66 | 72 61 6d 65 7d 20 76 61 |e {\tt f|rame} va|
|00000c90| 72 69 61 62 6c 65 20 77 | 69 6c 6c 20 6e 6f 74 20 |riable w|ill not |
|00000ca0| 65 78 68 69 62 69 74 0a | 6d 6f 74 69 6f 6e 20 62 |exhibit.|motion b|
|00000cb0| 6c 75 72 72 69 6e 67 2e | 0a 0a 41 6c 73 6f 20 73 |lurring.|..Also s|
|00000cc0| 75 70 70 6f 72 74 65 64 | 20 69 73 20 74 68 65 20 |upported| is the |
|00000cd0| 7b 5c 74 74 20 6c 69 6e | 65 61 72 7d 20 66 75 6e |{\tt lin|ear} fun|
|00000ce0| 63 74 69 6f 6e 2e 20 20 | 54 68 69 73 20 66 75 6e |ction. |This fun|
|00000cf0| 63 74 69 6f 6e 20 75 73 | 65 73 0a 7b 5c 74 74 20 |ction us|es.{\tt |
|00000d00| 74 69 6d 65 7d 20 69 6d | 70 6c 69 63 69 74 6c 79 |time} im|plicitly|
|00000d10| 20 74 6f 20 69 6e 74 65 | 72 70 6c 61 74 65 20 62 | to inte|rplate b|
|00000d20| 65 74 77 65 65 6e 20 74 | 77 6f 20 76 61 6c 75 65 |etween t|wo value|
|00000d30| 73 2e 0a 0a 5c 62 65 67 | 69 6e 7b 64 65 66 6b 65 |s...\beg|in{defke|
|00000d40| 79 7d 7b 6c 69 6e 65 61 | 72 7d 7b 7b 5c 74 74 20 |y}{linea|r}{{\tt |
|00000d50| 28 7d 20 7b 5c 65 6d 20 | 53 74 69 6d 65 2c 20 53 |(} {\em |Stime, S|
|00000d60| 76 61 6c 2c 20 45 74 69 | 6d 65 2c 20 45 76 61 6c |val, Eti|me, Eval|
|00000d70| 7d 20 7b 5c 74 74 20 29 | 7d 7d 0a 09 4c 69 6e 65 |} {\tt )|}}..Line|
|00000d80| 61 72 6c 79 20 69 6e 74 | 65 72 70 6f 6c 61 74 65 |arly int|erpolate|
|00000d90| 20 62 65 74 77 65 65 6e | 20 7b 5c 65 6d 20 53 76 | between| {\em Sv|
|00000da0| 61 6c 7d 20 61 74 20 74 | 69 6d 65 0a 09 7b 5c 65 |al} at t|ime..{\e|
|00000db0| 6d 20 53 74 69 6d 65 7d | 20 61 6e 64 20 7b 5c 65 |m Stime}| and {\e|
|00000dc0| 6d 20 45 76 61 6c 7d 20 | 61 74 20 74 69 6d 65 20 |m Eval} |at time |
|00000dd0| 7b 5c 65 6d 20 45 74 69 | 6d 65 7d 2e 0a 09 49 66 |{\em Eti|me}...If|
|00000de0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 74 69 6d | the cur|rent tim|
|00000df0| 65 20 69 73 20 6c 65 73 | 73 20 74 68 61 6e 20 7b |e is les|s than {|
|00000e00| 5c 65 6d 20 53 74 69 6d | 65 7d 2c 20 74 68 65 20 |\em Stim|e}, the |
|00000e10| 66 75 6e 63 74 69 6f 6e | 0a 09 72 65 74 75 72 6e |function|..return|
|00000e20| 73 20 7b 5c 65 6d 20 53 | 76 61 6c 7d 2e 20 20 49 |s {\em S|val}. I|
|00000e30| 66 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 74 69 |f the cu|rrent ti|
|00000e40| 6d 65 20 69 73 20 67 72 | 65 61 74 65 72 20 74 68 |me is gr|eater th|
|00000e50| 61 6e 0a 09 7b 5c 65 6d | 20 45 74 69 6d 65 7d 2c |an..{\em| Etime},|
|00000e60| 20 7b 5c 65 6d 20 45 76 | 61 6c 7d 20 69 73 20 72 | {\em Ev|al} is r|
|00000e70| 65 74 75 72 6e 65 64 2e | 0a 5c 65 6e 64 7b 64 65 |eturned.|.\end{de|
|00000e80| 66 6b 65 79 7d 0a 0a 54 | 68 65 20 66 6f 6c 6c 6f |fkey}..T|he follo|
|00000e90| 77 69 6e 67 20 65 78 61 | 6d 70 6c 65 20 73 68 6f |wing exa|mple sho|
|00000ea0| 77 73 20 74 68 65 20 75 | 73 65 20 6f 66 20 74 68 |ws the u|se of th|
|00000eb0| 65 20 7b 5c 74 74 20 74 | 69 6d 65 7d 20 76 61 72 |e {\tt t|ime} var|
|00000ec0| 69 61 62 6c 65 20 74 6f | 0a 61 6e 69 6d 61 74 65 |iable to|.animate|
|00000ed0| 20 61 20 73 70 68 65 72 | 65 20 62 79 20 74 72 61 | a spher|e by tra|
|00000ee0| 6e 73 6c 61 74 69 6e 67 | 20 69 74 20 64 6f 77 6e |nslating| it down|
|00000ef0| 77 61 72 64 73 20 6f 76 | 65 72 20 66 69 76 65 20 |wards ov|er five |
|00000f00| 66 72 61 6d 65 73 2e 0a | 4e 6f 74 65 20 74 68 65 |frames..|Note the|
|00000f10| 74 20 74 68 65 20 7b 5c | 74 74 20 73 68 75 74 74 |t the {\|tt shutt|
|00000f20| 65 72 7d 20 6b 65 79 77 | 6f 72 64 20 69 73 20 75 |er} keyw|ord is u|
|00000f30| 73 65 64 20 74 6f 20 73 | 65 74 20 74 68 65 20 73 |sed to s|et the s|
|00000f40| 68 75 74 74 65 72 20 64 | 75 72 61 74 69 6f 6e 0a |hutter d|uration.|
|00000f50| 69 6e 20 6f 72 64 65 72 | 20 74 6f 20 69 6e 64 75 |in order| to indu|
|00000f60| 63 65 20 6d 6f 74 69 6f | 6e 20 62 6c 75 72 72 69 |ce motio|n blurri|
|00000f70| 6e 67 2e 0a 0a 5c 62 65 | 67 69 6e 7b 76 65 72 62 |ng...\be|gin{verb|
|00000f80| 61 74 69 6d 7d 0a 20 20 | 20 20 66 72 61 6d 65 73 |atim}. | frames|
|00000f90| 20 35 0a 20 20 20 20 73 | 68 75 74 74 65 72 20 31 | 5. s|hutter 1|
|00000fa0| 0a 20 20 20 20 73 70 68 | 65 72 65 20 31 20 30 20 |. sph|ere 1 0 |
|00000fb0| 30 20 32 20 74 72 61 6e | 73 6c 61 74 65 20 30 20 |0 2 tran|slate 0 |
|00000fc0| 30 20 28 2d 74 69 6d 65 | 29 0a 5c 65 6e 64 7b 76 |0 (-time|).\end{v|
|00000fd0| 65 72 62 61 74 69 6d 7d | 0a 0a 46 75 72 74 68 65 |erbatim}|..Furthe|
|00000fe0| 72 20 65 78 61 6d 70 6c | 65 73 20 6f 66 20 61 6e |r exampl|es of an|
|00000ff0| 69 6d 61 74 69 6f 6e 20 | 6d 61 79 20 62 65 20 66 |imation |may be f|
|00001000| 6f 75 6e 64 20 69 6e 20 | 74 68 65 20 45 78 61 6d |ound in |the Exam|
|00001010| 70 6c 65 73 20 64 69 72 | 65 63 74 6f 72 79 0a 6f |ples dir|ectory.o|
|00001020| 66 20 74 68 65 20 7b 5c | 72 61 79 73 68 61 64 65 |f the {\|rayshade|
|00001030| 7d 20 64 69 73 74 72 69 | 62 75 74 69 6f 6e 2e 0a |} distri|bution..|
+--------+-------------------------+-------------------------+--------+--------+