home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / doc / guide / camera.tex < prev    next >
LaTeX Document  |  1994-08-09  |  7.4 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: camera.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 53 70 65 63 69 66 79 |\chapter|{Specify|
|00000010| 69 6e 67 20 61 20 56 69 | 65 77 7d 0a 0a 57 68 65 |ing a Vi|ew}..Whe|
|00000020| 6e 20 64 65 73 69 67 6e | 69 6e 67 20 61 20 7b 5c |n design|ing a {\|
|00000030| 72 61 79 73 68 61 64 65 | 7d 20 69 6e 70 75 74 20 |rayshade|} input |
|00000040| 66 69 6c 65 2c 20 74 68 | 65 72 65 20 61 72 65 20 |file, th|ere are |
|00000050| 74 77 6f 20 6d 61 69 6e | 0a 69 73 73 75 65 73 20 |two main|.issues |
|00000060| 74 68 61 74 20 6d 75 73 | 74 20 62 65 20 63 6f 6e |that mus|t be con|
|00000070| 73 69 64 65 72 65 64 2e | 20 20 54 68 65 20 66 69 |sidered.| The fi|
|00000080| 72 73 74 20 61 6e 64 20 | 6d 6f 72 65 20 63 6f 6d |rst and |more com|
|00000090| 70 6c 65 78 0a 69 73 20 | 74 68 65 20 73 65 6c 65 |plex.is |the sele|
|000000a0| 63 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 6f 62 6a |ction of| the obj|
|000000b0| 65 63 74 73 20 74 6f 20 | 62 65 20 72 65 6e 64 65 |ects to |be rende|
|000000c0| 72 65 64 20 61 6e 64 20 | 74 68 65 20 61 70 70 65 |red and |the appe|
|000000d0| 61 72 61 6e 63 65 73 0a | 74 68 65 79 20 73 68 6f |arances.|they sho|
|000000e0| 75 6c 64 20 62 65 20 61 | 73 73 69 67 6e 65 64 2e |uld be a|ssigned.|
|000000f0| 20 20 54 68 65 20 73 65 | 63 6f 6e 64 20 61 6e 64 | The se|cond and|
|00000100| 20 75 73 75 61 6c 6c 79 | 20 65 61 73 69 65 72 20 | usually| easier |
|00000110| 69 73 73 75 65 20 69 73 | 0a 74 68 65 20 63 68 6f |issue is|.the cho|
|00000120| 69 63 65 20 6f 66 20 76 | 69 65 77 69 6e 67 20 70 |ice of v|iewing p|
|00000130| 61 72 61 6d 65 74 65 72 | 73 2e 20 20 54 68 69 73 |arameter|s. This|
|00000140| 20 63 68 61 70 74 65 72 | 20 64 65 61 6c 73 20 77 | chapter| deals w|
|00000150| 69 74 68 20 74 68 65 0a | 6c 61 74 74 65 72 20 70 |ith the.|latter p|
|00000160| 72 6f 62 6c 65 6d 3b 20 | 74 68 65 20 6d 61 6a 6f |roblem; |the majo|
|00000170| 72 69 74 79 20 6f 66 20 | 74 68 65 20 66 6f 6c 6c |rity of |the foll|
|00000180| 6f 77 69 6e 67 20 63 68 | 61 70 74 65 72 73 0a 64 |owing ch|apters.d|
|00000190| 69 73 63 75 73 73 20 61 | 73 70 65 63 74 73 20 6f |iscuss a|spects o|
|000001a0| 66 20 6f 62 6a 65 63 74 | 73 20 61 6e 64 20 74 68 |f object|s and th|
|000001b0| 65 69 72 20 61 70 70 65 | 61 72 61 6e 63 65 73 2e |eir appe|arances.|
|000001c0| 0a 0a 7b 5c 52 61 79 73 | 68 61 64 65 7d 20 75 73 |..{\Rays|hade} us|
|000001d0| 65 73 20 61 20 63 61 6d | 65 72 61 20 6d 6f 64 65 |es a cam|era mode|
|000001e0| 6c 20 74 6f 20 64 65 73 | 63 72 69 62 65 0a 74 68 |l to des|cribe.th|
|000001f0| 65 20 67 65 6f 6d 65 74 | 72 69 63 20 72 65 6c 61 |e geomet|ric rela|
|00000200| 74 69 6f 6e 73 68 69 70 | 20 62 65 74 77 65 65 6e |tionship| between|
|00000210| 20 74 68 65 20 6f 62 6a | 65 63 74 73 20 74 6f 20 | the obj|ects to |
|00000220| 62 65 20 72 65 6e 64 65 | 72 65 64 0a 61 6e 64 20 |be rende|red.and |
|00000230| 74 68 65 20 69 6d 61 67 | 65 20 74 68 61 74 20 69 |the imag|e that i|
|00000240| 73 20 70 72 6f 64 75 63 | 65 64 2e 20 20 54 68 69 |s produc|ed. Thi|
|00000250| 73 20 72 65 6c 61 74 69 | 6f 6e 73 68 69 70 20 64 |s relati|onship d|
|00000260| 65 73 63 72 69 62 65 73 | 0a 61 20 70 65 72 73 70 |escribes|.a persp|
|00000270| 65 63 74 69 76 65 20 70 | 72 6f 6a 65 63 74 69 6f |ective p|rojectio|
|00000280| 6e 20 66 72 6f 6d 20 77 | 6f 72 6c 64 20 73 70 61 |n from w|orld spa|
|00000290| 63 65 20 6f 6e 74 6f 20 | 74 68 65 20 69 6d 61 67 |ce onto |the imag|
|000002a0| 65 20 70 6c 61 6e 65 2e | 0a 0a 54 68 65 20 67 65 |e plane.|..The ge|
|000002b0| 6f 6d 65 74 72 79 20 6f | 66 20 74 68 65 20 70 65 |ometry o|f the pe|
|000002c0| 72 73 70 65 63 74 69 76 | 65 20 70 72 6f 6a 65 63 |rspectiv|e projec|
|000002d0| 74 69 6f 6e 0a 6d 61 79 | 20 62 65 20 74 68 6f 75 |tion.may| be thou|
|000002e0| 67 68 74 20 6f 66 20 61 | 73 20 61 6e 0a 69 6e 66 |ght of a|s an.inf|
|000002f0| 69 6e 69 74 65 20 70 79 | 72 61 6d 69 64 2c 20 6b |inite py|ramid, k|
|00000300| 6e 6f 77 6e 20 61 73 20 | 74 68 65 20 76 69 65 77 |nown as |the view|
|00000310| 69 6e 67 20 7b 5c 65 6d | 20 66 72 75 73 74 75 6d |ing {\em| frustum|
|00000320| 7d 2e 0a 54 68 65 20 61 | 70 65 78 20 6f 66 20 74 |}..The a|pex of t|
|00000330| 68 65 20 66 72 75 73 74 | 75 6d 20 69 73 20 64 65 |he frust|um is de|
|00000340| 66 69 6e 65 64 20 62 79 | 20 74 68 65 20 63 61 6d |fined by| the cam|
|00000350| 65 72 61 27 73 20 70 6f | 73 69 74 69 6f 6e 2c 0a |era's po|sition,.|
|00000360| 61 6e 64 20 74 68 65 20 | 6d 61 69 6e 20 61 78 69 |and the |main axi|
|00000370| 73 20 6f 66 20 74 68 65 | 20 66 72 75 73 74 75 6d |s of the| frustum|
|00000380| 20 62 79 20 61 20 60 60 | 6c 6f 6f 6b 27 27 20 76 | by a ``|look'' v|
|00000390| 65 63 74 6f 72 2e 0a 54 | 68 65 20 66 6f 75 72 20 |ector..T|he four |
|000003a0| 73 69 64 65 73 20 6f 66 | 0a 74 68 65 20 70 79 72 |sides of|.the pyr|
|000003b0| 61 6d 69 64 20 61 72 65 | 20 64 69 66 66 65 72 65 |amid are| differe|
|000003c0| 6e 74 69 61 74 65 64 20 | 62 79 20 74 68 65 69 72 |ntiated |by their|
|000003d0| 20 72 65 6c 61 74 69 6f | 6e 73 68 69 70 20 74 6f | relatio|nship to|
|000003e0| 20 61 0a 72 65 66 65 72 | 65 6e 63 65 20 60 60 75 | a.refer|ence ``u|
|000003f0| 70 27 27 20 76 65 63 74 | 6f 72 20 66 72 6f 6d 20 |p'' vect|or from |
|00000400| 74 68 65 20 63 61 6d 65 | 72 61 27 73 20 70 6f 73 |the came|ra's pos|
|00000410| 69 74 69 6f 6e 2e 0a 0a | 54 68 65 20 69 6d 61 67 |ition...|The imag|
|00000420| 65 0a 75 6c 74 69 6d 61 | 74 65 6c 79 20 70 72 6f |e.ultima|tely pro|
|00000430| 64 75 63 65 64 20 62 79 | 20 7b 5c 72 61 79 73 68 |duced by| {\raysh|
|00000440| 61 64 65 7d 20 6d 61 79 | 20 74 68 65 6e 20 62 65 |ade} may| then be|
|00000450| 20 74 68 6f 75 67 68 74 | 20 6f 66 20 61 73 0a 74 | thought| of as.t|
|00000460| 68 65 20 70 72 6f 6a 65 | 63 74 69 6f 6e 20 6f 66 |he proje|ction of|
|00000470| 20 74 68 65 20 6f 62 6a | 65 63 74 73 20 63 6c 6f | the obj|ects clo|
|00000480| 73 65 73 74 20 74 6f 20 | 74 68 65 20 65 79 65 20 |sest to |the eye |
|00000490| 6f 6e 74 6f 0a 61 20 72 | 65 63 74 61 6e 67 75 6c |onto.a r|ectangul|
|000004a0| 61 72 20 73 63 72 65 65 | 6e 20 66 6f 72 6d 65 64 |ar scree|n formed|
|000004b0| 20 62 79 20 74 68 65 20 | 69 6e 74 65 72 73 65 63 | by the |intersec|
|000004c0| 74 69 6f 6e 20 6f 66 20 | 74 68 65 20 70 79 72 61 |tion of |the pyra|
|000004d0| 6d 69 64 20 77 69 74 68 | 0a 61 20 70 6c 61 6e 65 |mid with|.a plane|
|000004e0| 20 6f 72 74 68 6f 67 6f | 6e 61 6c 20 74 6f 20 74 | orthogo|nal to t|
|000004f0| 68 65 20 70 79 72 61 6d | 69 64 27 73 20 61 78 69 |he pyram|id's axi|
|00000500| 73 2e 20 20 54 68 65 20 | 6f 76 65 72 61 6c 6c 20 |s. The |overall |
|00000510| 73 68 61 70 65 0a 6f 66 | 20 74 68 65 20 66 72 75 |shape.of| the fru|
|00000520| 73 74 75 6d 20 28 74 68 | 65 20 6c 65 6e 67 74 68 |stum (th|e length|
|00000530| 73 20 6f 66 20 74 68 65 | 20 74 6f 70 20 61 6e 64 |s of the| top and|
|00000540| 20 62 6f 74 74 6f 6d 20 | 73 69 64 65 73 20 63 6f | bottom |sides co|
|00000550| 6d 70 61 72 65 64 0a 74 | 6f 20 6c 65 66 74 20 61 |mpared.t|o left a|
|00000560| 6e 64 20 72 69 67 68 74 | 29 0a 69 73 20 64 65 73 |nd right|).is des|
|00000570| 63 72 69 62 65 64 20 62 | 79 20 74 68 65 20 68 6f |cribed b|y the ho|
|00000580| 72 69 7a 6f 6e 74 61 6c | 20 61 6e 64 20 76 65 72 |rizontal| and ver|
|00000590| 74 69 63 61 6c 20 66 69 | 65 6c 64 73 0a 6f 66 20 |tical fi|elds.of |
|000005a0| 76 69 65 77 2e 0a 0a 5c | 73 65 63 74 69 6f 6e 7b |view...\|section{|
|000005b0| 43 61 6d 65 72 61 20 50 | 6f 73 69 74 69 6f 6e 7d |Camera P|osition}|
|000005c0| 0a 0a 54 68 65 20 74 68 | 72 65 65 20 62 61 73 69 |..The th|ree basi|
|000005d0| 63 20 63 61 6d 65 72 61 | 20 70 72 6f 70 65 72 74 |c camera| propert|
|000005e0| 69 65 73 20 61 72 65 20 | 69 74 73 20 70 6f 73 69 |ies are |its posi|
|000005f0| 74 69 6f 6e 2c 20 74 68 | 65 20 64 69 72 65 63 74 |tion, th|e direct|
|00000600| 69 6f 6e 0a 69 6e 20 77 | 68 69 63 68 20 69 74 20 |ion.in w|hich it |
|00000610| 69 73 20 70 6f 69 6e 74 | 69 6e 67 2c 20 61 6e 64 |is point|ing, and|
|00000620| 20 69 74 73 20 6f 72 69 | 65 6e 74 61 74 69 6f 6e | its ori|entation|
|00000630| 2e 20 20 54 68 65 20 6b | 65 79 77 6f 72 64 73 20 |. The k|eywords |
|00000640| 66 6f 72 0a 73 70 65 63 | 69 66 79 69 6e 67 20 74 |for.spec|ifying t|
|00000650| 68 65 73 65 20 76 61 6c | 75 65 73 20 61 72 65 20 |hese val|ues are |
|00000660| 64 65 73 63 72 69 62 65 | 64 20 62 65 6c 6f 77 2e |describe|d below.|
|00000670| 0a 54 68 65 20 64 65 66 | 61 75 6c 74 20 76 61 6c |.The def|ault val|
|00000680| 75 65 73 0a 61 72 65 20 | 64 65 73 69 67 6e 65 64 |ues.are |designed|
|00000690| 20 74 6f 20 70 72 6f 76 | 69 64 65 20 61 20 72 65 | to prov|ide a re|
|000006a0| 61 73 6f 6e 61 62 6c 65 | 20 76 69 65 77 20 6f 66 |asonable| view of|
|000006b0| 20 61 20 73 70 68 65 72 | 65 20 6f 66 20 72 61 64 | a spher|e of rad|
|000006c0| 69 75 73 20 32 0a 6c 6f | 63 61 74 65 64 20 61 74 |ius 2.lo|cated at|
|000006d0| 20 6f 72 69 67 69 6e 2e | 20 20 49 66 20 74 68 65 | origin.| If the|
|000006e0| 73 65 20 64 65 66 61 75 | 6c 74 20 76 61 6c 75 65 |se defau|lt value|
|000006f0| 73 20 61 72 65 20 75 73 | 65 64 2c 0a 74 68 65 20 |s are us|ed,.the |
|00000700| 6f 72 69 67 69 6e 20 69 | 73 20 70 72 6f 6a 65 63 |origin i|s projec|
|00000710| 74 65 64 20 6f 6e 74 6f | 20 74 68 65 20 63 65 6e |ted onto| the cen|
|00000720| 74 65 72 20 6f 66 20 74 | 68 65 20 69 6d 61 67 65 |ter of t|he image|
|00000730| 20 70 6c 61 6e 65 2c 20 | 77 69 74 68 0a 74 68 65 | plane, |with.the|
|00000740| 20 77 6f 72 6c 64 20 24 | 78 24 20 61 78 69 73 20 | world $|x$ axis |
|00000750| 20 72 75 6e 6e 69 6e 67 | 20 6c 65 66 74 2d 74 6f | running| left-to|
|00000760| 2d 72 69 67 68 74 2c 20 | 74 68 65 20 24 7a 24 20 |-right, |the $z$ |
|00000770| 61 78 69 73 20 62 6f 74 | 74 6f 6d 2d 74 6f 2d 74 |axis bot|tom-to-t|
|00000780| 6f 70 2c 0a 61 6e 64 20 | 74 68 65 20 24 79 24 20 |op,.and |the $y$ |
|00000790| 61 78 69 73 20 67 6f 69 | 6e 67 20 60 60 69 6e 74 |axis goi|ng ``int|
|000007a0| 6f 27 27 20 74 68 65 20 | 73 63 72 65 65 6e 2e 0a |o'' the |screen..|
|000007b0| 0a 5c 62 65 67 69 6e 7b | 64 65 66 6b 65 79 7d 7b |.\begin{|defkey}{|
|000007c0| 65 79 65 70 7d 7b 5c 65 | 76 65 63 7b 70 6f 73 7d |eyep}{\e|vec{pos}|
|000007d0| 7d 0a 09 50 6c 61 63 65 | 20 74 68 65 20 76 69 72 |}..Place| the vir|
|000007e0| 74 75 61 6c 20 63 61 6d | 65 72 61 20 61 74 20 74 |tual cam|era at t|
|000007f0| 68 65 20 67 69 76 65 6e | 20 70 6f 73 69 74 69 6f |he given| positio|
|00000800| 6e 2e 0a 5c 65 6e 64 7b | 64 65 66 6b 65 79 7d 0a |n..\end{|defkey}.|
|00000810| 54 68 65 20 64 65 66 61 | 75 6c 74 20 63 61 6d 65 |The defa|ult came|
|00000820| 72 61 20 70 6f 73 69 74 | 69 6f 6e 20 69 73 20 28 |ra posit|ion is (|
|00000830| 30 2c 20 2d 38 2c 20 30 | 29 2e 0a 0a 5c 62 65 67 |0, -8, 0|)...\beg|
|00000840| 69 6e 7b 64 65 66 6b 65 | 79 7d 7b 6c 6f 6f 6b 70 |in{defke|y}{lookp|
|00000850| 7d 7b 5c 65 76 65 63 7b | 70 6f 73 7d 7d 0a 09 50 |}{\evec{|pos}}..P|
|00000860| 6f 69 6e 74 20 74 68 65 | 20 76 69 72 74 75 61 6c |oint the| virtual|
|00000870| 20 63 61 6d 65 72 61 20 | 74 6f 77 61 72 64 20 74 | camera |toward t|
|00000880| 68 65 20 67 69 76 65 6e | 20 70 6f 73 69 74 69 6f |he given| positio|
|00000890| 6e 2e 0a 5c 65 6e 64 7b | 64 65 66 6b 65 79 7d 0a |n..\end{|defkey}.|
|000008a0| 54 68 65 20 64 65 66 61 | 75 6c 74 20 6c 6f 6f 6b |The defa|ult look|
|000008b0| 20 70 6f 69 6e 74 20 69 | 73 20 74 68 65 20 6f 72 | point i|s the or|
|000008c0| 69 67 69 6e 20 28 30 2c | 20 30 2c 20 30 29 2e 20 |igin (0,| 0, 0). |
|000008d0| 20 54 68 65 20 6c 6f 6f | 6b 20 70 6f 69 6e 74 0a | The loo|k point.|
|000008e0| 61 6e 64 20 63 61 6d 65 | 72 61 20 70 6f 73 69 74 |and came|ra posit|
|000008f0| 69 6f 6e 20 6d 75 73 74 | 20 6e 6f 74 20 62 65 20 |ion must| not be |
|00000900| 63 6f 69 6e 63 69 64 65 | 6e 74 2e 0a 0a 5c 62 65 |coincide|nt...\be|
|00000910| 67 69 6e 7b 64 65 66 6b | 65 79 7d 7b 75 70 7d 7b |gin{defk|ey}{up}{|
|00000920| 5c 65 76 65 63 7b 64 69 | 72 65 63 74 69 6f 6e 7d |\evec{di|rection}|
|00000930| 7d 0a 09 54 68 65 20 60 | 60 75 70 27 27 20 76 65 |}..The `|`up'' ve|
|00000940| 63 74 6f 72 20 66 72 6f | 6d 20 74 68 65 20 63 61 |ctor fro|m the ca|
|00000950| 6d 65 72 61 20 70 6f 69 | 6e 74 20 69 73 20 73 65 |mera poi|nt is se|
|00000960| 74 20 74 6f 20 74 68 65 | 0a 09 67 69 76 65 6e 20 |t to the|..given |
|00000970| 64 69 72 65 63 74 69 6f | 6e 2e 0a 5c 65 6e 64 7b |directio|n..\end{|
|00000980| 64 65 66 6b 65 79 7d 0a | 54 68 69 73 20 75 70 20 |defkey}.|This up |
|00000990| 76 65 63 74 6f 72 20 6e | 65 65 64 20 6e 6f 74 20 |vector n|eed not |
|000009a0| 62 65 20 6f 72 74 68 6f | 67 6f 6e 61 6c 20 74 6f |be ortho|gonal to|
|000009b0| 0a 74 68 65 20 76 69 65 | 77 20 76 65 63 74 6f 72 |.the vie|w vector|
|000009c0| 2c 20 6e 6f 72 20 6e 65 | 65 64 20 69 74 20 62 65 |, nor ne|ed it be|
|000009d0| 20 6e 6f 72 6d 61 6c 69 | 7a 65 64 2e 20 20 54 68 | normali|zed. Th|
|000009e0| 65 20 64 65 66 61 75 6c | 74 20 75 70 0a 64 69 72 |e defaul|t up.dir|
|000009f0| 65 63 74 69 6f 6e 20 69 | 73 20 28 30 2c 20 30 2c |ection i|s (0, 0,|
|00000a00| 20 31 29 2e 0a 0a 41 6e | 6f 74 68 65 72 20 70 6f | 1)...An|other po|
|00000a10| 70 75 6c 61 72 20 73 74 | 61 6e 64 61 72 64 20 76 |pular st|andard v|
|00000a20| 69 65 77 69 6e 67 20 67 | 65 6f 6d 65 74 72 79 2c |iewing g|eometry,|
|00000a30| 20 77 69 74 68 20 74 68 | 65 20 24 78 24 20 61 78 | with th|e $x$ ax|
|00000a40| 69 73 20 72 75 6e 6e 69 | 6e 67 0a 6c 65 66 74 2d |is runni|ng.left-|
|00000a50| 74 6f 2d 72 69 67 68 74 | 2c 0a 74 68 65 20 24 79 |to-right|,.the $y|
|00000a60| 24 20 61 78 69 73 20 62 | 6f 74 74 6f 6d 2d 74 6f |$ axis b|ottom-to|
|00000a70| 2d 74 6f 70 2c 20 61 6e | 64 20 74 68 65 20 24 7a |-top, an|d the $z|
|00000a80| 24 20 61 78 69 73 20 70 | 6f 69 6e 74 69 6e 67 20 |$ axis p|ointing |
|00000a90| 6f 75 74 20 6f 66 20 74 | 68 65 20 73 63 72 65 65 |out of t|he scree|
|00000aa0| 6e 2c 0a 6d 61 79 20 62 | 65 20 6f 62 74 61 69 6e |n,.may b|e obtain|
|00000ab0| 65 64 20 62 79 20 73 65 | 74 74 69 6e 67 20 74 68 |ed by se|tting th|
|00000ac0| 65 20 75 70 20 76 65 63 | 74 6f 72 20 74 6f 20 28 |e up vec|tor to (|
|00000ad0| 30 2c 20 31 2c 20 30 29 | 20 61 6e 64 20 62 79 20 |0, 1, 0)| and by |
|00000ae0| 70 6c 61 63 69 6e 67 0a | 74 68 65 20 63 61 6d 65 |placing.|the came|
|00000af0| 72 61 20 6f 6e 20 74 68 | 65 20 70 6f 73 69 74 69 |ra on th|e positi|
|00000b00| 76 65 20 24 7a 24 20 61 | 78 69 73 2e 0a 0a 5c 73 |ve $z$ a|xis...\s|
|00000b10| 65 63 74 69 6f 6e 7b 46 | 69 65 6c 64 20 6f 66 20 |ection{F|ield of |
|00000b20| 56 69 65 77 7d 0a 0a 41 | 6e 6f 74 68 65 72 20 69 |View}..A|nother i|
|00000b30| 6d 70 6f 72 74 61 6e 74 | 20 63 68 6f 69 63 65 20 |mportant| choice |
|00000b40| 74 6f 20 62 65 20 6d 61 | 64 65 20 69 73 20 74 68 |to be ma|de is th|
|00000b50| 61 74 20 6f 66 20 74 68 | 65 20 0a 66 69 65 6c 64 |at of th|e .field|
|00000b60| 20 6f 66 20 76 69 65 77 | 20 6f 66 20 74 68 65 20 | of view| of the |
|00000b70| 63 61 6d 65 72 61 2e 20 | 20 54 68 65 20 73 69 7a |camera. | The siz|
|00000b80| 65 20 6f 66 20 74 68 69 | 73 20 66 69 65 6c 64 20 |e of thi|s field |
|00000b90| 64 65 73 63 72 69 62 65 | 73 0a 74 68 65 20 61 6e |describe|s.the an|
|00000ba0| 67 6c 65 73 20 62 65 74 | 77 65 65 6e 20 74 68 65 |gles bet|ween the|
|00000bb0| 20 6c 65 66 74 20 61 6e | 64 20 72 69 67 68 74 20 | left an|d right |
|00000bc0| 73 69 64 65 73 20 61 6e | 64 20 74 6f 70 20 61 6e |sides an|d top an|
|00000bd0| 64 20 62 6f 74 74 6f 6d | 20 73 69 64 65 73 0a 6f |d bottom| sides.o|
|00000be0| 66 20 74 68 65 20 66 72 | 75 73 74 75 6d 2e 0a 0a |f the fr|ustum...|
|00000bf0| 5c 62 65 67 69 6e 7b 64 | 65 66 6b 65 79 7d 7b 66 |\begin{d|efkey}{f|
|00000c00| 6f 76 7d 7b 7b 5c 65 6d | 20 68 66 6f 76 7d 20 5b |ov}{{\em| hfov} [|
|00000c10| 7b 5c 65 6d 20 76 66 6f | 76 7d 5d 7d 0a 09 53 70 |{\em vfo|v}]}..Sp|
|00000c20| 65 63 69 66 79 0a 09 74 | 68 65 20 68 6f 72 69 7a |ecify..t|he horiz|
|00000c30| 6f 6e 74 61 6c 20 61 6e | 64 20 76 65 72 74 69 63 |ontal an|d vertic|
|00000c40| 61 6c 20 66 69 65 6c 64 | 20 6f 66 20 76 69 65 77 |al field| of view|
|00000c50| 2c 20 69 6e 20 64 65 67 | 72 65 65 73 2e 0a 5c 65 |, in deg|rees..\e|
|00000c60| 6e 64 7b 64 65 66 6b 65 | 79 7d 0a 54 68 65 20 64 |nd{defke|y}.The d|
|00000c70| 65 66 61 75 6c 74 20 68 | 6f 72 69 7a 6f 6e 74 61 |efault h|orizonta|
|00000c80| 6c 20 66 69 65 6c 64 20 | 6f 66 20 76 69 65 77 20 |l field |of view |
|00000c90| 69 73 20 34 35 20 64 65 | 67 72 65 65 73 2e 0a 49 |is 45 de|grees..I|
|00000ca0| 66 20 7b 5c 65 6d 20 76 | 66 6f 76 7d 20 69 73 20 |f {\em v|fov} is |
|00000cb0| 6f 6d 69 74 74 65 64 2c | 20 61 73 20 69 73 20 74 |omitted,| as is t|
|00000cc0| 68 65 20 67 65 6e 65 72 | 61 6c 20 70 72 61 63 74 |he gener|al pract|
|00000cd0| 69 63 65 2c 0a 74 68 65 | 20 76 65 72 74 69 63 61 |ice,.the| vertica|
|00000ce0| 6c 20 66 69 65 6c 64 20 | 6f 66 20 76 69 65 77 20 |l field |of view |
|00000cf0| 69 73 20 63 6f 6d 70 75 | 74 65 64 20 75 73 69 6e |is compu|ted usin|
|00000d00| 67 20 74 68 65 20 68 6f | 72 69 7a 6f 6e 74 61 6c |g the ho|rizontal|
|00000d10| 0a 66 69 65 6c 64 20 6f | 66 20 76 69 65 77 2c 20 |.field o|f view, |
|00000d20| 74 68 65 20 6f 75 74 70 | 75 74 20 69 6d 61 67 65 |the outp|ut image|
|00000d30| 20 72 65 73 6f 6c 75 74 | 69 6f 6e 2c 20 61 6e 64 | resolut|ion, and|
|00000d40| 20 74 68 65 20 61 73 73 | 75 6d 70 74 69 6f 6e 0a | the ass|umption.|
|00000d50| 74 68 61 74 20 61 20 70 | 69 78 65 6c 20 73 61 6d |that a p|ixel sam|
|00000d60| 70 6c 65 73 20 61 20 73 | 71 75 61 72 65 20 61 72 |ples a s|quare ar|
|00000d70| 65 61 2e 20 20 54 68 75 | 73 2c 0a 74 68 65 20 76 |ea. Thu|s,.the v|
|00000d80| 61 6c 75 65 73 20 70 61 | 73 73 65 64 20 76 69 61 |alues pa|ssed via|
|00000d90| 20 74 68 65 0a 7b 5c 74 | 74 20 73 63 72 65 65 6e | the.{\t|t screen|
|00000da0| 7d 20 6b 65 79 77 6f 72 | 64 20 64 65 66 69 6e 65 |} keywor|d define|
|00000db0| 20 74 68 65 20 73 68 61 | 70 65 20 6f 66 20 74 68 | the sha|pe of th|
|00000dc0| 65 20 66 69 6e 61 6c 20 | 69 6d 61 67 65 2e 0a 49 |e final |image..I|
|00000dd0| 66 20 79 6f 75 20 61 72 | 65 0a 64 69 73 70 6c 61 |f you ar|e.displa|
|00000de0| 79 69 6e 67 20 6f 6e 20 | 61 20 6e 6f 6e 2d 73 71 |ying on |a non-sq|
|00000df0| 75 61 72 65 20 70 69 78 | 65 6c 65 64 20 64 65 76 |uare pix|eled dev|
|00000e00| 69 63 65 2c 0a 79 6f 75 | 20 6d 75 73 74 20 73 65 |ice,.you| must se|
|00000e10| 74 20 74 68 65 20 76 65 | 72 74 69 63 61 6c 20 66 |t the ve|rtical f|
|00000e20| 69 65 6c 64 20 6f 66 20 | 76 69 65 77 0a 74 6f 20 |ield of |view.to |
|00000e30| 63 6f 6d 70 65 6e 73 61 | 74 65 20 66 6f 72 20 74 |compensa|te for t|
|00000e40| 68 65 20 60 60 73 71 75 | 61 73 68 69 6e 67 27 27 |he ``squ|ashing''|
|00000e50| 20 74 68 61 74 20 77 69 | 6c 6c 20 72 65 73 75 6c | that wi|ll resul|
|00000e60| 74 2e 0a 0a 5c 73 65 63 | 74 69 6f 6e 7b 44 65 70 |t...\sec|tion{Dep|
|00000e70| 74 68 20 6f 66 20 46 69 | 65 6c 64 7d 0a 0a 55 6e |th of Fi|eld}..Un|
|00000e80| 64 65 72 20 6d 61 6e 79 | 20 63 69 72 63 75 6d 73 |der many| circums|
|00000e90| 74 61 6e 63 65 73 2c 0a | 69 74 20 69 73 20 64 65 |tances,.|it is de|
|00000ea0| 73 69 72 61 62 6c 65 20 | 74 6f 20 72 65 6e 64 65 |sirable |to rende|
|00000eb0| 72 0a 6f 62 6a 65 63 74 | 73 20 69 6e 20 74 68 65 |r.object|s in the|
|00000ec0| 20 69 6d 61 67 65 20 73 | 75 63 68 20 74 68 61 74 | image s|uch that|
|00000ed0| 20 74 68 65 79 20 61 72 | 65 20 69 6e 20 73 68 61 | they ar|e in sha|
|00000ee0| 72 70 0a 66 6f 63 75 73 | 20 6f 6e 20 74 68 65 20 |rp.focus| on the |
|00000ef0| 69 6d 61 67 65 20 70 6c | 61 6e 65 2e 20 20 54 68 |image pl|ane. Th|
|00000f00| 69 73 20 69 73 20 61 63 | 68 69 65 76 65 64 20 62 |is is ac|hieved b|
|00000f10| 79 20 75 73 69 6e 67 20 | 74 68 65 20 64 65 66 61 |y using |the defa|
|00000f20| 75 6c 74 0a 60 60 70 69 | 6e 68 6f 6c 65 27 20 63 |ult.``pi|nhole' c|
|00000f30| 61 6d 65 72 61 2e 20 20 | 49 6e 20 74 68 69 73 20 |amera. |In this |
|00000f40| 6d 6f 64 65 2c 20 74 68 | 65 20 63 61 6d 65 72 61 |mode, th|e camera|
|00000f50| 27 73 20 61 70 65 72 74 | 75 72 65 20 69 73 20 61 |'s apert|ure is a|
|00000f60| 20 73 69 6e 67 6c 65 0a | 70 6f 69 6e 74 2c 20 61 | single.|point, a|
|00000f70| 6e 64 20 61 6c 6c 20 6c | 69 67 68 74 20 72 61 79 |nd all l|ight ray|
|00000f80| 73 20 61 72 65 20 66 6f | 63 75 73 65 64 20 6f 6e |s are fo|cused on|
|00000f90| 20 74 68 65 20 69 6d 61 | 67 65 20 70 6c 61 6e 65 | the ima|ge plane|
|00000fa0| 2e 0a 0a 41 6c 74 65 72 | 6e 61 74 69 76 65 6c 79 |...Alter|natively|
|00000fb0| 2c 20 6f 6e 65 20 6d 61 | 79 20 77 69 64 65 6e 20 |, one ma|y widen |
|00000fc0| 74 68 65 20 61 70 65 72 | 74 75 72 65 20 69 6e 20 |the aper|ture in |
|00000fd0| 6f 72 64 65 72 20 74 6f | 0a 73 69 6d 75 6c 61 74 |order to|.simulat|
|00000fe0| 65 20 64 65 70 74 68 20 | 6f 66 20 66 69 65 6c 64 |e depth |of field|
|00000ff0| 2e 20 49 6e 20 74 68 69 | 73 20 63 61 73 65 2c 20 |. In thi|s case, |
|00001000| 72 61 79 73 20 61 72 65 | 20 63 61 73 74 20 66 72 |rays are| cast fr|
|00001010| 6f 6d 20 76 61 72 69 6f | 75 73 20 70 6c 61 63 65 |om vario|us place|
|00001020| 73 20 6f 6e 0a 74 68 65 | 20 61 70 65 72 74 75 72 |s on.the| apertur|
|00001030| 65 20 64 69 73 6b 20 74 | 6f 77 61 72 64 73 20 61 |e disk t|owards a|
|00001040| 20 70 6f 69 6e 74 20 77 | 68 6f 73 65 20 64 69 73 | point w|hose dis|
|00001050| 74 61 6e 63 65 20 66 72 | 6f 6d 20 74 68 65 0a 63 |tance fr|om the.c|
|00001060| 61 6d 65 72 61 20 69 73 | 20 65 71 75 61 6c 20 74 |amera is| equal t|
|00001070| 6f 20 74 68 65 0a 7b 5c | 65 6d 20 66 6f 63 75 73 |o the.{\|em focus|
|00001080| 20 64 69 73 74 61 6e 63 | 65 7d 2e 20 20 4f 62 6a | distanc|e}. Obj|
|00001090| 65 63 74 73 20 74 68 61 | 74 20 6c 61 79 20 69 6e |ects tha|t lay in|
|000010a0| 20 74 68 65 20 66 6f 63 | 61 6c 20 70 6c 61 6e 65 | the foc|al plane|
|000010b0| 20 77 69 6c 6c 20 62 65 | 0a 69 6e 20 73 68 61 72 | will be|.in shar|
|000010c0| 70 20 66 6f 63 75 73 2e | 20 20 54 68 65 20 66 61 |p focus.| The fa|
|000010d0| 72 74 68 65 72 20 61 6e | 20 6f 62 6a 65 63 74 20 |rther an| object |
|000010e0| 69 73 20 66 72 6f 6d 20 | 74 68 65 20 69 6d 61 67 |is from |the imag|
|000010f0| 65 20 70 6c 61 6e 65 2c | 0a 74 68 65 20 6d 6f 72 |e plane,|.the mor|
|00001100| 65 20 6f 75 74 2d 6f 66 | 2d 66 6f 63 75 73 20 69 |e out-of|-focus i|
|00001110| 74 20 77 69 6c 6c 20 61 | 70 70 65 61 72 20 74 6f |t will a|ppear to|
|00001120| 20 62 65 2e 0a 41 20 77 | 69 64 65 72 20 61 70 65 | be..A w|ider ape|
|00001130| 72 74 75 72 65 20 77 69 | 6c 6c 20 6c 65 61 64 20 |rture wi|ll lead |
|00001140| 74 6f 20 61 20 67 72 65 | 61 74 65 72 20 62 6c 75 |to a gre|ater blu|
|00001150| 72 72 69 6e 67 20 6f 66 | 0a 6f 62 6a 65 63 74 73 |rring of|.objects|
|00001160| 20 74 68 61 74 20 64 6f | 20 6e 6f 74 20 6c 61 79 | that do| not lay|
|00001170| 20 69 6e 20 74 68 65 20 | 66 6f 63 61 6c 20 70 6c | in the |focal pl|
|00001180| 61 6e 65 2e 0a 57 68 65 | 6e 20 75 73 69 6e 67 20 |ane..Whe|n using |
|00001190| 61 20 6e 6f 6e 2d 7a 65 | 72 6f 20 61 70 65 72 74 |a non-ze|ro apert|
|000011a0| 75 72 65 20 72 61 64 69 | 75 73 2c 20 69 74 20 69 |ure radi|us, it i|
|000011b0| 73 20 62 65 73 74 20 74 | 6f 20 75 73 65 20 6a 69 |s best t|o use ji|
|000011c0| 74 74 65 72 65 64 0a 73 | 61 6d 70 6c 69 6e 67 20 |ttered.s|ampling |
|000011d0| 69 6e 20 6f 72 64 65 72 | 20 74 6f 20 72 65 64 75 |in order| to redu|
|000011e0| 63 65 20 61 6c 69 61 73 | 69 6e 67 2e 0a 0a 5c 62 |ce alias|ing...\b|
|000011f0| 65 67 69 6e 7b 64 65 66 | 6b 65 79 7d 7b 61 70 65 |egin{def|key}{ape|
|00001200| 72 74 75 72 65 7d 7b 7b | 5c 65 6d 20 72 61 64 69 |rture}{{|\em radi|
|00001210| 75 73 7d 7d 0a 09 55 73 | 65 20 61 6e 20 61 70 65 |us}}..Us|e an ape|
|00001220| 72 74 75 72 65 20 77 69 | 74 68 20 74 68 65 20 67 |rture wi|th the g|
|00001230| 69 76 65 6e 20 7b 5c 65 | 6d 20 72 61 64 69 75 73 |iven {\e|m radius|
|00001240| 7d 2e 0a 5c 65 6e 64 7b | 64 65 66 6b 65 79 7d 0a |}..\end{|defkey}.|
|00001250| 54 68 65 20 64 65 66 61 | 75 6c 74 20 72 61 64 69 |The defa|ult radi|
|00001260| 75 73 20 69 73 20 7a 65 | 72 6f 2c 20 72 65 73 75 |us is ze|ro, resu|
|00001270| 6c 74 69 6e 67 20 69 6e | 20 61 20 70 69 6e 68 6f |lting in| a pinho|
|00001280| 6c 65 20 63 61 6d 65 72 | 61 20 6d 6f 64 65 6c 2e |le camer|a model.|
|00001290| 0a 0a 5c 62 65 67 69 6e | 7b 64 65 66 6b 65 79 7d |..\begin|{defkey}|
|000012a0| 7b 66 6f 63 61 6c 64 69 | 73 74 7d 7b 7b 5c 65 6d |{focaldi|st}{{\em|
|000012b0| 20 64 69 73 74 61 6e 63 | 65 7d 7d 0a 09 53 65 74 | distanc|e}}..Set|
|000012c0| 20 74 68 65 20 66 6f 63 | 61 6c 20 70 6c 61 6e 65 | the foc|al plane|
|000012d0| 20 74 6f 20 62 65 20 7b | 5c 65 6d 20 64 69 73 74 | to be {|\em dist|
|000012e0| 61 6e 63 65 7d 20 75 6e | 69 74 73 20 66 72 6f 6d |ance} un|its from|
|000012f0| 20 74 68 65 20 63 61 6d | 65 72 61 2e 0a 5c 65 6e | the cam|era..\en|
|00001300| 64 7b 64 65 66 6b 65 79 | 7d 0a 42 79 20 64 65 66 |d{defkey|}.By def|
|00001310| 61 75 6c 74 2c 20 74 68 | 65 20 66 6f 63 61 6c 20 |ault, th|e focal |
|00001320| 64 69 73 74 61 6e 63 65 | 20 69 73 20 65 71 75 61 |distance| is equa|
|00001330| 6c 20 74 6f 20 74 68 65 | 20 64 69 73 74 61 6e 63 |l to the| distanc|
|00001340| 65 20 66 72 6f 6d 20 74 | 68 65 0a 63 61 6d 65 72 |e from t|he.camer|
|00001350| 61 20 74 6f 20 74 68 65 | 20 6c 6f 6f 6b 20 70 6f |a to the| look po|
|00001360| 69 6e 74 2e 0a 0a 5c 73 | 65 63 74 69 6f 6e 7b 53 |int...\s|ection{S|
|00001370| 74 65 72 65 6f 20 52 65 | 6e 64 65 72 69 6e 67 7d |tereo Re|ndering}|
|00001380| 0a 0a 50 72 6f 64 75 63 | 69 6e 67 20 61 20 73 74 |..Produc|ing a st|
|00001390| 65 72 65 6f 20 70 61 69 | 72 20 69 73 20 61 20 72 |ereo pai|r is a r|
|000013a0| 65 6c 61 74 69 76 65 6c | 79 20 73 69 6d 70 6c 65 |elativel|y simple|
|000013b0| 20 70 72 6f 63 65 73 73 | 3b 20 72 61 74 68 65 72 | process|; rather|
|000013c0| 20 74 68 61 6e 0a 73 69 | 6d 70 6c 79 20 72 65 6e | than.si|mply ren|
|000013d0| 64 65 72 69 6e 67 20 61 | 20 73 69 6e 67 6c 65 20 |dering a| single |
|000013e0| 69 6d 61 67 65 2c 20 6f | 6e 65 20 63 72 65 61 74 |image, o|ne creat|
|000013f0| 65 73 20 74 77 6f 20 72 | 65 6c 61 74 65 64 20 69 |es two r|elated i|
|00001400| 6d 61 67 65 73 20 77 68 | 69 63 68 0a 6d 61 79 20 |mages wh|ich.may |
|00001410| 74 68 65 6e 20 62 65 20 | 76 69 65 77 65 64 20 6f |then be |viewed o|
|00001420| 6e 20 61 20 73 74 65 72 | 65 6f 20 6d 6f 6e 69 74 |n a ster|eo monit|
|00001430| 6f 72 2c 20 69 6e 20 61 | 20 73 74 65 72 65 6f 20 |or, in a| stereo |
|00001440| 73 6c 69 64 65 20 76 69 | 65 77 65 72 2c 20 6f 72 |slide vi|ewer, or|
|00001450| 0a 62 79 20 75 73 69 6e | 67 20 63 6f 6c 6f 72 65 |.by usin|g colore|
|00001460| 64 20 67 6c 61 73 73 65 | 73 20 61 6e 64 20 61 6e |d glasse|s and an|
|00001470| 20 61 70 70 72 6f 70 72 | 69 61 74 65 20 64 69 73 | appropr|iate dis|
|00001480| 70 6c 61 79 20 66 69 6c | 74 65 72 2e 0a 0a 7b 5c |play fil|ter...{\|
|00001490| 52 61 79 73 68 61 64 65 | 7d 20 66 61 63 69 6c 69 |Rayshade|} facili|
|000014a0| 74 61 74 65 73 20 74 68 | 65 20 72 65 6e 64 65 72 |tates th|e render|
|000014b0| 69 6e 67 20 6f 66 20 73 | 74 65 72 65 6f 20 70 61 |ing of s|tereo pa|
|000014c0| 69 72 73 20 62 79 20 61 | 6c 6c 6f 77 69 6e 67 20 |irs by a|llowing |
|000014d0| 79 6f 75 0a 74 6f 20 73 | 70 65 63 69 66 79 20 74 |you.to s|pecify t|
|000014e0| 68 65 20 64 69 73 74 61 | 6e 63 65 20 62 65 74 77 |he dista|nce betw|
|000014f0| 65 65 6e 20 74 68 65 20 | 63 61 6d 65 72 61 20 70 |een the |camera p|
|00001500| 6f 73 69 74 69 6f 6e 73 | 20 75 73 65 64 20 69 6e |ositions| used in|
|00001510| 0a 63 72 65 61 74 69 6e | 67 20 74 68 65 20 74 77 |.creatin|g the tw|
|00001520| 6f 20 69 6d 61 67 65 73 | 2e 20 20 54 68 65 20 63 |o images|. The c|
|00001530| 61 6d 65 72 61 20 70 6f | 73 69 74 69 6f 6e 20 67 |amera po|sition g|
|00001540| 69 76 65 6e 20 69 6e 20 | 74 68 65 0a 7b 5c 72 61 |iven in |the.{\ra|
|00001550| 79 73 68 61 64 65 7d 20 | 69 6e 70 75 74 20 66 69 |yshade} |input fi|
|00001560| 6c 65 0a 64 65 66 69 6e | 65 73 0a 74 68 65 20 6d |le.defin|es.the m|
|00001570| 69 64 70 6f 69 6e 74 20 | 62 65 74 77 65 65 6e 20 |idpoint |between |
|00001580| 74 68 65 20 74 77 6f 20 | 63 61 6d 65 72 61 20 70 |the two |camera p|
|00001590| 6f 73 69 74 69 6f 6e 73 | 20 75 73 65 64 20 74 6f |ositions| used to|
|000015a0| 20 67 65 6e 65 72 61 74 | 65 20 74 68 65 0a 69 6d | generat|e the.im|
|000015b0| 61 67 65 73 2e 0a 47 65 | 6e 65 72 61 6c 6c 79 2c |ages..Ge|nerally,|
|000015c0| 20 74 68 65 20 72 65 6d | 61 69 6e 64 65 72 20 6f | the rem|ainder o|
|000015d0| 66 20 74 68 65 20 76 69 | 65 77 69 6e 67 20 70 61 |f the vi|ewing pa|
|000015e0| 72 61 6d 65 74 65 72 73 | 20 61 72 65 20 6b 65 70 |rameters| are kep|
|000015f0| 74 20 63 6f 6e 73 74 61 | 6e 74 2e 0a 0a 5c 62 65 |t consta|nt...\be|
|00001600| 67 69 6e 7b 64 65 66 6b | 65 79 7d 7b 65 79 65 73 |gin{defk|ey}{eyes|
|00001610| 65 70 7d 7b 7b 5c 65 6d | 20 73 65 70 61 72 61 74 |ep}{{\em| separat|
|00001620| 69 6f 6e 7d 7d 0a 09 53 | 70 65 63 69 66 69 65 73 |ion}}..S|pecifies|
|00001630| 20 74 68 65 20 63 61 6d | 65 72 61 20 73 65 70 61 | the cam|era sepa|
|00001640| 72 61 74 69 6f 6e 20 74 | 6f 20 62 65 20 75 73 65 |ration t|o be use|
|00001650| 64 20 69 6e 20 72 65 6e | 64 65 72 69 6e 67 20 73 |d in ren|dering s|
|00001660| 74 65 72 65 6f 0a 09 70 | 61 69 72 73 2e 0a 5c 65 |tereo..p|airs..\e|
|00001670| 6e 64 7b 64 65 66 6b 65 | 79 7d 0a 54 68 65 72 65 |nd{defke|y}.There|
|00001680| 20 69 73 20 6e 6f 20 64 | 65 66 61 75 6c 74 20 76 | is no d|efault v|
|00001690| 61 6c 75 65 2e 0a 54 68 | 65 20 73 65 70 61 72 61 |alue..Th|e separa|
|000016a0| 74 69 6f 6e 20 6d 61 79 | 20 61 6c 73 6f 20 62 65 |tion may| also be|
|000016b0| 20 73 70 65 63 69 66 69 | 65 64 20 6f 6e 20 74 68 | specifi|ed on th|
|000016c0| 65 20 63 6f 6d 6d 61 6e | 64 20 6c 69 6e 65 20 74 |e comman|d line t|
|000016d0| 68 72 6f 75 67 68 0a 74 | 68 65 20 7b 5c 65 6d 20 |hrough.t|he {\em |
|000016e0| 2d 45 7d 20 6f 70 74 69 | 6f 6e 2e 0a 54 68 65 20 |-E} opti|on..The |
|000016f0| 76 69 65 77 20 74 6f 20 | 62 65 20 72 65 6e 64 65 |view to |be rende|
|00001700| 72 65 64 20 28 6c 65 66 | 74 20 6f 72 20 72 69 67 |red (lef|t or rig|
|00001710| 68 74 29 0a 6d 75 73 74 | 20 62 65 20 73 70 65 63 |ht).must| be spec|
|00001720| 69 66 69 65 64 20 6f 6e | 20 74 68 65 20 63 6f 6d |ified on| the com|
|00001730| 6d 61 6e 64 20 6c 69 6e | 65 20 62 79 20 75 73 69 |mand lin|e by usi|
|00001740| 6e 67 0a 74 68 65 20 7b | 5c 74 74 20 2d 6c 7d 20 |ng.the {|\tt -l} |
|00001750| 6f 72 20 7b 5c 74 74 20 | 2d 72 7d 20 6f 70 74 69 |or {\tt |-r} opti|
|00001760| 6f 6e 73 2e 0a 0a 54 68 | 65 72 65 20 61 72 65 20 |ons...Th|ere are |
|00001770| 73 65 76 65 72 61 6c 20 | 74 68 69 6e 67 73 20 74 |several |things t|
|00001780| 6f 20 6b 65 65 70 20 69 | 6e 20 6d 69 6e 64 20 77 |o keep i|n mind w|
|00001790| 68 65 6e 20 67 65 6e 65 | 72 61 74 69 6e 67 20 73 |hen gene|rating s|
|000017a0| 74 65 72 65 6f 0a 70 61 | 69 72 73 2e 20 20 46 69 |tereo.pa|irs. Fi|
|000017b0| 72 73 74 6c 79 2c 20 74 | 68 6f 73 65 20 6f 62 6a |rstly, t|hose obj|
|000017c0| 65 63 74 73 20 74 68 61 | 74 20 6c 69 65 20 69 6e |ects tha|t lie in|
|000017d0| 20 66 72 6f 6d 20 6f 66 | 20 74 68 65 20 66 6f 63 | from of| the foc|
|000017e0| 61 6c 20 70 6c 61 6e 65 | 20 77 69 6c 6c 0a 61 70 |al plane| will.ap|
|000017f0| 70 65 61 72 20 74 6f 20 | 70 72 6f 74 72 75 64 65 |pear to |protrude|
|00001800| 20 66 72 6f 6d 20 74 68 | 65 20 73 63 72 65 65 6e | from th|e screen|
|00001810| 20 77 68 65 6e 20 76 69 | 65 77 65 64 20 69 6e 20 | when vi|ewed in |
|00001820| 73 74 65 72 65 6f 2c 20 | 77 68 69 6c 65 20 6f 62 |stereo, |while ob|
|00001830| 6a 65 63 74 73 0a 66 61 | 72 74 68 65 72 0a 74 68 |jects.fa|rther.th|
|00001840| 61 6e 20 74 68 65 20 66 | 6f 63 61 6c 20 70 6c 61 |an the f|ocal pla|
|00001850| 6e 65 20 77 69 6c 6c 20 | 72 65 63 65 64 65 20 69 |ne will |recede i|
|00001860| 6e 74 6f 20 74 68 65 20 | 73 63 72 65 65 6e 2e 20 |nto the |screen. |
|00001870| 20 41 73 20 69 74 20 69 | 73 20 75 73 75 61 6c 6c | As it i|s usuall|
|00001880| 79 0a 65 61 73 69 65 72 | 20 74 6f 20 6c 6f 6f 6b |y.easier| to look|
|00001890| 20 61 74 20 73 74 65 72 | 65 6f 20 69 6d 61 67 65 | at ster|eo image|
|000018a0| 73 20 74 68 61 74 20 72 | 65 63 65 64 65 20 69 6e |s that r|ecede in|
|000018b0| 74 6f 20 74 68 65 20 73 | 63 72 65 65 6e 2c 20 79 |to the s|creen, y|
|000018c0| 6f 75 20 77 69 6c 6c 0a | 75 73 75 61 6c 6c 79 0a |ou will.|usually.|
|000018d0| 77 61 6e 74 20 74 6f 20 | 70 6c 61 63 65 20 74 68 |want to |place th|
|000018e0| 65 20 6c 6f 6f 6b 20 70 | 6f 69 6e 74 20 63 6c 6f |e look p|oint clo|
|000018f0| 73 65 72 20 74 6f 20 74 | 68 65 20 63 61 6d 65 72 |ser to t|he camer|
|00001900| 61 20 74 68 61 6e 20 74 | 68 65 20 6f 62 6a 65 63 |a than t|he objec|
|00001910| 74 0a 6f 66 20 70 72 69 | 6d 61 72 79 20 69 6e 74 |t.of pri|mary int|
|00001920| 65 72 65 73 74 2e 0a 0a | 54 68 65 20 64 65 67 72 |erest...|The degr|
|00001930| 65 65 20 6f 66 20 73 74 | 65 72 65 6f 20 65 66 66 |ee of st|ereo eff|
|00001940| 65 63 74 20 69 73 20 61 | 0a 66 75 6e 63 74 69 6f |ect is a|.functio|
|00001950| 6e 20 6f 66 20 74 68 65 | 20 63 61 6d 65 72 61 20 |n of the| camera |
|00001960| 73 65 70 61 72 61 74 69 | 6f 6e 20 61 6e 64 20 74 |separati|on and t|
|00001970| 68 65 20 64 69 73 74 61 | 6e 63 65 20 66 72 6f 6d |he dista|nce from|
|00001980| 20 74 68 65 20 63 61 6d | 65 72 61 0a 74 6f 20 74 | the cam|era.to t|
|00001990| 68 65 20 6c 6f 6f 6b 20 | 70 6f 69 6e 74 2e 20 54 |he look |point. T|
|000019a0| 6f 6f 20 6c 61 72 67 65 | 20 61 20 73 65 70 61 72 |oo large| a separ|
|000019b0| 61 74 69 6f 6e 20 77 69 | 6c 6c 20 72 65 73 75 6c |ation wi|ll resul|
|000019c0| 74 20 69 6e 20 61 20 68 | 79 70 65 72 73 74 65 72 |t in a h|yperster|
|000019d0| 65 6f 0a 65 66 66 65 63 | 74 20 74 68 61 74 20 77 |eo.effec|t that w|
|000019e0| 69 6c 6c 20 62 65 20 68 | 61 72 64 20 74 6f 20 72 |ill be h|ard to r|
|000019f0| 65 73 6f 6c 76 65 2c 20 | 77 68 69 6c 65 20 74 6f |esolve, |while to|
|00001a00| 6f 20 6c 69 74 74 6c 65 | 20 61 20 76 61 6c 75 65 |o little| a value|
|00001a10| 20 77 69 6c 6c 20 72 65 | 73 75 6c 74 0a 69 6e 20 | will re|sult.in |
|00001a20| 6e 6f 20 73 74 65 72 65 | 6f 20 65 66 66 65 63 74 |no stere|o effect|
|00001a30| 0a 61 74 20 61 6c 6c 2e | 20 20 41 20 73 65 70 61 |.at all.| A sepa|
|00001a40| 72 61 74 69 6f 6e 20 65 | 71 75 61 6c 20 74 6f 20 |ration e|qual to |
|00001a50| 6f 6e 65 20 74 65 6e 74 | 68 20 74 68 65 20 64 69 |one tent|h the di|
|00001a60| 73 74 61 6e 63 65 20 66 | 72 6f 6d 20 74 68 65 0a |stance f|rom the.|
|00001a70| 63 61 6d 65 72 61 20 74 | 6f 20 74 68 65 20 6c 6f |camera t|o the lo|
|00001a80| 6f 6b 20 70 6f 69 6e 74 | 20 69 73 20 6f 66 74 65 |ok point| is ofte|
|00001a90| 6e 20 61 20 67 6f 6f 64 | 20 63 68 6f 69 63 65 2e |n a good| choice.|
|00001aa0| 0a 0a 49 66 20 79 6f 75 | 20 77 61 6e 74 20 74 6f |..If you| want to|
|00001ab0| 20 67 65 6e 65 72 61 74 | 65 20 73 74 65 72 65 6f | generat|e stereo|
|00001ac0| 20 70 61 69 72 73 20 77 | 69 74 68 20 70 61 72 61 | pairs w|ith para|
|00001ad0| 6c 6c 65 6c 20 6f 70 74 | 69 63 61 6c 20 61 78 65 |llel opt|ical axe|
|00001ae0| 73 20 74 68 69 73 20 6f | 70 74 69 6f 6e 0a 77 69 |s this o|ption.wi|
|00001af0| 6c 6c 20 7b 5c 65 6d 20 | 6e 6f 74 7d 20 77 6f 72 |ll {\em |not} wor|
|00001b00| 6b 2c 20 62 65 63 61 75 | 73 65 20 69 74 20 6f 6e |k, becau|se it on|
|00001b10| 6c 79 20 61 66 66 65 63 | 74 73 20 74 68 65 20 63 |ly affec|ts the c|
|00001b20| 61 6d 65 72 61 20 70 6f | 73 69 74 69 6f 6e 2e 20 |amera po|sition. |
|00001b30| 20 49 6e 73 74 65 61 64 | 2c 0a 79 6f 75 20 6d 75 | Instead|,.you mu|
|00001b40| 73 74 20 65 78 70 6c 69 | 63 69 74 6c 79 20 63 68 |st expli|citly ch|
|00001b50| 61 6e 67 65 20 62 6f 74 | 68 20 74 68 65 20 63 61 |ange bot|h the ca|
|00001b60| 6d 65 72 61 0a 70 6f 73 | 69 74 69 6f 6e 20 28 7b |mera.pos|ition ({|
|00001b70| 5c 74 74 20 65 79 65 70 | 7d 29 20 61 6e 64 20 74 |\tt eyep|}) and t|
|00001b80| 68 65 20 6c 6f 6f 6b 20 | 70 6f 69 6e 74 20 28 7b |he look |point ({|
|00001b90| 5c 74 74 20 6c 6f 6f 6b | 70 7d 29 2e 20 20 4f 6e |\tt look|p}). On|
|00001ba0| 65 20 77 61 79 20 74 6f | 20 64 6f 20 74 68 69 73 |e way to| do this|
|00001bb0| 0a 69 73 20 74 6f 20 69 | 6e 76 6f 6b 65 20 74 68 |.is to i|nvoke th|
|00001bc0| 65 20 43 20 70 72 65 70 | 72 6f 63 65 73 73 6f 72 |e C prep|rocessor|
|00001bd0| 20 69 6e 20 74 68 65 20 | 73 6f 75 72 63 65 20 66 | in the |source f|
|00001be0| 69 6c 65 2c 20 61 6e 64 | 20 75 73 65 20 74 68 65 |ile, and| use the|
|00001bf0| 20 7b 5c 74 74 2d 50 7d | 0a 63 6f 6d 6d 61 6e 64 | {\tt-P}|.command|
|00001c00| 20 6c 69 6e 65 20 6f 70 | 74 69 6f 6e 2c 20 65 2e | line op|tion, e.|
|00001c10| 67 2e 3a 0a 0a 5c 62 65 | 67 69 6e 7b 76 65 72 62 |g.:..\be|gin{verb|
|00001c20| 61 74 69 6d 7d 0a 20 20 | 20 20 23 69 66 6e 64 65 |atim}. | #ifnde|
|00001c30| 66 20 58 0a 20 20 20 20 | 23 64 65 66 69 6e 65 20 |f X. |#define |
|00001c40| 58 20 30 0a 20 20 20 20 | 23 65 6e 64 69 66 0a 0a |X 0. |#endif..|
|00001c50| 20 20 20 20 6c 6f 6f 6b | 70 20 58 20 30 20 30 0a | look|p X 0 0.|
|00001c60| 20 20 20 20 65 79 65 70 | 20 58 20 2d 38 20 30 0a | eyep| X -8 0.|
|00001c70| 5c 65 6e 64 7b 76 65 72 | 62 61 74 69 6d 7d 0a 0a |\end{ver|batim}..|
|00001c80| 5c 6e 6f 69 6e 64 65 6e | 74 20 28 66 6f 6c 6c 6f |\noinden|t (follo|
|00001c90| 77 65 64 20 62 79 29 0a | 0a 5c 62 65 67 69 6e 7b |wed by).|.\begin{|
|00001ca0| 76 65 72 62 61 74 69 6d | 7d 0a 20 20 20 20 72 61 |verbatim|}. ra|
|00001cb0| 79 73 68 61 64 65 20 2d | 50 20 2d 44 58 3d 2e 35 |yshade -|P -DX=.5|
|00001cc0| 0a 20 20 20 20 72 61 79 | 73 68 61 64 65 20 2d 50 |. ray|shade -P|
|00001cd0| 20 2d 44 58 3d 2d 2e 35 | 0a 5c 65 6e 64 7b 76 65 | -DX=-.5|.\end{ve|
|00001ce0| 72 62 61 74 69 6d 7d 0a | 0a 49 66 20 79 6f 75 20 |rbatim}.|.If you |
|00001cf0| 77 61 6e 74 20 74 6f 20 | 71 75 61 6e 74 69 66 79 |want to |quantify|
|00001d00| 20 74 68 65 20 64 69 73 | 74 61 6e 63 65 20 74 6f | the dis|tance to|
|00001d10| 20 6f 62 6a 65 63 74 73 | 20 69 6e 20 74 68 65 20 | objects| in the |
|00001d20| 73 63 65 6e 65 2c 20 72 | 65 66 65 72 20 74 6f 0a |scene, r|efer to.|
|00001d30| 41 70 70 65 6e 64 69 78 | 20 44 20 66 6f 72 20 69 |Appendix| D for i|
|00001d40| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 61 62 6f 75 74 |nformati|on about|
|00001d50| 20 67 65 6e 65 72 61 74 | 69 6e 67 20 52 61 6e 67 | generat|ing Rang|
|00001d60| 65 20 4d 61 70 73 20 28 | 5a 20 62 75 66 66 65 72 |e Maps (|Z buffer|
|00001d70| 20 6f 75 74 70 75 74 29 | 2e 0a | output)|.. |
+--------+-------------------------+-------------------------+--------+--------+