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: running.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
| 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 52 75 6e 6e 69 6e 67 |\chapter|{Running|
|00000010| 20 52 61 79 73 68 61 64 | 65 7d 0a 0a 7b 5c 52 61 | Rayshad|e}..{\Ra|
|00000020| 79 73 68 61 64 65 7d 0a | 63 61 6e 20 74 61 6b 65 |yshade}.|can take|
|00000030| 20 61 6e 79 77 68 65 72 | 65 20 66 72 6f 6d 20 73 | anywher|e from s|
|00000040| 65 63 6f 6e 64 73 20 74 | 6f 20 77 65 65 6b 73 20 |econds t|o weeks |
|00000050| 74 6f 20 72 65 6e 64 65 | 72 20 61 6e 20 69 6d 61 |to rende|r an ima|
|00000060| 67 65 2e 20 20 54 68 65 | 20 65 78 61 63 74 0a 74 |ge. The| exact.t|
|00000070| 69 6d 65 20 72 65 71 75 | 69 72 65 64 20 69 73 20 |ime requ|ired is |
|00000080| 61 20 66 75 6e 63 74 69 | 6f 6e 20 6f 66 20 74 68 |a functi|on of th|
|00000090| 65 20 73 70 65 65 64 20 | 6f 66 20 74 68 65 0a 6d |e speed |of the.m|
|000000a0| 61 63 68 69 6e 65 28 73 | 29 20 6f 6e 20 77 68 69 |achine(s|) on whi|
|000000b0| 63 68 0a 79 6f 75 27 72 | 65 20 77 6f 72 6b 69 6e |ch.you'r|e workin|
|000000c0| 67 2c 20 74 68 65 20 63 | 6f 6d 70 6c 65 78 69 74 |g, the c|omplexit|
|000000d0| 79 20 6f 66 20 74 68 65 | 20 73 63 65 6e 65 2c 20 |y of the| scene, |
|000000e0| 61 6e 64 20 68 6f 77 20 | 60 60 67 6f 6f 64 27 27 |and how |``good''|
|000000f0| 20 79 6f 75 20 77 61 6e | 74 0a 74 68 65 20 66 69 | you wan|t.the fi|
|00000100| 6e 61 6c 20 69 6d 61 67 | 65 20 74 6f 20 62 65 2e |nal imag|e to be.|
|00000110| 20 20 25 20 5c 66 6f 6f | 74 6e 6f 74 65 7b 41 70 | % \foo|tnote{Ap|
|00000120| 70 65 6e 64 69 78 20 44 | 20 64 65 73 63 72 69 62 |pendix D| describ|
|00000130| 65 73 20 73 6f 6d 65 20 | 73 69 6d 70 6c 65 0a 25 |es some |simple.%|
|00000140| 20 77 61 79 73 20 74 6f | 20 61 63 63 65 6c 65 72 | ways to| acceler|
|00000150| 61 74 65 20 74 68 65 20 | 72 65 6e 64 65 72 69 6e |ate the |renderin|
|00000160| 67 20 70 72 6f 63 65 73 | 73 2e 7d 20 2d 2d 20 4e |g proces|s.} -- N|
|00000170| 4f 4e 45 58 49 53 54 41 | 4e 54 21 21 20 28 6d 77 |ONEXISTA|NT!! (mw|
|00000180| 6d 29 0a 0a 43 72 65 61 | 74 69 6e 67 20 61 20 66 |m)..Crea|ting a f|
|00000190| 69 6e 69 73 68 65 64 20 | 72 61 79 2d 74 72 61 63 |inished |ray-trac|
|000001a0| 65 64 20 69 6d 61 67 65 | 20 69 73 20 61 6e 20 69 |ed image| is an i|
|000001b0| 74 65 72 61 74 69 76 65 | 20 70 72 6f 63 65 73 73 |terative| process|
|000001c0| 2e 20 20 55 73 75 61 6c | 6c 79 2c 20 6d 61 6e 79 |. Usual|ly, many|
|000001d0| 0a 74 65 73 74 20 72 65 | 6e 64 65 72 69 6e 67 73 |.test re|nderings|
|000001e0| 20 61 72 65 20 6d 61 64 | 65 20 61 74 20 6c 6f 77 | are mad|e at low|
|000001f0| 20 72 65 73 6f 6c 75 74 | 69 6f 6e 20 61 6e 64 20 | resolut|ion and |
|00000200| 77 69 74 68 0a 6e 6f 6e | 2d 65 73 73 65 6e 74 69 |with.non|-essenti|
|00000210| 61 6c 20 66 65 61 74 75 | 72 65 73 20 74 75 72 6e |al featu|res turn|
|00000220| 65 64 20 6f 66 66 2e 20 | 20 41 66 74 65 72 20 65 |ed off. | After e|
|00000230| 61 63 68 20 74 65 73 74 | 20 69 6d 61 67 65 20 69 |ach test| image i|
|00000240| 73 20 63 72 65 61 74 65 | 64 2c 0a 73 75 72 66 61 |s create|d,.surfa|
|00000250| 63 65 20 64 65 66 69 6e | 69 74 69 6f 6e 73 20 6d |ce defin|itions m|
|00000260| 69 67 68 74 20 62 65 20 | 6d 6f 64 69 66 69 65 64 |ight be |modified|
|00000270| 2c 20 74 68 65 20 65 79 | 65 20 6f 72 20 6c 6f 6f |, the ey|e or loo|
|00000280| 6b 20 70 6f 73 69 74 69 | 6f 6e 73 20 6d 61 79 20 |k positi|ons may |
|00000290| 62 65 0a 73 6c 69 67 68 | 74 6c 79 20 63 68 61 6e |be.sligh|tly chan|
|000002a0| 67 65 64 2c 20 6f 72 20 | 74 68 65 20 69 6e 74 65 |ged, or |the inte|
|000002b0| 6e 73 69 74 79 20 6f 66 | 20 61 20 6c 69 67 68 74 |nsity of| a light|
|000002c0| 20 73 6f 75 72 63 65 20 | 63 68 61 6e 67 65 64 2e | source |changed.|
|000002d0| 0a 0a 54 68 69 73 20 63 | 68 61 70 74 65 72 20 64 |..This c|hapter d|
|000002e0| 65 73 63 72 69 62 65 73 | 20 74 68 65 20 62 61 73 |escribes| the bas|
|000002f0| 69 63 20 6f 70 65 72 61 | 74 69 6f 6e 20 6f 66 20 |ic opera|tion of |
|00000300| 7b 5c 72 61 79 73 68 61 | 64 65 7d 20 61 6e 64 20 |{\raysha|de} and |
|00000310| 73 6f 6d 65 20 6f 66 0a | 74 68 65 20 6f 70 74 69 |some of.|the opti|
|00000320| 6f 6e 73 20 74 68 61 74 | 20 63 6f 6e 74 72 6f 6c |ons that| control|
|00000330| 20 74 68 61 74 20 6f 70 | 65 72 61 74 69 6f 6e 2e | that op|eration.|
|00000340| 0a 53 65 74 74 69 6e 67 | 20 74 68 65 73 65 20 6f |.Setting| these o|
|00000350| 70 74 69 6f 6e 73 20 70 | 72 6f 70 65 72 6c 79 20 |ptions p|roperly |
|00000360| 63 61 6e 20 67 72 65 61 | 74 6c 79 20 72 65 64 75 |can grea|tly redu|
|00000370| 63 65 0a 72 65 6e 64 65 | 72 69 6e 67 20 74 69 6d |ce.rende|ring tim|
|00000380| 65 2c 20 69 6d 70 72 6f | 76 65 20 74 68 65 20 71 |e, impro|ve the q|
|00000390| 75 61 6c 69 74 79 20 6f | 66 20 79 6f 75 72 20 69 |uality o|f your i|
|000003a0| 6d 61 67 65 73 2c 20 61 | 6e 64 20 6d 61 6b 65 20 |mages, a|nd make |
|000003b0| 79 6f 75 20 61 20 62 65 | 74 74 65 72 0a 70 65 72 |you a be|tter.per|
|000003c0| 73 6f 6e 2e 0a 0a 7b 5c | 52 61 79 73 68 61 64 65 |son...{\|Rayshade|
|000003d0| 7d 20 75 73 75 61 6c 6c | 79 20 77 6f 72 6b 73 20 |} usuall|y works |
|000003e0| 61 73 20 61 20 66 69 6c | 74 65 72 2c 20 72 65 61 |as a fil|ter, rea|
|000003f0| 64 69 6e 67 20 61 20 64 | 65 73 63 72 69 70 74 69 |ding a d|escripti|
|00000400| 6f 6e 20 66 72 6f 6d 0a | 74 68 65 20 73 74 61 6e |on from.|the stan|
|00000410| 64 61 72 64 20 69 6e 70 | 75 74 20 61 6e 64 20 77 |dard inp|ut and w|
|00000420| 72 69 74 69 6e 67 0a 61 | 6e 20 69 6d 61 67 65 20 |riting.a|n image |
|00000430| 66 69 6c 65 20 74 6f 20 | 74 68 65 20 73 74 61 6e |file to |the stan|
|00000440| 64 61 72 64 20 6f 75 74 | 70 75 74 2e 20 20 41 73 |dard out|put. As|
|00000450| 20 69 74 20 69 73 20 77 | 6f 72 6b 69 6e 67 2c 20 | it is w|orking, |
|00000460| 7b 5c 72 61 79 73 68 61 | 64 65 7d 20 72 65 70 6f |{\raysha|de} repo|
|00000470| 72 74 73 0a 6f 6e 20 74 | 68 65 20 70 72 6f 67 72 |rts.on t|he progr|
|00000480| 65 73 73 20 6f 66 20 74 | 68 65 20 72 65 6e 64 65 |ess of t|he rende|
|00000490| 72 69 6e 67 20 62 79 20 | 77 72 69 74 69 6e 67 20 |ring by |writing |
|000004a0| 6d 65 73 73 61 67 65 73 | 20 74 6f 20 74 68 65 20 |messages| to the |
|000004b0| 73 74 61 6e 64 61 72 64 | 0a 65 72 72 6f 72 2e 0a |standard|.error..|
|000004c0| 0a 5c 73 65 63 74 69 6f | 6e 7b 54 68 65 20 49 6e |.\sectio|n{The In|
|000004d0| 70 75 74 20 46 69 6c 65 | 7d 0a 0a 54 68 65 20 73 |put File|}..The s|
|000004e0| 63 65 6e 65 20 64 65 73 | 63 72 69 70 74 69 6f 6e |cene des|cription|
|000004f0| 20 72 65 61 64 20 62 79 | 20 7b 5c 72 61 79 73 68 | read by| {\raysh|
|00000500| 61 64 65 7d 20 63 6f 6e | 73 69 73 74 73 20 6f 66 |ade} con|sists of|
|00000510| 20 61 20 6e 75 6d 62 65 | 72 20 6f 66 0a 6b 65 79 | a numbe|r of.key|
|00000520| 77 6f 72 64 73 2c 20 65 | 61 63 68 20 66 6f 6c 6c |words, e|ach foll|
|00000530| 6f 77 65 64 20 62 79 20 | 61 20 73 65 74 20 6f 66 |owed by |a set of|
|00000540| 20 61 72 67 75 6d 65 6e | 74 73 2e 20 20 54 68 65 | argumen|ts. The|
|00000550| 73 65 20 6b 65 79 77 6f | 72 64 73 20 63 61 6e 0a |se keywo|rds can.|
|00000560| 62 65 20 74 68 6f 75 67 | 68 74 20 6f 66 20 61 73 |be thoug|ht of as|
|00000570| 20 63 6f 6d 6d 61 6e 64 | 73 20 74 68 61 74 20 64 | command|s that d|
|00000580| 69 72 65 63 74 20 7b 5c | 72 61 79 73 68 61 64 65 |irect {\|rayshade|
|00000590| 7d 20 74 6f 20 64 6f 20 | 76 61 72 69 6f 75 73 20 |} to do |various |
|000005a0| 74 68 69 6e 67 73 2c 0a | 73 75 63 68 20 61 73 20 |things,.|such as |
|000005b0| 63 72 65 61 74 65 20 6f | 62 6a 65 63 74 73 2c 20 |create o|bjects, |
|000005c0| 73 65 74 20 74 68 65 20 | 65 79 65 27 73 20 70 6f |set the |eye's po|
|000005d0| 73 69 74 69 6f 6e 2c 20 | 61 6e 64 20 63 68 61 6e |sition, |and chan|
|000005e0| 67 65 20 61 6e 20 6f 62 | 6a 65 63 74 27 73 0a 61 |ge an ob|ject's.a|
|000005f0| 70 70 65 61 72 61 6e 63 | 65 2e 0a 0a 4d 61 6e 79 |ppearanc|e...Many|
|00000600| 20 6f 66 20 74 68 65 20 | 6b 65 79 77 6f 72 64 73 | of the |keywords|
|00000610| 20 68 61 76 65 20 72 65 | 6c 61 74 65 64 20 63 6f | have re|lated co|
|00000620| 6d 6d 61 6e 64 2d 6c 69 | 6e 65 20 6f 70 74 69 6f |mmand-li|ne optio|
|00000630| 6e 73 20 66 6f 72 20 74 | 75 72 6e 69 6e 67 0a 6f |ns for t|urning.o|
|00000640| 6e 20 73 70 65 63 69 61 | 6c 20 66 65 61 74 75 72 |n specia|l featur|
|00000650| 65 73 20 61 6e 64 20 73 | 65 74 74 69 6e 67 20 76 |es and s|etting v|
|00000660| 61 6c 75 65 73 2e 0a 54 | 68 65 73 65 20 6f 70 74 |alues..T|hese opt|
|00000670| 69 6f 6e 73 20 6f 76 65 | 72 72 69 64 65 20 74 68 |ions ove|rride th|
|00000680| 65 20 76 61 6c 75 65 73 | 20 67 69 76 65 6e 20 69 |e values| given i|
|00000690| 6e 20 74 68 65 20 69 6e | 70 75 74 20 66 69 6c 65 |n the in|put file|
|000006a0| 2c 0a 61 6e 64 20 61 72 | 65 20 65 78 70 6c 61 69 |,.and ar|e explai|
|000006b0| 6e 65 64 20 69 6e 20 64 | 65 74 61 69 6c 20 69 6e |ned in d|etail in|
|000006c0| 20 41 70 70 65 6e 64 69 | 78 20 41 2e 0a 0a 7b 5c | Appendi|x A...{\|
|000006d0| 52 61 79 73 68 61 64 65 | 7d 20 69 73 20 60 60 63 |Rayshade|} is ``c|
|000006e0| 61 73 65 20 73 65 6e 73 | 69 74 69 76 65 2c 27 27 |ase sens|itive,''|
|000006f0| 20 77 68 69 63 68 20 6d | 65 61 6e 73 20 74 68 61 | which m|eans tha|
|00000700| 74 20 74 79 70 69 6e 67 | 0a 7b 5c 74 74 20 53 50 |t typing|.{\tt SP|
|00000710| 48 45 52 45 7d 20 6f 72 | 20 7b 5c 74 74 20 53 70 |HERE} or| {\tt Sp|
|00000720| 68 65 72 65 7d 20 69 6e | 73 74 65 61 64 20 6f 66 |here} in|stead of|
|00000730| 20 7b 5c 74 74 20 73 70 | 68 65 72 65 7d 20 77 6f | {\tt sp|here} wo|
|00000740| 6e 27 74 20 77 6f 72 6b | 2e 0a 7b 5c 52 61 79 73 |n't work|..{\Rays|
|00000750| 68 61 64 65 7d 20 6b 65 | 79 77 6f 72 64 73 20 61 |hade} ke|ywords a|
|00000760| 72 65 20 61 6c 6c 20 6c | 6f 77 65 72 2d 63 61 73 |re all l|ower-cas|
|00000770| 65 2e 20 20 4d 61 6e 79 | 20 70 65 6f 70 6c 65 20 |e. Many| people |
|00000780| 63 68 6f 6f 73 65 20 74 | 6f 0a 63 61 70 69 74 61 |choose t|o.capita|
|00000790| 6c 69 7a 65 20 74 68 65 | 20 66 69 72 73 74 20 6c |lize the| first l|
|000007a0| 65 74 74 65 72 20 6f 66 | 20 6e 61 6d 65 73 20 74 |etter of| names t|
|000007b0| 68 61 74 20 74 68 65 79 | 20 67 69 76 65 20 74 6f |hat they| give to|
|000007c0| 20 6f 62 6a 65 63 74 73 | 0a 6f 72 20 73 75 72 66 | objects|.or surf|
|000007d0| 61 63 65 73 20 69 6e 20 | 6f 72 64 65 72 20 74 6f |aces in |order to|
|000007e0| 20 6d 61 6b 65 20 74 68 | 65 6e 20 60 60 73 74 61 | make th|en ``sta|
|000007f0| 6e 64 20 6f 75 74 27 27 | 20 69 6e 20 61 6e 20 69 |nd out''| in an i|
|00000800| 6e 70 75 74 20 66 69 6c | 65 2e 0a 0a 4b 65 79 77 |nput fil|e...Keyw|
|00000810| 6f 72 64 73 2c 20 6e 75 | 6d 62 65 72 73 20 61 6e |ords, nu|mbers an|
|00000820| 64 20 73 74 72 69 6e 67 | 73 20 69 6e 20 74 68 65 |d string|s in the|
|00000830| 20 69 6e 70 75 74 20 66 | 69 6c 65 20 61 72 65 20 | input f|ile are |
|00000840| 73 65 70 61 72 61 74 65 | 64 20 62 79 20 73 70 61 |separate|d by spa|
|00000850| 63 65 73 2c 0a 74 61 62 | 73 2c 20 6f 72 20 6e 65 |ces,.tab|s, or ne|
|00000860| 77 20 6c 69 6e 65 73 20 | 28 63 61 72 72 69 61 67 |w lines |(carriag|
|00000870| 65 20 72 65 74 75 72 6e | 73 29 2e 20 20 54 68 65 |e return|s). The|
|00000880| 73 65 20 60 60 77 68 69 | 74 65 73 70 61 63 65 27 |se ``whi|tespace'|
|00000890| 27 20 63 68 61 72 61 63 | 74 65 72 73 0a 61 72 65 |' charac|ters.are|
|000008a0| 20 68 61 6e 64 6c 65 64 | 20 69 64 65 6e 74 69 63 | handled| identic|
|000008b0| 61 6c 6c 79 20 62 79 20 | 7b 5c 72 61 79 73 68 61 |ally by |{\raysha|
|000008c0| 64 65 7d 2c 20 77 68 69 | 63 68 20 6d 65 61 6e 73 |de}, whi|ch means|
|000008d0| 20 74 68 61 74 20 79 6f | 75 20 63 61 6e 20 73 65 | that yo|u can se|
|000008e0| 70 61 72 61 74 65 0a 6b | 65 79 77 6f 72 64 73 20 |parate.k|eywords |
|000008f0| 66 72 6f 6d 20 6b 65 79 | 77 6f 72 64 73 2c 20 6b |from key|words, k|
|00000900| 65 79 20 77 6f 72 64 73 | 20 66 72 6f 6d 20 61 72 |ey words| from ar|
|00000910| 67 75 6d 65 6e 74 73 2c | 20 61 6e 64 20 61 72 67 |guments,| and arg|
|00000920| 75 6d 65 6e 74 73 20 66 | 72 6f 6d 0a 61 72 67 75 |uments f|rom.argu|
|00000930| 6d 65 6e 74 73 20 75 73 | 69 6e 67 20 61 6e 79 20 |ments us|ing any |
|00000940| 63 6f 6d 62 69 6e 61 74 | 69 6f 6e 20 6f 66 20 77 |combinat|ion of w|
|00000950| 68 69 74 65 73 70 61 63 | 65 20 63 68 61 72 61 63 |hitespac|e charac|
|00000960| 74 65 72 73 20 74 68 61 | 74 20 79 6f 75 20 63 68 |ters tha|t you ch|
|00000970| 6f 6f 73 65 2e 0a 0a 5c | 62 65 67 69 6e 7b 74 61 |oose...\|begin{ta|
|00000980| 62 6c 65 7d 0a 5c 63 65 | 6e 74 65 72 69 6e 67 0a |ble}.\ce|ntering.|
|00000990| 5c 62 65 67 69 6e 7b 74 | 61 62 75 6c 61 72 7d 7b |\begin{t|abular}{|
|000009a0| 7c 63 7c 63 7c 6c 7c 7d | 5c 68 6c 69 6e 65 5c 68 ||c|c|l|}|\hline\h|
|000009b0| 6c 69 6e 65 0a 4f 70 65 | 72 61 74 6f 72 20 26 20 |line.Ope|rator & |
|000009c0| 20 20 20 55 73 65 20 20 | 20 20 26 20 4f 70 65 72 | Use | & Oper|
|000009d0| 61 74 69 6f 6e 20 5c 5c | 20 5c 68 6c 69 6e 65 20 |ation \\| \hline |
|000009e0| 5c 68 6c 69 6e 65 0a 5c | 76 65 72 62 2b 5e 2b 20 |\hline.\|verb+^+ |
|000009f0| 26 20 20 5c 76 65 72 62 | 21 61 20 5e 20 62 21 20 |& \verb|!a ^ b! |
|00000a00| 20 26 20 45 78 70 6f 6e | 65 6e 74 69 61 74 69 6f | & Expon|entiatio|
|00000a10| 6e 20 5c 5c 20 20 5c 68 | 6c 69 6e 65 0a 5c 76 65 |n \\ \h|line.\ve|
|00000a20| 72 62 2b 2d 2b 20 26 20 | 20 5c 76 65 72 62 21 20 |rb+-+ & | \verb! |
|00000a30| 2d 61 20 20 21 20 20 26 | 20 4e 65 67 61 74 69 6f |-a ! &| Negatio|
|00000a40| 6e 20 20 5c 5c 20 20 20 | 5c 68 6c 69 6e 65 0a 5c |n \\ |\hline.\|
|00000a50| 76 65 72 62 2b 2a 2b 20 | 26 20 20 5c 76 65 72 62 |verb+*+ |& \verb|
|00000a60| 21 61 20 2a 20 62 21 20 | 20 26 20 4d 75 6c 74 69 |!a * b! | & Multi|
|00000a70| 70 6c 69 63 61 74 69 6f | 6e 20 20 5c 5c 20 20 5c |plicatio|n \\ \|
|00000a80| 68 6c 69 6e 65 0a 5c 76 | 65 72 62 2b 2f 2b 20 26 |hline.\v|erb+/+ &|
|00000a90| 20 20 5c 76 65 72 62 21 | 61 20 2f 20 62 21 20 20 | \verb!|a / b! |
|00000aa0| 26 20 44 69 76 69 73 69 | 6f 6e 20 20 20 20 20 5c |& Divisi|on \|
|00000ab0| 5c 20 20 5c 68 6c 69 6e | 65 0a 5c 76 65 72 62 2b |\ \hlin|e.\verb+|
|00000ac0| 25 2b 20 26 20 20 5c 76 | 65 72 62 21 61 20 25 20 |%+ & \v|erb!a % |
|00000ad0| 62 21 20 20 26 20 52 65 | 6d 61 69 6e 64 65 72 20 |b! & Re|mainder |
|00000ae0| 20 20 20 5c 5c 20 20 5c | 68 6c 69 6e 65 0a 5c 76 | \\ \|hline.\v|
|00000af0| 65 72 62 2d 2b 2d 20 26 | 20 20 5c 76 65 72 62 21 |erb-+- &| \verb!|
|00000b00| 61 20 2b 20 62 21 20 20 | 26 20 41 64 64 69 74 69 |a + b! |& Additi|
|00000b10| 6f 6e 20 20 20 20 20 5c | 5c 20 5c 68 6c 69 6e 65 |on \|\ \hline|
|00000b20| 0a 5c 76 65 72 62 2b 2d | 2b 20 26 20 20 5c 76 65 |.\verb+-|+ & \ve|
|00000b30| 72 62 21 61 20 2d 20 62 | 21 20 20 26 20 53 75 62 |rb!a - b|! & Sub|
|00000b40| 74 72 61 63 74 69 6f 6e | 20 20 5c 5c 20 5c 68 6c |traction| \\ \hl|
|00000b50| 69 6e 65 20 5c 68 6c 69 | 6e 65 0a 5c 65 6e 64 7b |ine \hli|ne.\end{|
|00000b60| 74 61 62 75 6c 61 72 7d | 0a 5c 63 61 70 74 69 6f |tabular}|.\captio|
|00000b70| 6e 7b 4f 70 65 72 61 74 | 6f 72 73 2c 20 69 6e 20 |n{Operat|ors, in |
|00000b80| 6f 72 64 65 72 20 6f 66 | 20 64 65 63 72 65 61 73 |order of| decreas|
|00000b90| 69 6e 67 20 70 72 65 63 | 65 64 65 6e 63 65 2e 7d |ing prec|edence.}|
|00000ba0| 0a 5c 6c 61 62 65 6c 7b | 74 61 62 3a 6f 70 65 72 |.\label{|tab:oper|
|00000bb0| 61 74 6f 72 73 7d 0a 5c | 65 6e 64 7b 74 61 62 6c |ators}.\|end{tabl|
|00000bc0| 65 7d 0a 0a 4e 75 6d 62 | 65 72 73 20 6d 61 79 20 |e}..Numb|ers may |
|00000bd0| 62 65 20 65 6e 74 65 72 | 65 64 20 64 69 72 65 63 |be enter|ed direc|
|00000be0| 74 6c 79 20 61 73 20 72 | 65 61 6c 73 20 6f 72 20 |tly as r|eals or |
|00000bf0| 61 73 20 70 61 72 65 6e | 74 68 65 73 69 7a 65 64 |as paren|thesized|
|00000c00| 20 65 78 70 72 65 73 73 | 69 6f 6e 73 2e 0a 52 65 | express|ions..Re|
|00000c10| 61 6c 73 20 6d 61 79 20 | 62 65 20 77 72 69 74 74 |als may |be writt|
|00000c20| 65 6e 20 69 6e 20 65 78 | 70 6f 6e 65 6e 74 69 61 |en in ex|ponentia|
|00000c30| 6c 20 6e 6f 74 61 74 69 | 6f 6e 20 69 66 20 79 6f |l notati|on if yo|
|00000c40| 75 20 77 69 73 68 2c 20 | 61 6e 64 0a 69 6e 74 65 |u wish, |and.inte|
|00000c50| 67 65 72 73 20 6d 61 79 | 20 62 65 20 77 72 69 74 |gers may| be writ|
|00000c60| 74 65 6e 20 77 69 74 68 | 20 6f 72 20 77 69 74 68 |ten with| or with|
|00000c70| 6f 75 74 20 61 20 74 72 | 61 69 6c 69 6e 67 20 64 |out a tr|ailing d|
|00000c80| 65 63 69 6d 61 6c 20 70 | 6f 69 6e 74 2e 0a 57 68 |ecimal p|oint..Wh|
|00000c90| 65 6e 20 61 6e 20 69 6e | 74 65 67 65 72 20 76 61 |en an in|teger va|
|00000ca0| 6c 75 65 20 69 73 20 63 | 61 6c 6c 65 64 20 66 6f |lue is c|alled fo|
|00000cb0| 72 20 61 6e 64 20 61 20 | 72 65 61 6c 20 69 73 20 |r and a |real is |
|00000cc0| 67 69 76 65 6e 2c 0a 74 | 68 65 20 72 65 61 6c 20 |given,.t|he real |
|00000cd0| 76 61 6c 75 65 20 69 73 | 20 74 72 75 6e 63 61 74 |value is| truncat|
|00000ce0| 65 64 20 61 6e 64 20 74 | 68 65 20 72 65 73 75 6c |ed and t|he resul|
|00000cf0| 74 69 6e 67 20 69 6e 74 | 65 67 65 72 20 69 73 20 |ting int|eger is |
|00000d00| 75 73 65 64 2e 0a 54 61 | 62 6c 65 20 5c 72 65 66 |used..Ta|ble \ref|
|00000d10| 7b 74 61 62 3a 6f 70 65 | 72 61 74 6f 72 73 7d 20 |{tab:ope|rators} |
|00000d20| 6c 69 73 74 73 20 74 68 | 65 20 61 76 61 69 6c 61 |lists th|e availa|
|00000d30| 62 6c 65 20 6f 70 65 72 | 61 74 6f 72 73 0a 61 76 |ble oper|ators.av|
|00000d40| 61 69 6c 61 62 6c 65 20 | 66 6f 72 20 75 73 65 20 |ailable |for use |
|00000d50| 69 6e 20 65 78 70 72 65 | 73 73 69 6f 6e 73 2c 20 |in expre|ssions, |
|00000d60| 69 6e 20 6f 72 64 65 72 | 20 6f 66 20 64 65 63 72 |in order| of decr|
|00000d70| 65 61 73 69 6e 67 20 70 | 72 65 63 65 64 65 6e 63 |easing p|recedenc|
|00000d80| 65 2e 0a 0a 54 68 65 20 | 75 70 73 68 6f 74 20 6f |e...The |upshot o|
|00000d90| 66 20 61 6c 6c 20 74 68 | 69 73 20 69 73 20 74 68 |f all th|is is th|
|00000da0| 61 74 20 74 68 65 20 73 | 74 72 69 6e 67 73 0a 7b |at the s|trings.{|
|00000db0| 5c 74 74 20 34 32 7d 2c | 20 7b 5c 74 74 20 34 32 |\tt 42},| {\tt 42|
|00000dc0| 2e 7d 2c 0a 7b 5c 74 74 | 20 28 32 30 20 2b 20 32 |.},.{\tt| (20 + 2|
|00000dd0| 32 29 7d 2c 20 61 6e 64 | 20 7b 5c 74 74 20 28 37 |2)}, and| {\tt (7|
|00000de0| 5c 76 65 72 62 21 5e 21 | 32 20 2d 20 37 29 7d 20 |\verb!^!|2 - 7)} |
|00000df0| 6d 65 61 6e 20 74 68 65 | 20 73 61 6d 65 20 74 68 |mean the| same th|
|00000e00| 69 6e 67 0a 74 6f 20 7b | 5c 72 61 79 73 68 61 64 |ing.to {|\rayshad|
|00000e10| 65 7d 2e 0a 0a 56 61 72 | 69 61 62 6c 65 73 20 6d |e}...Var|iables m|
|00000e20| 61 79 20 61 6c 73 6f 20 | 62 65 20 64 65 66 69 6e |ay also |be defin|
|00000e30| 65 64 20 61 6e 64 20 75 | 73 65 64 20 69 6e 20 65 |ed and u|sed in e|
|00000e40| 78 70 72 65 73 73 69 6f | 6e 73 2e 20 20 53 65 76 |xpressio|ns. Sev|
|00000e50| 65 72 61 6c 0a 62 75 69 | 6c 74 2d 69 6e 20 66 75 |eral.bui|lt-in fu|
|00000e60| 6e 63 74 69 6f 6e 73 20 | 61 72 65 20 61 6c 73 6f |nctions |are also|
|00000e70| 20 70 72 6f 76 69 64 65 | 64 2e 20 20 53 65 65 20 | provide|d. See |
|00000e80| 41 70 70 65 6e 64 69 78 | 20 42 20 66 6f 72 20 66 |Appendix| B for f|
|00000e90| 75 72 74 68 65 72 20 64 | 65 74 61 69 6c 73 2e 0a |urther d|etails..|
|00000ea0| 0a 7b 5c 52 61 79 73 68 | 61 64 65 7d 20 77 69 6c |.{\Raysh|ade} wil|
|00000eb0| 6c 20 61 75 74 6f 6d 61 | 74 69 63 61 6c 6c 79 20 |l automa|tically |
|00000ec0| 72 75 6e 20 74 68 65 20 | 69 6e 70 75 74 20 69 74 |run the |input it|
|00000ed0| 20 72 65 63 65 69 76 65 | 73 0a 74 68 72 6f 75 67 | receive|s.throug|
|00000ee0| 68 20 74 68 65 20 43 20 | 70 72 65 70 72 6f 63 65 |h the C |preproce|
|00000ef0| 73 73 6f 72 20 69 66 20 | 69 74 20 69 73 20 61 76 |ssor if |it is av|
|00000f00| 61 69 6c 61 62 6c 65 2e | 20 20 54 68 69 73 0a 61 |ailable.| This.a|
|00000f10| 6c 6c 6f 77 73 20 79 6f | 75 20 74 6f 20 75 73 65 |llows yo|u to use|
|00000f20| 20 43 20 70 72 65 70 72 | 6f 63 65 73 73 6f 72 20 | C prepr|ocessor |
|00000f30| 64 69 72 65 63 74 69 76 | 65 73 2c 20 73 75 63 68 |directiv|es, such|
|00000f40| 20 61 73 20 7b 5c 74 74 | 20 5c 23 69 6e 63 6c 75 | as {\tt| \#inclu|
|00000f50| 64 65 7d 2c 0a 7b 5c 74 | 74 20 5c 23 64 65 66 69 |de},.{\t|t \#defi|
|00000f60| 6e 65 7d 2c 20 61 6e 64 | 20 7b 5c 74 74 20 5c 23 |ne}, and| {\tt \#|
|00000f70| 69 66 64 65 66 7d 20 77 | 68 65 6e 20 64 65 73 69 |ifdef} w|hen desi|
|00000f80| 67 6e 69 6e 67 20 79 6f | 75 72 20 69 6e 70 75 74 |gning yo|ur input|
|00000f90| 20 66 69 6c 65 73 2e 0a | 0a 43 6f 6d 6d 65 6e 74 | files..|.Comment|
|00000fa0| 73 20 6d 61 79 20 62 65 | 20 69 6e 63 6c 75 64 65 |s may be| include|
|00000fb0| 64 20 69 6e 20 7b 5c 72 | 61 79 73 68 61 64 65 7d |d in {\r|ayshade}|
|00000fc0| 20 69 6e 70 75 74 20 66 | 69 6c 65 73 20 62 79 20 | input f|iles by |
|00000fd0| 65 6e 63 6c 6f 73 69 6e | 67 0a 74 65 78 74 20 62 |enclosin|g.text b|
|00000fe0| 65 74 77 65 65 6e 20 74 | 68 65 20 73 74 72 69 6e |etween t|he strin|
|00000ff0| 67 73 20 5c 76 65 72 62 | 21 2f 2a 21 20 61 6e 64 |gs \verb|!/*! and|
|00001000| 20 5c 76 65 72 62 21 2a | 2f 21 2c 20 61 73 20 69 | \verb!*|/!, as i|
|00001010| 6e 20 74 68 65 20 43 0a | 70 72 6f 67 72 61 6d 6d |n the C.|programm|
|00001020| 69 6e 67 0a 6c 61 6e 67 | 75 61 67 65 2e 0a 0a 5c |ing.lang|uage...\|
|00001030| 73 65 63 74 69 6f 6e 7b | 49 6d 61 67 65 73 7d 0a |section{|Images}.|
|00001040| 0a 54 68 65 20 65 6e 64 | 20 72 65 73 75 6c 74 20 |.The end| result |
|00001050| 6f 66 20 72 75 6e 6e 69 | 6e 67 20 7b 5c 72 61 79 |of runni|ng {\ray|
|00001060| 73 68 61 64 65 7d 20 69 | 73 20 61 6e 20 69 6d 61 |shade} i|s an ima|
|00001070| 67 65 20 66 69 6c 65 2e | 20 20 44 65 70 65 6e 64 |ge file.| Depend|
|00001080| 69 6e 67 20 75 70 6f 6e | 0a 68 6f 77 20 69 74 20 |ing upon|.how it |
|00001090| 77 61 73 20 69 6e 73 74 | 61 6c 6c 65 64 2c 20 7b |was inst|alled, {|
|000010a0| 5c 72 61 79 73 68 61 64 | 65 7d 20 77 72 69 74 65 |\rayshad|e} write|
|000010b0| 73 20 69 6d 61 67 65 73 | 20 69 6e 20 65 69 74 68 |s images| in eith|
|000010c0| 65 72 20 74 68 65 20 55 | 74 61 68 20 52 61 73 74 |er the U|tah Rast|
|000010d0| 65 72 0a 7b 5c 65 6d 20 | 52 4c 45 7d 20 66 6f 72 |er.{\em |RLE} for|
|000010e0| 6d 61 74 20 6f 72 20 61 | 20 67 65 6e 65 72 69 63 |mat or a| generic|
|000010f0| 20 62 75 74 20 65 61 73 | 69 6c 79 2d 6d 61 6e 69 | but eas|ily-mani|
|00001100| 70 75 6c 61 74 65 64 20 | 7b 5c 65 6d 20 6d 74 76 |pulated |{\em mtv|
|00001110| 7d 20 66 6f 72 6d 61 74 | 0a 75 73 65 64 20 62 79 |} format|.used by|
|00001120| 20 4d 61 72 6b 20 56 61 | 6e 64 65 57 65 74 74 65 | Mark Va|ndeWette|
|00001130| 72 69 6e 67 20 69 6e 20 | 68 69 73 20 7b 5c 65 6d |ring in |his {\em|
|00001140| 20 6d 74 76 7d 20 72 61 | 79 20 74 72 61 63 65 72 | mtv} ra|y tracer|
|00001150| 2e 20 20 54 68 65 20 7b | 5c 65 6d 20 6d 74 76 7d |. The {|\em mtv}|
|00001160| 0a 66 6f 72 6d 61 74 20 | 63 6f 6e 73 69 73 74 73 |.format |consists|
|00001170| 20 6f 66 20 61 20 68 65 | 61 64 65 72 20 67 69 76 | of a he|ader giv|
|00001180| 69 6e 67 20 74 68 65 20 | 72 65 73 6f 6c 75 74 69 |ing the |resoluti|
|00001190| 6f 6e 20 6f 66 20 74 68 | 65 20 69 6d 61 67 65 20 |on of th|e image |
|000011a0| 66 6f 6c 6c 6f 77 65 64 | 0a 62 79 20 69 6e 74 65 |followed|.by inte|
|000011b0| 72 6c 65 61 76 65 64 20 | 72 65 64 2d 67 72 65 65 |rleaved |red-gree|
|000011c0| 6e 2d 62 6c 75 65 20 76 | 61 6c 75 65 73 20 66 6f |n-blue v|alues fo|
|000011d0| 72 20 65 61 63 68 20 70 | 69 78 65 6c 2e 20 20 54 |r each p|ixel. T|
|000011e0| 68 65 20 7b 5c 65 6d 20 | 52 4c 45 7d 20 66 6f 72 |he {\em |RLE} for|
|000011f0| 6d 61 74 0a 73 75 70 70 | 6f 72 74 73 20 61 6e 20 |mat.supp|orts an |
|00001200| 61 72 62 69 74 72 61 72 | 79 20 6e 75 6d 62 65 72 |arbitrar|y number|
|00001210| 20 6f 66 20 63 6f 6c 6f | 72 20 63 68 61 6e 6e 65 | of colo|r channe|
|00001220| 6c 73 2c 0a 61 6e 20 61 | 6c 70 68 61 20 63 68 61 |ls,.an a|lpha cha|
|00001230| 6e 6e 65 6c 2c 20 63 6f | 6d 6d 65 6e 74 73 2c 20 |nnel, co|mments, |
|00001240| 61 20 68 69 73 74 6f 72 | 79 20 66 69 65 6c 64 2c |a histor|y field,|
|00001250| 20 61 6e 64 20 74 68 65 | 20 61 62 69 6c 69 74 79 | and the| ability|
|00001260| 0a 74 6f 20 74 72 65 61 | 74 20 69 6d 61 67 65 73 |.to trea|t images|
|00001270| 20 61 73 20 77 69 6e 64 | 6f 77 73 20 69 6e 74 6f | as wind|ows into|
|00001280| 20 61 20 6c 61 72 67 65 | 72 20 69 6d 61 67 65 2e | a large|r image.|
|00001290| 20 20 41 73 20 61 20 72 | 65 73 75 6c 74 20 6f 66 | As a r|esult of|
|000012a0| 20 74 68 69 73 0a 66 6c | 65 78 69 62 69 6c 69 74 | this.fl|exibilit|
|000012b0| 79 2c 20 61 20 6e 75 6d | 62 65 72 20 6f 66 20 7b |y, a num|ber of {|
|000012c0| 5c 72 61 79 73 68 61 64 | 65 7d 27 73 20 66 65 61 |\rayshad|e}'s fea|
|000012d0| 74 75 72 65 73 0a 61 72 | 65 20 6e 6f 74 0a 73 75 |tures.ar|e not.su|
|000012e0| 70 70 6f 72 74 65 64 20 | 69 66 20 74 68 65 20 7b |pported |if the {|
|000012f0| 5c 65 6d 20 6d 74 76 7d | 20 66 6f 72 6d 61 74 20 |\em mtv}| format |
|00001300| 69 73 20 62 65 69 6e 67 | 20 75 73 65 64 2e 20 59 |is being| used. Y|
|00001310| 6f 75 20 61 72 65 20 74 | 68 75 73 20 73 74 72 6f |ou are t|hus stro|
|00001320| 6e 67 6c 79 0a 65 6e 63 | 6f 75 72 61 67 65 64 20 |ngly.enc|ouraged |
|00001330| 74 6f 20 6f 62 74 61 69 | 6e 20 61 20 63 6f 70 79 |to obtai|n a copy|
|00001340| 20 6f 66 20 74 68 65 20 | 55 74 61 68 20 52 61 73 | of the |Utah Ras|
|00001350| 74 65 72 20 54 6f 6f 6c | 6b 69 74 2e 0a 0a 49 66 |ter Tool|kit...If|
|00001360| 20 74 68 65 20 7b 5c 65 | 6d 20 6d 74 76 7d 0a 66 | the {\e|m mtv}.f|
|00001370| 6f 72 6d 61 74 20 69 73 | 20 75 73 65 64 2c 20 74 |ormat is| used, t|
|00001380| 68 65 20 69 6d 61 67 65 | 20 77 69 6c 6c 20 28 61 |he image| will (a|
|00001390| 6e 64 20 6d 75 73 74 29 | 20 63 6f 6e 73 69 73 74 |nd must)| consist|
|000013a0| 20 6f 66 20 74 68 72 65 | 65 20 65 69 67 68 74 2d | of thre|e eight-|
|000013b0| 62 69 74 0a 63 6f 6c 6f | 72 20 63 68 61 6e 6e 65 |bit.colo|r channe|
|000013c0| 6c 73 2e 0a 49 66 20 74 | 68 65 20 7b 5c 65 6d 20 |ls..If t|he {\em |
|000013d0| 52 4c 45 7d 20 66 6f 72 | 6d 61 74 20 69 73 20 75 |RLE} for|mat is u|
|000013e0| 73 65 64 2c 20 74 68 65 | 20 69 6d 61 67 65 20 66 |sed, the| image f|
|000013f0| 69 6c 65 20 63 6f 6e 73 | 69 73 74 73 20 6f 66 20 |ile cons|ists of |
|00001400| 74 68 72 65 65 0a 65 69 | 67 68 74 2d 62 69 74 20 |three.ei|ght-bit |
|00001410| 63 6f 6c 6f 72 20 63 68 | 61 6e 6e 65 6c 73 20 70 |color ch|annels p|
|00001420| 6c 75 73 20 61 6e 20 65 | 69 67 68 74 2d 62 69 74 |lus an e|ight-bit|
|00001430| 20 61 6c 70 68 61 20 63 | 68 61 6e 6e 65 6c 2e 20 | alpha c|hannel. |
|00001440| 20 7b 5c 52 61 79 73 68 | 61 64 65 7d 0a 61 6c 73 | {\Raysh|ade}.als|
|00001450| 6f 20 64 6f 63 75 6d 65 | 6e 74 73 20 69 6e 20 74 |o docume|nts in t|
|00001460| 68 65 20 7b 5c 65 6d 20 | 52 4c 45 7d 20 68 65 61 |he {\em |RLE} hea|
|00001470| 64 65 72 20 74 68 65 20 | 63 6f 6d 6d 61 6e 64 20 |der the |command |
|00001480| 6c 69 6e 65 20 61 6e 64 | 20 7b 5c 65 6d 20 67 61 |line and| {\em ga|
|00001490| 6d 6d 61 7d 0a 76 61 6c | 75 65 20 75 73 65 64 20 |mma}.val|ue used |
|000014a0| 69 6e 20 63 72 65 61 74 | 69 6e 67 20 74 68 65 20 |in creat|ing the |
|000014b0| 69 6d 61 67 65 2e 0a 0a | 49 66 20 6d 6f 72 65 20 |image...|If more |
|000014c0| 74 68 61 6e 20 6f 6e 65 | 20 66 72 61 6d 65 20 69 |than one| frame i|
|000014d0| 73 20 72 65 6e 64 65 72 | 65 64 2c 20 74 68 65 20 |s render|ed, the |
|000014e0| 72 65 73 75 6c 74 69 6e | 67 20 69 6d 61 67 65 73 |resultin|g images|
|000014f0| 20 61 72 65 20 61 70 70 | 65 6e 64 65 64 0a 69 6e | are app|ended.in|
|00001500| 20 74 75 72 6e 0a 74 6f | 20 74 68 65 20 69 6d 61 | turn.to| the ima|
|00001510| 67 65 20 66 69 6c 65 2e | 20 20 54 68 65 20 76 61 |ge file.| The va|
|00001520| 72 69 6f 75 73 20 75 74 | 69 6c 69 74 69 65 73 20 |rious ut|ilities |
|00001530| 70 72 6f 76 69 64 65 64 | 20 62 79 20 74 68 65 0a |provided| by the.|
|00001540| 55 74 61 68 20 52 61 73 | 74 65 72 20 54 6f 6f 6c |Utah Ras|ter Tool|
|00001550| 6b 69 74 20 63 61 6e 20 | 62 65 20 75 73 65 64 20 |kit can |be used |
|00001560| 74 6f 20 6d 61 6e 69 70 | 75 6c 61 74 65 20 74 68 |to manip|ulate th|
|00001570| 65 20 72 65 73 75 6c 74 | 69 6e 67 20 60 60 6d 6f |e result|ing ``mo|
|00001580| 76 69 65 27 27 0a 66 69 | 6c 65 73 2e 0a 49 66 20 |vie''.fi|les..If |
|00001590| 74 68 65 20 54 6f 6f 6c | 6b 69 74 20 69 73 20 6e |the Tool|kit is n|
|000015a0| 6f 74 20 62 65 69 6e 67 | 20 75 73 65 64 2c 20 79 |ot being| used, y|
|000015b0| 6f 75 20 77 69 6c 6c 20 | 70 72 6f 62 61 62 6c 79 |ou will |probably|
|000015c0| 20 6e 65 65 64 20 74 6f | 20 77 72 69 74 65 0a 75 | need to| write.u|
|000015d0| 74 69 6c 69 74 79 20 70 | 72 6f 67 72 61 6d 73 20 |tility p|rograms |
|000015e0| 74 6f 20 68 61 6e 64 6c | 65 20 74 68 65 20 64 65 |to handl|e the de|
|000015f0| 63 69 64 65 64 6c 79 20 | 6e 6f 6e 2d 73 74 61 6e |cidedly |non-stan|
|00001600| 64 61 72 64 20 6d 75 6c | 74 69 2d 69 6d 61 67 65 |dard mul|ti-image|
|00001610| 20 7b 5c 65 6d 20 6d 74 | 76 7d 0a 66 6f 72 6d 61 | {\em mt|v}.forma|
|00001620| 74 20 66 69 6c 65 73 2e | 0a 0a 42 79 20 64 65 66 |t files.|..By def|
|00001630| 61 75 6c 74 2c 20 7b 5c | 72 61 79 73 68 61 64 65 |ault, {\|rayshade|
|00001640| 7d 20 77 72 69 74 65 73 | 20 74 68 65 20 63 6f 6d |} writes| the com|
|00001650| 70 75 74 65 64 20 69 6d | 61 67 65 20 74 6f 20 74 |puted im|age to t|
|00001660| 68 65 20 73 74 61 6e 64 | 61 72 64 20 6f 75 74 70 |he stand|ard outp|
|00001670| 75 74 2e 0a 54 68 65 20 | 69 6d 61 67 65 20 66 69 |ut..The |image fi|
|00001680| 6c 65 20 6d 61 79 20 62 | 65 20 77 72 69 74 74 65 |le may b|e writte|
|00001690| 6e 20 74 6f 20 61 20 66 | 69 6c 65 20 69 6e 73 74 |n to a f|ile inst|
|000016a0| 65 61 64 20 62 79 20 73 | 70 65 63 69 66 79 69 6e |ead by s|pecifyin|
|000016b0| 67 20 61 20 66 69 6c 65 | 20 6e 61 6d 65 0a 69 6e |g a file| name.in|
|000016c0| 20 74 68 65 20 69 6e 70 | 75 74 20 73 74 72 65 61 | the inp|ut strea|
|000016d0| 6d 2e 0a 0a 5c 62 65 67 | 69 6e 7b 64 65 66 6b 65 |m...\beg|in{defke|
|000016e0| 79 7d 7b 6f 75 74 66 69 | 6c 65 7d 7b 7b 5c 65 6d |y}{outfi|le}{{\em|
|000016f0| 20 66 69 6c 65 6e 61 6d | 65 7d 7d 0a 09 57 72 69 | filenam|e}}..Wri|
|00001700| 74 65 20 74 68 65 20 63 | 6f 6d 70 75 74 65 64 20 |te the c|omputed |
|00001710| 69 6d 61 67 65 20 74 6f | 20 74 68 65 20 6e 61 6d |image to| the nam|
|00001720| 65 64 20 66 69 6c 65 2e | 0a 5c 65 6e 64 7b 64 65 |ed file.|.\end{de|
|00001730| 66 6b 65 79 7d 0a 54 68 | 65 20 6f 75 74 70 75 74 |fkey}.Th|e output|
|00001740| 20 66 69 6c 65 20 6e 61 | 6d 65 20 6d 61 79 20 61 | file na|me may a|
|00001750| 6c 73 6f 20 62 65 20 73 | 70 65 63 69 66 69 65 64 |lso be s|pecified|
|00001760| 20 6f 6e 20 74 68 65 20 | 63 6f 6d 6d 61 6e 64 20 | on the |command |
|00001770| 6c 69 6e 65 20 62 79 0a | 75 73 69 6e 67 20 74 68 |line by.|using th|
|00001780| 65 20 7b 5c 74 74 20 2d | 4f 7d 20 6f 70 74 69 6f |e {\tt -|O} optio|
|00001790| 6e 2e 0a 0a 54 68 65 20 | 73 69 7a 65 20 6f 66 20 |n...The |size of |
|000017a0| 74 68 65 20 6f 75 74 70 | 75 74 20 69 6d 61 67 65 |the outp|ut image|
|000017b0| 20 69 73 20 6d 65 61 73 | 75 72 65 64 20 69 6e 20 | is meas|ured in |
|000017c0| 70 69 78 65 6c 73 2e 20 | 20 54 68 65 20 7b 5c 65 |pixels. | The {\e|
|000017d0| 6d 20 78 7d 20 73 69 7a | 65 0a 69 73 20 74 68 65 |m x} siz|e.is the|
|000017e0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 70 69 78 65 6c | number |of pixel|
|000017f0| 73 20 6c 65 66 74 2d 74 | 6f 2d 72 69 67 68 74 2c |s left-t|o-right,|
|00001800| 20 77 68 69 6c 65 20 74 | 68 65 20 7b 5c 65 6d 20 | while t|he {\em |
|00001810| 79 7d 20 73 69 7a 65 20 | 69 73 0a 74 68 65 20 6e |y} size |is.the n|
|00001820| 75 6d 62 65 72 20 6f 66 | 20 70 69 78 65 6c 73 20 |umber of| pixels |
|00001830| 62 6f 74 74 6f 6d 2d 74 | 6f 2d 74 6f 70 2e 0a 0a |bottom-t|o-top...|
|00001840| 5c 62 65 67 69 6e 7b 64 | 65 66 6b 65 79 7d 7b 73 |\begin{d|efkey}{s|
|00001850| 63 72 65 65 6e 7d 7b 7b | 5c 65 6d 20 78 73 69 7a |creen}{{|\em xsiz|
|00001860| 65 20 79 73 69 7a 65 7d | 7d 0a 09 55 73 65 20 61 |e ysize}|}..Use a|
|00001870| 20 73 63 72 65 65 6e 20 | 7b 5c 65 6d 20 78 73 69 | screen |{\em xsi|
|00001880| 7a 65 7d 20 70 69 78 65 | 6c 73 20 77 69 64 65 20 |ze} pixe|ls wide |
|00001890| 62 79 20 7b 5c 65 6d 20 | 79 73 69 7a 65 7d 20 70 |by {\em |ysize} p|
|000018a0| 69 78 65 6c 73 20 68 69 | 67 68 2e 0a 5c 65 6e 64 |ixels hi|gh..\end|
|000018b0| 7b 64 65 66 6b 65 79 7d | 0a 54 68 65 20 73 63 72 |{defkey}|.The scr|
|000018c0| 65 65 6e 20 73 69 7a 65 | 20 6d 61 79 20 61 6c 73 |een size| may als|
|000018d0| 6f 20 62 65 20 73 65 74 | 20 6f 6e 20 74 68 65 20 |o be set| on the |
|000018e0| 63 6f 6d 6d 61 6e 64 20 | 6c 69 6e 65 20 74 68 72 |command |line thr|
|000018f0| 6f 75 67 68 0a 74 68 65 | 20 7b 5c 74 74 20 2d 52 |ough.the| {\tt -R|
|00001900| 7d 20 6f 70 74 69 6f 6e | 2e 0a 54 68 65 20 64 65 |} option|..The de|
|00001910| 66 61 75 6c 74 0a 73 63 | 72 65 65 6e 20 73 69 7a |fault.sc|reen siz|
|00001920| 65 20 69 73 20 35 31 32 | 20 62 79 20 35 31 32 20 |e is 512| by 512 |
|00001930| 70 69 78 65 6c 73 2e 0a | 0a 57 68 65 6e 20 72 65 |pixels..|.When re|
|00001940| 6e 64 65 72 69 6e 67 20 | 61 6e 20 69 6d 61 67 65 |ndering |an image|
|00001950| 2c 20 69 74 20 69 73 20 | 6f 66 74 65 6e 20 61 64 |, it is |often ad|
|00001960| 76 61 6e 74 61 67 65 6f | 75 73 20 74 6f 20 73 70 |vantageo|us to sp|
|00001970| 6c 69 74 20 74 68 65 20 | 69 6d 61 67 65 0a 69 6e |lit the |image.in|
|00001980| 74 6f 20 61 20 6e 75 6d | 62 65 72 20 6f 66 20 64 |to a num|ber of d|
|00001990| 69 73 6a 6f 69 6e 74 20 | 77 69 6e 64 6f 77 73 2c |isjoint |windows,|
|000019a0| 20 65 61 63 68 20 6f 66 | 20 77 68 69 63 68 20 69 | each of| which i|
|000019b0| 73 20 72 65 6e 64 65 72 | 65 64 0a 6f 6e 20 61 20 |s render|ed.on a |
|000019c0| 64 69 66 66 65 72 65 6e | 74 20 6d 61 63 68 69 6e |differen|t machin|
|000019d0| 65 2e 20 20 4f 6e 65 20 | 74 68 65 6e 20 63 6f 6d |e. One |then com|
|000019e0| 62 69 6e 65 73 20 74 68 | 65 20 69 6d 61 67 65 73 |bines th|e images|
|000019f0| 20 63 6f 72 72 65 73 70 | 6f 6e 64 69 6e 67 20 74 | corresp|onding t|
|00001a00| 6f 0a 74 68 65 20 77 69 | 6e 64 6f 77 73 20 69 6e |o.the wi|ndows in|
|00001a10| 74 6f 20 61 20 66 69 6e | 61 6c 20 69 6d 61 67 65 |to a fin|al image|
|00001a20| 2e 0a 0a 5c 62 65 67 69 | 6e 7b 64 65 66 6b 65 79 |...\begi|n{defkey|
|00001a30| 7d 7b 77 69 6e 64 6f 77 | 7d 7b 7b 5c 65 6d 20 6d |}{window|}{{\em m|
|00001a40| 69 6e 78 20 6d 61 78 78 | 20 6d 69 6e 79 20 6d 61 |inx maxx| miny ma|
|00001a50| 78 79 7d 7d 0a 09 52 65 | 6e 64 65 72 20 74 68 65 |xy}}..Re|nder the|
|00001a60| 20 69 6d 61 67 65 20 69 | 6e 20 74 68 65 20 67 69 | image i|n the gi|
|00001a70| 76 65 6e 20 77 69 6e 64 | 6f 77 2e 0a 5c 65 6e 64 |ven wind|ow..\end|
|00001a80| 7b 64 65 66 6b 65 79 7d | 0a 54 68 65 20 77 69 6e |{defkey}|.The win|
|00001a90| 64 6f 77 20 6d 75 73 74 | 20 62 65 20 70 72 6f 70 |dow must| be prop|
|00001aa0| 65 72 6c 79 0a 63 6f 6e | 74 61 69 6e 65 64 20 77 |erly.con|tained w|
|00001ab0| 69 74 68 69 6e 20 74 68 | 65 20 73 63 72 65 65 6e |ithin th|e screen|
|00001ac0| 2c 20 69 2e 65 2e 2c 20 | 7b 5c 65 6d 20 6d 69 6e |, i.e., |{\em min|
|00001ad0| 78 7d 20 61 6e 64 20 7b | 5c 65 6d 20 6d 69 6e 79 |x} and {|\em miny|
|00001ae0| 7d 20 6d 75 73 74 0a 62 | 65 20 67 72 65 61 74 65 |} must.b|e greate|
|00001af0| 72 20 74 68 61 6e 20 6f | 72 20 65 71 75 61 6c 20 |r than o|r equal |
|00001b00| 74 6f 20 7a 65 72 6f 2c | 20 77 68 69 6c 65 20 7b |to zero,| while {|
|00001b10| 5c 65 6d 20 6d 61 78 78 | 7d 20 61 6e 64 0a 7b 5c |\em maxx|} and.{\|
|00001b20| 65 6d 20 6d 61 78 79 7d | 20 6d 75 73 74 20 62 65 |em maxy}| must be|
|00001b30| 20 6c 65 73 73 20 74 68 | 61 6e 20 7b 5c 65 6d 20 | less th|an {\em |
|00001b40| 78 73 69 7a 65 7d 20 61 | 6e 64 20 7b 5c 65 6d 20 |xsize} a|nd {\em |
|00001b50| 79 73 69 7a 65 7d 2c 20 | 72 65 73 70 65 63 74 69 |ysize}, |respecti|
|00001b60| 76 65 6c 79 2e 0a 54 68 | 65 20 55 74 61 68 20 52 |vely..Th|e Utah R|
|00001b70| 61 73 74 65 72 20 74 6f | 6f 6c 0a 7b 5c 65 6d 20 |aster to|ol.{\em |
|00001b80| 72 6c 65 63 6f 6d 70 5c | 2f 7d 20 69 73 20 75 73 |rlecomp\|/} is us|
|00001b90| 65 66 75 6c 20 66 6f 72 | 20 72 65 63 6f 6e 73 74 |eful for| reconst|
|00001ba0| 72 75 63 74 69 6e 67 20 | 74 68 65 20 66 75 6c 6c |ructing |the full|
|00001bb0| 20 69 6d 61 67 65 20 66 | 72 6f 6d 0a 73 75 62 2d | image f|rom.sub-|
|00001bc0| 69 6d 61 67 65 73 2e 0a | 42 79 20 64 65 66 61 75 |images..|By defau|
|00001bd0| 6c 74 2c 20 74 68 65 20 | 77 69 6e 64 6f 77 0a 69 |lt, the |window.i|
|00001be0| 73 20 65 71 75 69 76 61 | 6c 65 6e 74 20 74 6f 20 |s equiva|lent to |
|00001bf0| 74 68 65 20 65 6e 74 69 | 72 65 20 73 63 72 65 65 |the enti|re scree|
|00001c00| 6e 2e 0a 0a 49 74 20 69 | 73 20 61 6c 73 6f 20 63 |n...It i|s also c|
|00001c10| 6f 6e 76 65 6e 69 65 6e | 74 20 74 6f 20 62 65 20 |onvenien|t to be |
|00001c20| 61 62 6c 65 20 74 6f 20 | 72 65 6e 64 65 72 20 61 |able to |render a|
|00001c30| 20 73 6d 61 6c 6c 20 70 | 6f 72 74 69 6f 6e 0a 6f | small p|ortion.o|
|00001c40| 66 20 74 68 65 20 77 69 | 6e 64 6f 77 20 62 79 20 |f the wi|ndow by |
|00001c50| 73 70 65 63 69 66 79 69 | 6e 67 20 61 20 73 75 62 |specifyi|ng a sub|
|00001c60| 72 65 67 69 6f 6e 20 75 | 73 69 6e 67 20 6e 6f 72 |region u|sing nor|
|00001c70| 6d 61 6c 69 7a 65 64 20 | 63 6f 6f 72 64 69 6e 61 |malized |coordina|
|00001c80| 74 65 73 2e 0a 0a 5c 62 | 65 67 69 6e 7b 64 65 66 |tes...\b|egin{def|
|00001c90| 6b 65 79 7d 7b 63 72 6f | 70 7d 7b 7b 5c 65 6d 20 |key}{cro|p}{{\em |
|00001ca0| 6c 65 66 74 20 72 69 67 | 68 74 20 62 6f 74 74 6f |left rig|ht botto|
|00001cb0| 6d 20 74 6f 70 7d 7d 0a | 09 43 72 6f 70 20 74 68 |m top}}.|.Crop th|
|00001cc0| 65 20 72 65 6e 64 65 72 | 69 6e 67 20 77 69 6e 64 |e render|ing wind|
|00001cd0| 6f 77 2e 0a 5c 65 6e 64 | 7b 64 65 66 6b 65 79 7d |ow..\end|{defkey}|
|00001ce0| 0a 54 68 65 20 72 65 6e | 64 65 72 69 6e 67 20 77 |.The ren|dering w|
|00001cf0| 69 6e 64 6f 77 20 69 73 | 20 63 72 6f 70 70 65 64 |indow is| cropped|
|00001d00| 20 62 79 20 72 65 6e 64 | 65 72 69 6e 67 20 74 68 | by rend|ering th|
|00001d10| 65 20 73 63 72 65 65 6e | 0a 61 72 65 61 20 74 68 |e screen|.area th|
|00001d20| 61 74 20 66 61 6c 6c 73 | 20 77 69 74 68 69 6e 20 |at falls| within |
|00001d30| 24 6d 69 6e 78 20 2b 20 | 6c 65 66 74 28 6d 61 78 |$minx + |left(max|
|00001d40| 78 20 2d 20 6d 69 6e 78 | 29 24 20 61 6e 64 0a 24 |x - minx|)$ and.$|
|00001d50| 6d 69 6e 78 20 2b 20 72 | 69 67 68 74 28 6d 61 78 |minx + r|ight(max|
|00001d60| 78 20 2d 20 6d 69 6e 78 | 29 24 20 69 6e 20 74 68 |x - minx|)$ in th|
|00001d70| 65 20 24 58 24 20 64 69 | 72 65 63 74 69 6f 6e 2c |e $X$ di|rection,|
|00001d80| 20 61 6e 64 20 73 69 6d | 69 6c 61 72 6c 79 0a 66 | and sim|ilarly.f|
|00001d90| 6f 72 20 74 68 65 20 24 | 59 24 20 64 69 72 65 63 |or the $|Y$ direc|
|00001da0| 74 69 6f 6e 2e 0a 7b 5c | 65 6d 20 4c 65 66 74 7d |tion..{\|em Left}|
|00001db0| 20 61 6e 64 20 7b 5c 65 | 6d 20 62 6f 74 74 6f 6d | and {\e|m bottom|
|00001dc0| 7d 20 6d 75 73 74 20 62 | 65 20 67 72 65 61 74 65 |} must b|e greate|
|00001dd0| 72 20 74 68 61 6e 20 6f | 72 20 65 71 75 61 6c 20 |r than o|r equal |
|00001de0| 74 6f 20 7a 65 72 6f 2e | 0a 7b 5c 65 6d 20 52 69 |to zero.|.{\em Ri|
|00001df0| 67 68 74 7d 20 61 6e 64 | 20 7b 5c 65 6d 20 74 6f |ght} and| {\em to|
|00001e00| 70 7d 20 6d 75 73 74 20 | 62 65 20 6c 65 73 73 20 |p} must |be less |
|00001e10| 74 68 61 6e 20 6f 72 20 | 65 71 75 61 6c 20 74 6f |than or |equal to|
|00001e20| 20 6f 6e 65 2e 0a 49 66 | 20 7b 5c 65 6d 20 6c 65 | one..If| {\em le|
|00001e30| 66 74 7d 20 69 73 20 67 | 72 65 61 74 65 72 20 74 |ft} is g|reater t|
|00001e40| 68 61 6e 20 7b 5c 65 6d | 20 72 69 67 68 74 7d 2c |han {\em| right},|
|00001e50| 20 74 68 65 20 74 77 6f | 20 76 61 6c 75 65 73 20 | the two| values |
|00001e60| 61 72 65 0a 73 77 61 70 | 70 65 64 2c 20 61 6e 64 |are.swap|ped, and|
|00001e70| 20 73 69 6d 69 6c 61 72 | 6c 79 20 66 6f 72 20 7b | similar|ly for {|
|00001e80| 5c 65 6d 20 62 6f 74 74 | 6f 6d 7d 20 61 6e 64 20 |\em bott|om} and |
|00001e90| 7b 5c 65 6d 20 74 6f 70 | 7d 2e 0a 0a 54 68 65 20 |{\em top|}...The |
|00001ea0| 52 61 6e 67 65 20 4d 61 | 70 20 6f 72 20 7b 5c 65 |Range Ma|p or {\e|
|00001eb0| 6d 20 5a 20 42 75 66 66 | 65 72 7d 20 6f 75 74 70 |m Z Buff|er} outp|
|00001ec0| 75 74 20 66 69 6c 65 20 | 28 73 65 65 20 41 70 70 |ut file |(see App|
|00001ed0| 65 6e 64 69 78 20 44 29 | 20 77 69 6c 6c 20 61 6c |endix D)| will al|
|00001ee0| 73 6f 20 6f 62 65 79 0a | 74 68 65 20 7b 5c 74 74 |so obey.|the {\tt|
|00001ef0| 20 73 63 72 65 65 6e 7d | 2c 20 7b 5c 74 74 20 77 | screen}|, {\tt w|
|00001f00| 69 6e 64 6f 77 7d 20 61 | 6e 64 20 7b 5c 74 74 20 |indow} a|nd {\tt |
|00001f10| 63 72 6f 70 7d 20 63 6f | 6d 6d 61 6e 64 73 2e 20 |crop} co|mmands. |
|00001f20| 20 0a 0a 7b 5c 65 6d 20 | 47 61 6d 6d 61 20 63 6f | ..{\em |Gamma co|
|00001f30| 72 72 65 63 74 69 6f 6e | 7d 20 6d 61 79 20 61 6c |rrection|} may al|
|00001f40| 73 6f 20 62 65 20 61 70 | 70 6c 69 65 64 20 74 6f |so be ap|plied to|
|00001f50| 20 74 68 65 20 74 68 72 | 65 65 20 6f 75 74 70 75 | the thr|ee outpu|
|00001f60| 74 20 63 6f 6c 6f 72 0a | 63 68 61 6e 6e 65 6c 73 |t color.|channels|
|00001f70| 2e 20 20 53 65 65 20 41 | 70 70 65 6e 64 69 78 20 |. See A|ppendix |
|00001f80| 41 20 66 6f 72 20 6d 6f | 72 65 20 64 65 74 61 69 |A for mo|re detai|
|00001f90| 6c 73 2e 0a 0a 5c 73 65 | 63 74 69 6f 6e 7b 53 74 |ls...\se|ction{St|
|00001fa0| 61 74 69 73 74 69 63 73 | 20 52 65 70 6f 72 74 69 |atistics| Reporti|
|00001fb0| 6e 67 7d 0a 0a 41 73 20 | 69 74 20 69 73 20 77 6f |ng}..As |it is wo|
|00001fc0| 72 6b 69 6e 67 2c 20 7b | 5c 72 61 79 73 68 61 64 |rking, {|\rayshad|
|00001fd0| 65 7d 20 69 6e 66 6f 72 | 6d 73 20 79 6f 75 20 6f |e} infor|ms you o|
|00001fe0| 66 20 69 74 73 20 70 72 | 6f 67 72 65 73 73 20 62 |f its pr|ogress b|
|00001ff0| 79 20 77 72 69 74 69 6e | 67 0a 6d 65 73 73 61 67 |y writin|g.messag|
|00002000| 65 73 20 74 6f 20 61 20 | 60 60 72 65 70 6f 72 74 |es to a |``report|
|00002010| 20 66 69 6c 65 27 27 2e | 20 20 42 79 20 64 65 66 | file''.| By def|
|00002020| 61 75 6c 74 2c 20 74 68 | 65 20 72 65 70 6f 72 74 |ault, th|e report|
|00002030| 20 66 69 6c 65 20 69 73 | 20 74 68 65 0a 73 74 61 | file is| the.sta|
|00002040| 6e 64 61 72 64 20 65 72 | 72 6f 72 2e 20 20 54 68 |ndard er|ror. Th|
|00002050| 65 20 72 65 70 6f 72 74 | 20 69 74 73 65 6c 66 20 |e report| itself |
|00002060| 63 6f 6e 73 69 73 74 73 | 20 6f 66 20 61 20 6e 75 |consists| of a nu|
|00002070| 6d 62 65 72 20 6f 66 0a | 70 72 6f 67 72 65 73 73 |mber of.|progress|
|00002080| 20 72 65 70 6f 72 74 20 | 6c 69 6e 65 73 20 63 6f | report |lines co|
|00002090| 6e 73 69 73 74 69 6e 67 | 20 6f 66 20 74 68 65 20 |nsisting| of the |
|000020a0| 6e 75 6d 62 65 72 20 6f | 66 20 65 79 65 20 72 61 |number o|f eye ra|
|000020b0| 79 73 20 74 72 61 63 65 | 64 2c 0a 74 68 65 20 74 |ys trace|d,.the t|
|000020c0| 6f 74 61 6c 20 65 6c 61 | 70 73 65 64 20 74 69 6d |otal ela|psed tim|
|000020d0| 65 2c 20 61 6e 64 20 74 | 68 65 20 65 6c 61 70 73 |e, and t|he elaps|
|000020e0| 65 64 20 74 69 6d 65 20 | 73 69 6e 63 65 20 74 68 |ed time |since th|
|000020f0| 65 20 6c 61 73 74 20 70 | 72 6f 67 72 65 73 73 20 |e last p|rogress |
|00002100| 72 65 70 6f 72 74 2e 0a | 54 68 65 20 65 6e 64 20 |report..|The end |
|00002110| 6f 66 20 74 68 65 20 72 | 65 70 6f 72 74 20 63 6f |of the r|eport co|
|00002120| 6e 74 61 69 6e 73 20 64 | 65 74 61 69 6c 65 64 20 |ntains d|etailed |
|00002130| 73 74 61 74 69 73 74 69 | 63 73 20 61 62 6f 75 74 |statisti|cs about|
|00002140| 20 69 6e 74 65 72 73 65 | 63 74 69 6f 6e 0a 74 65 | interse|ction.te|
|00002150| 73 74 73 20 70 65 72 66 | 6f 72 6d 65 64 2c 20 74 |sts perf|ormed, t|
|00002160| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 72 61 79 |he numbe|r of ray|
|00002170| 73 20 74 72 61 63 65 64 | 2c 20 61 6e 64 20 74 68 |s traced|, and th|
|00002180| 65 20 6c 69 6b 65 2e 0a | 0a 5c 62 65 67 69 6e 7b |e like..|.\begin{|
|00002190| 64 65 66 6b 65 79 7d 7b | 72 65 70 6f 72 74 7d 7b |defkey}{|report}{|
|000021a0| 5b 7b 5c 74 74 20 76 65 | 72 62 6f 73 65 7d 5d 20 |[{\tt ve|rbose}] |
|000021b0| 5b 7b 5c 74 74 20 71 75 | 69 65 74 7d 5d 20 5b 7b |[{\tt qu|iet}] [{|
|000021c0| 5c 65 6d 20 66 72 65 71 | 7d 5d 20 5b 7b 5c 65 6d |\em freq|}] [{\em|
|000021d0| 20 66 69 6c 65 7d 5d 7d | 0a 09 53 70 65 63 69 66 | file}]}|..Specif|
|000021e0| 79 20 74 68 65 20 6b 69 | 6e 64 20 6f 66 0a 09 69 |y the ki|nd of..i|
|000021f0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 69 6e 63 6c 75 |nformati|on inclu|
|00002200| 64 65 64 20 69 6e 20 74 | 68 65 20 72 65 70 6f 72 |ded in t|he repor|
|00002210| 74 20 61 6e 64 20 74 6f | 20 77 68 69 63 68 0a 09 |t and to| which..|
|00002220| 66 69 6c 65 20 69 74 20 | 73 68 6f 75 6c 64 20 62 |file it |should b|
|00002230| 65 20 77 72 69 74 74 65 | 6e 2e 0a 09 49 66 20 7b |e writte|n...If {|
|00002240| 5c 74 74 20 76 65 72 62 | 6f 73 65 7d 20 69 73 20 |\tt verb|ose} is |
|00002250| 73 70 65 63 69 66 69 65 | 64 2c 20 74 68 65 0a 09 |specifie|d, the..|
|00002260| 72 65 70 6f 72 74 20 77 | 69 6c 6c 20 61 6c 73 6f |report w|ill also|
|00002270| 20 69 6e 63 6c 75 64 65 | 20 61 20 6c 69 73 74 69 | include| a listi|
|00002280| 6e 67 20 6f 66 20 74 68 | 65 20 6f 70 74 69 6f 6e |ng of th|e option|
|00002290| 73 20 73 65 6c 65 63 74 | 65 64 2c 0a 09 74 68 65 |s select|ed,..the|
|000022a0| 20 0a 09 62 6f 75 6e 64 | 69 6e 67 20 76 6f 6c 75 | ..bound|ing volu|
|000022b0| 6d 65 73 20 6f 66 20 65 | 61 63 68 20 61 67 67 72 |mes of e|ach aggr|
|000022c0| 65 67 61 74 65 2c 0a 09 | 61 6e 64 20 74 68 65 20 |egate,..|and the |
|000022d0| 74 6f 74 61 6c 20 6e 75 | 6d 62 65 72 20 6f 66 20 |total nu|mber of |
|000022e0| 70 72 69 6d 69 74 69 76 | 65 73 20 69 6e 20 65 61 |primitiv|es in ea|
|000022f0| 63 68 20 61 67 67 72 65 | 67 61 74 65 2e 0a 09 7b |ch aggre|gate...{|
|00002300| 5c 74 74 20 71 75 69 65 | 74 7d 20 63 61 75 73 65 |\tt quie|t} cause|
|00002310| 73 20 77 61 72 6e 69 6e | 67 0a 09 6d 65 73 73 61 |s warnin|g..messa|
|00002320| 67 65 73 20 74 6f 20 62 | 65 20 73 75 70 70 72 65 |ges to b|e suppre|
|00002330| 73 73 65 64 2e 20 20 7b | 5c 65 6d 20 66 72 65 71 |ssed. {|\em freq|
|00002340| 7d 20 73 70 65 63 69 66 | 69 65 73 20 74 68 65 20 |} specif|ies the |
|00002350| 66 72 65 71 75 65 6e 63 | 79 2c 0a 09 69 6e 20 73 |frequenc|y,..in s|
|00002360| 63 61 6e 6c 69 6e 65 73 | 20 72 65 6e 64 65 72 65 |canlines| rendere|
|00002370| 64 2c 20 74 68 61 74 20 | 70 72 6f 67 72 65 73 73 |d, that |progress|
|00002380| 20 72 65 70 6f 72 74 73 | 20 61 72 65 20 6d 61 64 | reports| are mad|
|00002390| 65 2e 0a 09 49 66 20 67 | 69 76 65 6e 2c 20 7b 5c |e...If g|iven, {\|
|000023a0| 65 6d 20 66 69 6c 65 7d | 20 6e 61 6d 65 73 20 61 |em file}| names a|
|000023b0| 20 66 69 6c 65 20 74 6f | 20 77 68 69 63 68 20 74 | file to| which t|
|000023c0| 68 65 20 72 65 70 6f 72 | 74 0a 09 77 69 6c 6c 20 |he repor|t..will |
|000023d0| 62 65 20 77 72 69 74 74 | 65 6e 2e 0a 5c 65 6e 64 |be writt|en..\end|
|000023e0| 7b 64 65 66 6b 65 79 7d | 0a 42 79 20 64 65 66 61 |{defkey}|.By defa|
|000023f0| 75 6c 74 2c 20 61 20 6e | 6f 6e 2d 76 65 72 62 6f |ult, a n|on-verbo|
|00002400| 73 65 2c 20 6e 6f 6e 2d | 71 75 69 65 74 20 72 65 |se, non-|quiet re|
|00002410| 70 6f 72 74 20 69 73 20 | 0a 77 72 69 74 74 65 6e |port is |.written|
|00002420| 20 74 6f 20 74 68 65 20 | 73 74 61 6e 64 61 72 64 | to the |standard|
|00002430| 20 65 72 72 6f 72 20 6f | 6e 63 65 20 65 76 65 72 | error o|nce ever|
|00002440| 79 20 31 30 20 6c 69 6e | 65 73 2e 0a 54 68 65 20 |y 10 lin|es..The |
|00002450| 7b 5c 74 74 20 2d 56 7d | 20 6f 70 74 69 6f 6e 20 |{\tt -V}| option |
|00002460| 6d 61 79 20 61 6c 73 6f | 20 62 65 20 75 73 65 64 |may also| be used|
|00002470| 20 74 6f 20 64 69 72 65 | 63 74 20 74 68 65 20 72 | to dire|ct the r|
|00002480| 65 70 6f 72 74 20 74 6f | 20 61 20 6e 61 6d 65 64 |eport to| a named|
|00002490| 20 66 69 6c 65 2e 0a 0a | 5c 73 65 63 74 69 6f 6e | file...|\section|
|000024a0| 7b 41 6e 74 69 61 6c 69 | 61 73 69 6e 67 7d 0a 0a |{Antiali|asing}..|
|000024b0| 47 69 76 65 6e 20 61 20 | 73 63 72 65 65 6e 20 6f |Given a |screen o|
|000024c0| 66 20 61 20 66 69 78 65 | 64 20 73 69 7a 65 2c 20 |f a fixe|d size, |
|000024d0| 63 72 65 61 74 69 6e 67 | 20 61 6e 20 69 6d 61 67 |creating| an imag|
|000024e0| 65 20 69 73 20 61 63 63 | 6f 6d 70 6c 69 73 68 65 |e is acc|omplishe|
|000024f0| 64 20 62 79 0a 73 61 6d | 70 6c 69 6e 67 20 65 61 |d by.sam|pling ea|
|00002500| 63 68 20 70 69 78 65 6c | 20 6f 6e 65 20 6f 72 20 |ch pixel| one or |
|00002510| 6d 6f 72 65 20 74 69 6d | 65 73 20 69 6e 20 6f 72 |more tim|es in or|
|00002520| 64 65 72 20 74 6f 20 64 | 65 74 65 72 6d 69 6e 65 |der to d|etermine|
|00002530| 20 77 68 61 74 20 63 61 | 6e 0a 62 65 20 73 65 65 | what ca|n.be see|
|00002540| 6e 20 60 60 74 68 72 6f | 75 67 68 27 27 20 74 68 |n ``thro|ugh'' th|
|00002550| 61 74 20 70 69 78 65 6c | 20 62 79 20 74 68 65 20 |at pixel| by the |
|00002560| 63 61 6d 65 72 61 2e 20 | 20 41 20 70 69 78 65 6c |camera. | A pixel|
|00002570| 20 74 68 75 73 20 63 6f | 76 65 72 73 0a 61 20 73 | thus co|vers.a s|
|00002580| 71 75 61 72 65 20 61 72 | 65 61 20 6f 66 20 74 68 |quare ar|ea of th|
|00002590| 65 20 69 6d 61 67 65 20 | 70 6c 61 6e 65 2c 20 6e |e image |plane, n|
|000025a0| 6f 74 20 6a 75 73 74 20 | 61 20 73 69 6e 67 6c 65 |ot just |a single|
|000025b0| 20 70 6f 69 6e 74 2e 0a | 0a 49 66 20 61 20 70 69 | point..|.If a pi|
|000025c0| 78 65 6c 20 69 73 20 6e | 6f 74 20 73 61 6d 70 6c |xel is n|ot sampl|
|000025d0| 65 64 20 61 74 20 74 68 | 65 20 70 72 6f 70 65 72 |ed at th|e proper|
|000025e0| 20 72 61 74 65 2c 20 61 | 6c 69 61 73 69 6e 67 20 | rate, a|liasing |
|000025f0| 77 69 6c 6c 20 72 65 73 | 75 6c 74 2e 0a 41 6c 69 |will res|ult..Ali|
|00002600| 61 73 69 6e 67 20 75 73 | 75 61 6c 6c 79 20 61 70 |asing us|ually ap|
|00002610| 70 65 61 72 73 20 61 73 | 20 60 60 6a 61 67 67 69 |pears as| ``jaggi|
|00002620| 65 73 27 27 20 6f 72 20 | 60 60 73 74 61 69 72 20 |es'' or |``stair |
|00002630| 73 74 65 70 73 27 27 20 | 69 6e 20 74 68 65 20 69 |steps'' |in the i|
|00002640| 6d 61 67 65 2e 0a 49 6e | 20 6f 72 64 65 72 20 74 |mage..In| order t|
|00002650| 6f 20 72 65 64 75 63 65 | 20 74 68 65 73 65 20 61 |o reduce| these a|
|00002660| 6e 64 20 6f 74 68 65 72 | 20 61 72 74 69 66 61 63 |nd other| artifac|
|00002670| 74 73 2c 20 7b 5c 72 61 | 79 73 68 61 64 65 7d 20 |ts, {\ra|yshade} |
|00002680| 70 72 6f 76 69 64 65 73 | 0a 61 6e 20 61 64 61 70 |provides|.an adap|
|00002690| 74 69 76 65 20 6a 69 74 | 74 65 72 65 64 20 61 6e |tive jit|tered an|
|000026a0| 74 69 61 6c 69 61 73 69 | 6e 67 20 73 63 68 65 6d |tialiasi|ng schem|
|000026b0| 65 20 74 68 61 74 20 61 | 74 74 65 6d 70 74 73 20 |e that a|ttempts |
|000026c0| 74 6f 20 64 65 74 65 63 | 74 20 77 68 65 72 65 0a |to detec|t where.|
|000026d0| 69 6e 63 72 65 61 73 65 | 64 20 73 61 6d 70 6c 69 |increase|d sampli|
|000026e0| 6e 67 20 72 61 74 65 73 | 20 61 72 65 20 6e 65 65 |ng rates| are nee|
|000026f0| 64 65 64 2e 0a 49 6e 20 | 6a 69 74 74 65 72 65 64 |ded..In |jittered|
|00002700| 20 73 61 6d 70 6c 69 6e | 67 2c 20 74 68 65 20 6c | samplin|g, the l|
|00002710| 6f 63 61 74 69 6f 6e 20 | 61 74 20 77 68 69 63 68 |ocation |at which|
|00002720| 20 61 20 73 61 6d 70 6c | 65 20 69 73 20 74 61 6b | a sampl|e is tak|
|00002730| 65 6e 20 69 73 0a 70 65 | 72 74 75 72 62 65 64 20 |en is.pe|rturbed |
|00002740| 62 79 20 61 20 72 61 6e | 64 6f 6d 20 61 6d 6f 75 |by a ran|dom amou|
|00002750| 6e 74 2e 20 20 54 68 69 | 73 20 70 65 72 74 75 72 |nt. Thi|s pertur|
|00002760| 62 61 74 69 6f 6e 20 72 | 65 64 75 63 65 73 20 61 |bation r|educes a|
|00002770| 6c 69 61 73 69 6e 67 0a | 62 75 74 20 61 64 64 73 |liasing.|but adds|
|00002780| 20 6e 6f 69 73 65 20 74 | 6f 20 74 68 65 20 69 6d | noise t|o the im|
|00002790| 61 67 65 2e 20 20 41 70 | 70 65 6e 64 69 78 20 42 |age. Ap|pendix B|
|000027a0| 20 64 65 73 63 72 69 62 | 65 73 20 68 6f 77 20 6a | describ|es how j|
|000027b0| 69 74 74 65 72 65 64 0a | 74 69 6d 65 20 73 61 6d |ittered.|time sam|
|000027c0| 70 6c 69 6e 67 20 69 73 | 20 69 6d 70 6c 65 6d 65 |pling is| impleme|
|000027d0| 6e 74 65 64 20 69 6e 20 | 7b 5c 72 61 79 73 68 61 |nted in |{\raysha|
|000027e0| 64 65 7d 2e 0a 0a 54 68 | 65 20 61 64 61 70 74 69 |de}...Th|e adapti|
|000027f0| 76 65 20 73 61 6d 70 6c | 69 6e 67 20 73 63 68 65 |ve sampl|ing sche|
|00002800| 6d 65 20 69 6d 70 6c 65 | 6d 65 6e 74 65 64 20 69 |me imple|mented i|
|00002810| 6e 20 7b 5c 72 61 79 73 | 68 61 64 65 7d 20 62 65 |n {\rays|hade} be|
|00002820| 67 69 6e 73 0a 62 79 20 | 73 61 6d 70 6c 69 6e 67 |gins.by |sampling|
|00002830| 20 65 61 63 68 20 70 69 | 78 65 6c 20 6f 6e 20 74 | each pi|xel on t|
|00002840| 68 65 20 63 75 72 72 65 | 6e 74 20 73 63 61 6e 6c |he curre|nt scanl|
|00002850| 69 6e 65 20 6f 6e 63 65 | 2e 0a 46 6f 72 20 65 61 |ine once|..For ea|
|00002860| 63 68 20 70 69 78 65 6c | 20 6f 6e 20 74 68 65 20 |ch pixel| on the |
|00002870| 73 63 61 6e 6c 69 6e 65 | 2c 20 74 68 65 20 63 6f |scanline|, the co|
|00002880| 6e 74 72 61 73 74 20 62 | 65 74 77 65 65 6e 20 69 |ntrast b|etween i|
|00002890| 74 20 61 6e 64 20 69 74 | 73 0a 66 6f 75 72 20 69 |t and it|s.four i|
|000028a0| 6d 6d 65 64 69 61 74 65 | 20 6e 65 69 67 68 62 6f |mmediate| neighbo|
|000028b0| 72 73 20 69 73 20 63 6f | 6d 70 75 74 65 64 2e 20 |rs is co|mputed. |
|000028c0| 20 49 66 20 74 68 69 73 | 20 63 6f 6e 74 72 61 73 | If this| contras|
|000028d0| 74 20 69 73 20 67 72 65 | 61 74 65 72 0a 74 68 61 |t is gre|ater.tha|
|000028e0| 6e 20 61 20 75 73 65 72 | 2d 73 70 65 63 69 66 69 |n a user|-specifi|
|000028f0| 65 64 20 6d 61 78 69 6d | 75 6d 20 69 6e 20 61 6e |ed maxim|um in an|
|00002900| 79 20 63 6f 6c 6f 72 20 | 63 68 61 6e 6e 65 6c 2c |y color |channel,|
|00002910| 0a 74 68 65 20 70 69 78 | 65 6c 20 61 6e 64 20 69 |.the pix|el and i|
|00002920| 74 73 0a 6e 65 69 67 68 | 62 6f 72 73 20 61 72 65 |ts.neigh|bors are|
|00002930| 20 61 6c 6c 20 73 75 70 | 65 72 73 61 6d 70 6c 65 | all sup|ersample|
|00002940| 64 20 62 79 20 66 69 72 | 69 6e 67 20 61 6e 20 61 |d by fir|ing an a|
|00002950| 64 64 69 74 69 6f 6e 61 | 6c 0a 7b 24 6e 75 6d 73 |dditiona|l.{$nums|
|00002960| 61 6d 70 6c 65 73 5e 32 | 20 2d 31 24 7d 20 72 61 |amples^2| -1$} ra|
|00002970| 79 73 20 74 68 72 6f 75 | 67 68 20 74 68 6f 73 65 |ys throu|gh those|
|00002980| 20 70 69 78 65 6c 73 20 | 74 68 61 74 20 68 61 76 | pixels |that hav|
|00002990| 65 20 6e 6f 74 20 61 6c | 72 65 61 64 79 20 62 65 |e not al|ready be|
|000029a0| 65 6e 0a 73 75 70 65 72 | 73 61 6d 70 6c 65 64 2e |en.super|sampled.|
|000029b0| 20 20 54 68 69 73 20 70 | 72 6f 63 65 73 73 20 69 | This p|rocess i|
|000029c0| 73 20 72 65 70 65 61 74 | 65 64 20 66 6f 72 20 74 |s repeat|ed for t|
|000029d0| 68 65 20 63 75 72 72 65 | 6e 74 20 73 63 61 6e 6c |he curre|nt scanl|
|000029e0| 69 6e 65 0a 75 6e 74 69 | 6c 20 61 20 70 61 73 73 |ine.unti|l a pass|
|000029f0| 20 69 73 20 6d 61 64 65 | 20 77 69 74 68 6f 75 74 | is made| without|
|00002a00| 20 61 6e 79 0a 70 69 78 | 65 6c 20 62 65 69 6e 67 | any.pix|el being|
|00002a10| 20 73 75 70 65 72 73 61 | 6d 70 6c 65 64 2e 0a 0a | supersa|mpled...|
|00002a20| 5c 62 65 67 69 6e 7b 64 | 65 66 6b 65 79 7d 7b 63 |\begin{d|efkey}{c|
|00002a30| 6f 6e 74 72 61 73 74 7d | 7b 7b 5c 65 6d 20 72 65 |ontrast}|{{\em re|
|00002a40| 64 63 6f 6e 74 20 67 72 | 65 65 6e 63 6f 6e 74 20 |dcont gr|eencont |
|00002a50| 62 6c 75 65 63 6f 6e 74 | 7d 7d 0a 09 53 65 74 20 |bluecont|}}..Set |
|00002a60| 74 68 65 20 6d 61 78 69 | 6d 75 6d 20 61 6c 6c 6f |the maxi|mum allo|
|00002a70| 77 65 64 20 63 6f 6e 74 | 72 61 73 74 20 62 65 74 |wed cont|rast bet|
|00002a80| 77 65 65 6e 20 66 6f 75 | 72 20 63 6f 6c 6f 72 0a |ween fou|r color.|
|00002a90| 09 73 61 6d 70 6c 65 73 | 20 77 68 65 6e 20 61 64 |.samples| when ad|
|00002aa0| 61 70 74 69 76 65 20 73 | 75 70 65 72 73 61 6d 70 |aptive s|upersamp|
|00002ab0| 6c 69 6e 67 20 69 73 20 | 75 73 65 64 2e 0a 09 54 |ling is |used...T|
|00002ac0| 68 65 20 63 6f 6e 74 72 | 61 73 74 20 74 65 73 74 |he contr|ast test|
|00002ad0| 20 69 73 20 61 70 70 6c | 69 65 64 20 74 6f 20 65 | is appl|ied to e|
|00002ae0| 61 63 68 20 63 6f 6c 6f | 72 0a 09 63 68 61 6e 6e |ach colo|r..chann|
|00002af0| 65 6c 20 73 65 70 61 72 | 61 74 65 6c 79 2e 0a 5c |el separ|ately..\|
|00002b00| 65 6e 64 7b 64 65 66 6b | 65 79 7d 0a 54 68 65 20 |end{defk|ey}.The |
|00002b10| 64 65 66 61 75 6c 74 20 | 6d 61 78 69 6d 75 6d 20 |default |maximum |
|00002b20| 63 6f 6e 74 72 61 73 74 | 20 76 61 6c 75 65 73 20 |contrast| values |
|00002b30| 66 6f 72 20 74 68 65 20 | 72 65 64 2c 20 67 72 65 |for the |red, gre|
|00002b40| 65 6e 2c 20 61 6e 64 20 | 62 6c 75 65 0a 63 68 61 |en, and |blue.cha|
|00002b50| 6e 6e 65 6c 73 20 61 72 | 65 20 30 2e 32 35 2c 20 |nnels ar|e 0.25, |
|00002b60| 30 2e 32 2c 20 61 6e 64 | 20 30 2e 34 2c 20 72 65 |0.2, and| 0.4, re|
|00002b70| 73 70 65 63 74 69 76 65 | 6c 79 2e 0a 0a 5c 62 65 |spective|ly...\be|
|00002b80| 67 69 6e 7b 64 65 66 6b | 65 79 7d 7b 73 61 6d 70 |gin{defk|ey}{samp|
|00002b90| 6c 65 7d 7b 7b 5c 65 6d | 20 6e 7d 20 5b 7b 5c 74 |le}{{\em| n} [{\t|
|00002ba0| 74 20 6e 6f 6a 69 74 74 | 65 72 7d 5d 7d 0a 09 55 |t nojitt|er}]}..U|
|00002bb0| 73 65 20 24 6e 5e 7b 32 | 7d 20 24 20 73 61 6d 70 |se $n^{2|} $ samp|
|00002bc0| 6c 65 73 20 77 68 65 6e | 20 70 65 72 66 6f 72 6d |les when| perform|
|00002bd0| 69 6e 67 20 6a 69 74 74 | 65 72 65 64 0a 09 73 61 |ing jitt|ered..sa|
|00002be0| 6d 70 6c 69 6e 67 2e 20 | 20 54 68 65 20 6d 61 78 |mpling. | The max|
|00002bf0| 69 6d 75 6d 20 6c 65 67 | 61 6c 20 76 61 6c 75 65 |imum leg|al value|
|00002c00| 20 69 73 20 35 2e 0a 09 | 49 66 20 7b 5c 74 74 20 | is 5...|If {\tt |
|00002c10| 6e 6f 6a 69 74 74 65 72 | 7d 20 69 73 20 73 70 65 |nojitter|} is spe|
|00002c20| 63 69 66 69 65 64 2c 20 | 73 61 6d 70 6c 65 20 6c |cified, |sample l|
|00002c30| 6f 63 61 74 69 6f 6e 73 | 0a 09 61 6e 64 20 74 69 |ocations|..and ti|
|00002c40| 6d 65 73 20 77 69 6c 6c | 20 6e 6f 74 20 62 65 20 |mes will| not be |
|00002c50| 6a 69 74 74 65 72 65 64 | 2e 0a 5c 65 6e 64 7b 64 |jittered|..\end{d|
|00002c60| 65 66 6b 65 79 7d 0a 42 | 79 20 64 65 66 61 75 6c |efkey}.B|y defaul|
|00002c70| 74 2c 20 24 33 5e 7b 32 | 7d 24 20 6a 69 74 74 65 |t, $3^{2|}$ jitte|
|00002c80| 72 65 64 20 73 61 6d 70 | 6c 65 73 20 61 72 65 20 |red samp|les are |
|00002c90| 74 61 6b 65 6e 2e 0a 0a | 41 20 67 69 76 65 6e 20 |taken...|A given |
|00002ca0| 73 65 74 20 6f 66 20 73 | 61 6d 70 6c 65 20 76 61 |set of s|ample va|
|00002cb0| 6c 75 65 73 20 6d 75 73 | 74 20 62 65 20 66 69 6c |lues mus|t be fil|
|00002cc0| 74 65 72 65 64 0a 69 6e | 20 6f 72 64 65 72 20 74 |tered.in| order t|
|00002cd0| 6f 0a 61 73 73 69 67 6e | 20 61 20 63 6f 6c 6f 72 |o.assign| a color|
|00002ce0| 20 74 6f 20 61 20 70 69 | 78 65 6c 2e 20 20 49 64 | to a pi|xel. Id|
|00002cf0| 65 61 6c 6c 79 2c 20 77 | 68 65 6e 20 70 65 72 66 |eally, w|hen perf|
|00002d00| 6f 72 6d 69 6e 67 20 66 | 69 6c 74 65 72 69 6e 67 |orming f|iltering|
|00002d10| 0a 66 6f 72 20 61 20 73 | 70 65 63 69 66 69 63 20 |.for a s|pecific |
|00002d20| 70 69 78 65 6c 2c 0a 74 | 68 65 20 66 69 6c 74 65 |pixel,.t|he filte|
|00002d30| 72 20 77 69 6c 6c 20 63 | 6f 6e 73 69 64 65 72 20 |r will c|onsider |
|00002d40| 73 61 6d 70 6c 65 73 20 | 66 72 6f 6d 20 6e 65 69 |samples |from nei|
|00002d50| 67 68 62 6f 72 69 6e 67 | 20 72 65 67 69 6f 6e 73 |ghboring| regions|
|00002d60| 2e 20 20 49 6e 0a 7b 5c | 72 61 79 73 68 61 64 65 |. In.{\|rayshade|
|00002d70| 7d 2c 20 74 68 65 20 66 | 69 6c 74 65 72 69 6e 67 |}, the f|iltering|
|00002d80| 20 61 70 70 6c 69 65 64 | 20 74 6f 20 61 20 70 69 | applied| to a pi|
|00002d90| 78 65 6c 20 6d 61 6b 65 | 73 20 75 73 65 20 6f 66 |xel make|s use of|
|00002da0| 20 73 61 6d 70 6c 65 73 | 0a 74 61 6b 65 6e 20 66 | samples|.taken f|
|00002db0| 6f 72 20 74 68 61 74 20 | 70 69 78 65 6c 20 61 6c |or that |pixel al|
|00002dc0| 6f 6e 65 2e 20 20 48 6f | 77 65 76 65 72 2c 20 6f |one. Ho|wever, o|
|00002dd0| 6e 65 20 6d 61 79 20 69 | 6e 63 72 65 61 73 65 20 |ne may i|ncrease |
|00002de0| 74 68 65 20 73 69 7a 65 | 0a 6f 66 20 74 68 65 20 |the size|.of the |
|00002df0| 66 69 6c 74 65 72 20 74 | 68 61 74 20 69 73 20 61 |filter t|hat is a|
|00002e00| 70 70 6c 69 65 64 20 69 | 6e 20 6f 72 64 65 72 20 |pplied i|n order |
|00002e10| 74 6f 20 61 70 70 72 6f | 78 69 6d 61 74 65 20 74 |to appro|ximate t|
|00002e20| 68 65 20 72 65 73 75 6c | 74 73 0a 61 20 6d 6f 72 |he resul|ts.a mor|
|00002e30| 65 20 72 6f 62 75 73 74 | 20 66 69 6c 74 65 72 69 |e robust| filteri|
|00002e40| 6e 67 20 73 63 68 65 6d | 65 2e 0a 0a 5c 62 65 67 |ng schem|e...\beg|
|00002e50| 69 6e 7b 64 65 66 6b 65 | 79 7d 7b 66 69 6c 74 65 |in{defke|y}{filte|
|00002e60| 72 7d 7b 7b 5c 65 6d 20 | 74 79 70 65 7d 20 5b 7b |r}{{\em |type} [{|
|00002e70| 5c 65 6d 20 77 69 64 74 | 68 7d 5d 7d 0a 09 55 73 |\em widt|h}]}..Us|
|00002e80| 65 20 74 68 65 20 69 6e | 64 69 63 61 74 65 64 20 |e the in|dicated |
|00002e90| 66 69 6c 74 65 72 20 74 | 79 70 65 20 77 69 74 68 |filter t|ype with|
|00002ea0| 20 74 68 65 20 67 69 76 | 65 6e 20 77 69 64 74 68 | the giv|en width|
|00002eb0| 2c 0a 09 69 6e 20 70 69 | 78 65 6c 73 2e 0a 09 53 |,..in pi|xels...S|
|00002ec0| 75 70 70 6f 72 74 65 64 | 20 66 69 6c 74 65 72 20 |upported| filter |
|00002ed0| 74 79 70 65 73 20 61 72 | 65 20 7b 5c 74 74 20 67 |types ar|e {\tt g|
|00002ee0| 61 75 73 73 7d 20 28 47 | 61 75 73 73 69 61 6e 29 |auss} (G|aussian)|
|00002ef0| 0a 09 61 6e 64 20 7b 5c | 74 74 20 62 6f 78 7d 20 |..and {\|tt box} |
|00002f00| 28 74 68 65 20 64 65 66 | 61 75 6c 74 29 2e 0a 5c |(the def|ault)..\|
|00002f10| 65 6e 64 7b 64 65 66 6b | 65 79 7d 0a 54 68 65 20 |end{defk|ey}.The |
|00002f20| 64 65 66 61 75 6c 74 20 | 66 69 6c 74 65 72 20 77 |default |filter w|
|00002f30| 69 64 74 68 20 69 73 20 | 31 2e 30 20 66 6f 72 20 |idth is |1.0 for |
|00002f40| 61 20 62 6f 78 20 66 69 | 6c 74 65 72 2c 20 31 2e |a box fi|lter, 1.|
|00002f50| 38 20 66 6f 72 20 61 20 | 47 61 75 73 73 69 61 6e |8 for a |Gaussian|
|00002f60| 0a 66 69 6c 74 65 72 2e | 20 20 54 68 65 20 66 69 |.filter.| The fi|
|00002f70| 6c 74 65 72 20 61 6e 64 | 20 70 69 78 65 6c 20 63 |lter and| pixel c|
|00002f80| 65 6e 74 65 72 73 20 61 | 6c 77 61 79 73 20 63 6f |enters a|lways co|
|00002f90| 69 6e 63 69 64 65 2e 0a | 57 68 65 6e 20 73 61 6d |incide..|When sam|
|00002fa0| 70 6c 69 6e 67 20 61 20 | 70 69 78 65 6c 2c 20 73 |pling a |pixel, s|
|00002fb0| 61 6d 70 6c 65 73 20 61 | 72 65 20 74 61 6b 65 6e |amples a|re taken|
|00002fc0| 20 6f 76 65 72 20 74 68 | 65 20 61 72 65 61 20 6f | over th|e area o|
|00002fd0| 66 0a 74 68 65 20 70 69 | 78 65 6c 20 66 69 6c 74 |f.the pi|xel filt|
|00002fe0| 65 72 2c 20 77 68 69 63 | 68 20 69 73 20 6e 6f 74 |er, whic|h is not|
|00002ff0| 20 6e 65 63 65 73 73 61 | 72 69 6c 79 20 74 68 65 | necessa|rily the|
|00003000| 20 73 61 6d 65 20 61 73 | 20 74 68 65 20 61 72 65 | same as| the are|
|00003010| 61 0a 6f 66 20 74 68 65 | 20 70 69 78 65 6c 20 69 |a.of the| pixel i|
|00003020| 74 73 65 6c 66 2e 0a 0a | 4a 69 74 74 65 72 65 64 |tself...|Jittered|
|00003030| 20 73 61 6d 70 6c 69 6e | 67 20 69 73 20 75 73 65 | samplin|g is use|
|00003040| 64 20 69 6e 20 7b 5c 72 | 61 79 73 68 61 64 65 7d |d in {\r|ayshade}|
|00003050| 20 74 6f 20 73 61 6d 70 | 6c 65 20 65 78 74 65 6e | to samp|le exten|
|00003060| 64 65 64 20 6c 69 67 68 | 74 0a 73 6f 75 72 63 65 |ded ligh|t.source|
|00003070| 73 20 61 73 20 77 65 6c | 6c 2e 20 20 41 20 74 6f |s as wel|l. A to|
|00003080| 74 61 6c 20 6f 66 20 24 | 73 61 6d 70 6c 65 73 5e |tal of $|samples^|
|00003090| 32 24 20 73 61 6d 70 6c | 65 73 20 61 72 65 20 74 |2$ sampl|es are t|
|000030a0| 61 6b 65 6e 20 6f 66 0a | 65 61 63 68 20 65 78 74 |aken of.|each ext|
|000030b0| 65 6e 64 65 64 20 6c 69 | 67 68 74 20 73 6f 75 72 |ended li|ght sour|
|000030c0| 63 65 20 69 6e 20 6f 72 | 64 65 72 20 74 6f 20 64 |ce in or|der to d|
|000030d0| 65 74 65 72 6d 69 6e 65 | 20 74 68 65 20 65 78 74 |etermine| the ext|
|000030e0| 65 6e 74 20 6f 66 20 73 | 68 61 64 6f 77 69 6e 67 |ent of s|hadowing|
|000030f0| 2e 0a 0a 5c 73 65 63 74 | 69 6f 6e 7b 54 68 65 20 |...\sect|ion{The |
|00003100| 52 61 79 20 54 72 65 65 | 7d 0a 0a 57 68 65 6e 20 |Ray Tree|}..When |
|00003110| 72 61 79 20 74 72 61 63 | 69 6e 67 20 61 20 73 63 |ray trac|ing a sc|
|00003120| 65 6e 65 2c 20 72 65 66 | 6c 65 63 74 65 64 20 6f |ene, ref|lected o|
|00003130| 72 20 74 72 61 6e 73 6d | 69 74 74 65 64 20 72 61 |r transm|itted ra|
|00003140| 79 73 20 6d 61 79 20 73 | 74 72 69 6b 65 0a 6f 74 |ys may s|trike.ot|
|00003150| 68 65 72 20 72 65 66 6c | 65 63 74 69 76 65 20 6f |her refl|ective o|
|00003160| 72 20 74 72 61 6e 73 70 | 61 72 65 6e 74 20 6f 62 |r transp|arent ob|
|00003170| 6a 65 63 74 73 2e 20 20 | 46 75 72 74 68 65 72 20 |jects. |Further |
|00003180| 72 65 66 6c 65 63 74 65 | 64 20 6f 72 0a 74 72 61 |reflecte|d or.tra|
|00003190| 6e 73 6d 69 74 74 65 64 | 20 72 61 79 73 20 77 69 |nsmitted| rays wi|
|000031a0| 6c 6c 20 62 65 20 73 70 | 61 77 6e 65 64 2c 20 61 |ll be sp|awned, a|
|000031b0| 6e 64 20 73 6f 20 6f 6e | 2e 20 20 54 61 6b 65 6e |nd so on|. Taken|
|000031c0| 20 74 6f 67 65 74 68 65 | 72 2c 20 73 75 63 68 0a | togethe|r, such.|
|000031d0| 61 20 66 61 6d 69 6c 79 | 20 6f 66 20 72 61 79 73 |a family| of rays|
|000031e0| 20 69 73 20 74 65 72 6d | 65 64 20 74 68 65 20 7b | is term|ed the {|
|000031f0| 5c 65 6d 20 72 61 79 20 | 74 72 65 65 7d 2e 20 20 |\em ray |tree}. |
|00003200| 43 61 72 65 20 6d 75 73 | 74 20 62 65 20 74 61 6b |Care mus|t be tak|
|00003210| 65 6e 0a 74 6f 20 63 6f | 6e 74 72 6f 6c 20 74 68 |en.to co|ntrol th|
|00003220| 65 20 64 65 70 74 68 20 | 6f 66 20 74 68 69 73 20 |e depth |of this |
|00003230| 74 72 65 65 3a 20 20 49 | 66 20 69 74 20 69 73 20 |tree: I|f it is |
|00003240| 61 6c 6c 6f 77 65 64 20 | 74 6f 20 67 72 6f 77 20 |allowed |to grow |
|00003250| 74 6f 6f 20 64 65 65 70 | 6c 79 2c 0a 6f 6e 65 20 |too deep|ly,.one |
|00003260| 6d 61 79 20 73 70 65 6e | 64 20 61 20 67 72 65 61 |may spen|d a grea|
|00003270| 74 20 64 65 61 6c 20 6f | 66 20 74 69 6d 65 20 63 |t deal o|f time c|
|00003280| 6f 6d 70 75 74 69 6e 67 | 20 72 61 79 73 20 74 68 |omputing| rays th|
|00003290| 61 74 20 63 6f 6e 74 72 | 69 62 75 74 65 20 6c 69 |at contr|ibute li|
|000032a0| 74 74 6c 65 0a 74 6f 20 | 74 68 65 20 66 69 6e 61 |ttle.to |the fina|
|000032b0| 6c 20 70 69 63 74 75 72 | 65 3b 20 69 66 20 69 74 |l pictur|e; if it|
|000032c0| 20 69 73 20 6e 6f 74 20 | 61 6c 6c 6f 77 65 64 20 | is not |allowed |
|000032d0| 74 6f 20 67 72 6f 77 20 | 66 61 72 20 65 6e 6f 75 |to grow |far enou|
|000032e0| 67 68 2c 20 74 68 69 73 | 0a 70 72 65 6d 61 74 75 |gh, this|.prematu|
|000032f0| 72 65 20 74 72 65 65 20 | 70 72 75 6e 69 6e 67 20 |re tree |pruning |
|00003300| 6d 61 79 20 62 65 20 65 | 76 69 64 65 6e 74 20 69 |may be e|vident i|
|00003310| 6e 20 74 68 65 20 69 6d | 61 67 65 2e 0a 0a 7b 5c |n the im|age...{\|
|00003320| 52 61 79 73 68 61 64 65 | 7d 20 70 72 6f 76 69 64 |Rayshade|} provid|
|00003330| 65 73 20 74 77 6f 20 63 | 6f 6d 70 6c 65 6d 65 6e |es two c|omplemen|
|00003340| 74 61 72 79 20 6d 65 74 | 68 6f 64 73 20 66 6f 72 |tary met|hods for|
|00003350| 20 63 6f 6e 74 72 6f 6c | 6c 69 6e 67 20 74 68 65 | control|ling the|
|00003360| 20 64 65 70 74 68 0a 6f | 66 20 74 68 65 20 72 61 | depth.o|f the ra|
|00003370| 79 20 74 72 65 65 2e 20 | 20 4f 6e 65 20 6d 65 74 |y tree. | One met|
|00003380| 68 6f 64 20 73 65 74 73 | 20 61 6e 20 61 62 73 6f |hod sets| an abso|
|00003390| 6c 75 74 65 20 6d 61 78 | 69 6d 75 6d 20 66 6f 72 |lute max|imum for|
|000033a0| 20 74 68 65 20 74 72 65 | 65 2e 20 20 54 68 65 0a | the tre|e. The.|
|000033b0| 6f 74 68 65 72 20 61 6c | 6c 6f 77 73 20 6f 6e 65 |other al|lows one|
|000033c0| 20 74 6f 20 61 64 61 70 | 74 69 76 65 6c 79 20 70 | to adap|tively p|
|000033d0| 72 75 6e 65 20 61 20 74 | 72 65 65 20 61 73 20 69 |rune a t|ree as i|
|000033e0| 74 20 67 72 6f 77 73 20 | 73 6f 20 74 68 61 74 20 |t grows |so that |
|000033f0| 60 60 75 6e 69 6d 70 6f | 72 74 61 6e 74 27 27 0a |``unimpo|rtant''.|
|00003400| 72 61 79 73 20 61 72 65 | 20 6e 6f 74 20 73 70 61 |rays are| not spa|
|00003410| 77 6e 65 64 2e 0a 0a 5c | 62 65 67 69 6e 7b 64 65 |wned...\|begin{de|
|00003420| 66 6b 65 79 7d 7b 6d 61 | 78 64 65 70 74 68 7d 7b |fkey}{ma|xdepth}{|
|00003430| 7b 5c 65 6d 20 6c 65 76 | 65 6c 7d 7d 0a 09 44 6f |{\em lev|el}}..Do|
|00003440| 20 6e 6f 74 20 73 70 61 | 77 6e 20 72 61 79 73 20 | not spa|wn rays |
|00003450| 64 65 65 70 65 72 20 74 | 68 61 6e 20 74 68 6f 73 |deeper t|han thos|
|00003460| 65 20 61 74 20 74 68 65 | 20 67 69 76 65 6e 20 7b |e at the| given {|
|00003470| 5c 65 6d 20 6c 65 76 65 | 6c 7d 2e 0a 5c 65 6e 64 |\em leve|l}..\end|
|00003480| 7b 64 65 66 6b 65 79 7d | 0a 52 61 79 73 20 66 72 |{defkey}|.Rays fr|
|00003490| 6f 6d 20 74 68 65 20 65 | 79 65 20 61 72 65 20 6f |om the e|ye are o|
|000034a0| 66 20 64 65 70 74 68 20 | 7a 65 72 6f 2e 20 20 54 |f depth |zero. T|
|000034b0| 68 65 20 64 65 66 61 75 | 6c 74 20 76 61 6c 75 65 |he defau|lt value|
|000034c0| 20 66 6f 72 0a 7b 5c 65 | 6d 20 6c 65 76 65 6c 7d | for.{\e|m level}|
|000034d0| 20 69 73 20 31 35 2e 0a | 54 68 69 73 20 64 65 70 | is 15..|This dep|
|000034e0| 74 68 20 6d 61 79 20 61 | 6c 73 6f 20 62 65 20 73 |th may a|lso be s|
|000034f0| 65 74 20 66 72 6f 6d 20 | 74 68 65 20 63 6f 6d 6d |et from |the comm|
|00003500| 61 6e 64 20 6c 69 6e 65 | 20 74 68 72 6f 75 67 68 |and line| through|
|00003510| 20 74 68 65 20 7b 5c 74 | 74 20 2d 44 7d 20 6f 70 | the {\t|t -D} op|
|00003520| 74 69 6f 6e 2e 0a 0a 5c | 62 65 67 69 6e 7b 64 65 |tion...\|begin{de|
|00003530| 66 6b 65 79 7d 7b 63 75 | 74 6f 66 66 7d 7b 7b 5c |fkey}{cu|toff}{{\|
|00003540| 65 6d 20 74 68 72 65 73 | 68 6f 6c 64 7d 7d 0a 09 |em thres|hold}}..|
|00003550| 44 6f 20 6e 6f 74 20 73 | 70 61 77 6e 20 72 61 79 |Do not s|pawn ray|
|00003560| 73 20 77 68 6f 73 65 20 | 63 6f 6e 74 72 69 62 75 |s whose |contribu|
|00003570| 74 69 6f 6e 20 74 6f 20 | 74 68 65 20 66 69 6e 61 |tion to |the fina|
|00003580| 6c 20 63 6f 6c 6f 72 20 | 6f 66 0a 09 74 68 65 20 |l color |of..the |
|00003590| 65 79 65 20 72 61 79 20 | 69 73 20 6c 65 73 73 20 |eye ray |is less |
|000035a0| 74 68 61 6e 20 7b 5c 65 | 6d 20 74 68 72 65 73 68 |than {\e|m thresh|
|000035b0| 6f 6c 64 7d 20 66 6f 72 | 20 65 61 63 68 20 63 6f |old} for| each co|
|000035c0| 6c 6f 72 20 63 68 61 6e | 6e 65 6c 2e 0a 09 54 68 |lor chan|nel...Th|
|000035d0| 72 65 73 68 6f 6c 64 20 | 6d 61 79 20 62 65 20 67 |reshold |may be g|
|000035e0| 69 76 65 6e 20 61 73 20 | 61 20 73 69 6e 67 6c 65 |iven as |a single|
|000035f0| 20 66 6c 6f 61 74 69 6e | 67 2d 70 6f 69 6e 74 20 | floatin|g-point |
|00003600| 76 61 6c 75 65 2c 0a 09 | 6f 72 20 61 73 20 61 20 |value,..|or as a |
|00003610| 72 65 64 2d 67 72 65 65 | 6e 2d 62 6c 75 65 20 74 |red-gree|n-blue t|
|00003620| 72 69 70 6c 65 2e 0a 5c | 65 6e 64 7b 64 65 66 6b |riple..\|end{defk|
|00003630| 65 79 7d 0a 54 68 65 20 | 64 65 66 61 75 6c 74 20 |ey}.The |default |
|00003640| 76 61 6c 75 65 20 69 73 | 20 30 2e 30 30 32 2e 20 |value is| 0.002. |
|00003650| 20 54 68 69 73 20 74 68 | 72 65 73 68 6f 6c 64 20 | This th|reshold |
|00003660| 6d 61 79 20 61 6c 73 6f | 20 62 65 20 73 65 74 20 |may also| be set |
|00003670| 66 72 6f 6d 0a 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |from.the| command|
|00003680| 20 6c 69 6e 65 20 74 68 | 72 6f 75 67 68 20 74 68 | line th|rough th|
|00003690| 65 20 7b 5c 74 74 20 2d | 54 7d 20 6f 70 74 69 6f |e {\tt -|T} optio|
|000036a0| 6e 2e 0a | |n.. | |
+--------+-------------------------+-------------------------+--------+--------+