home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume28 / rayshade / patch03 < prev    next >
LaTeX Document  |  1992-02-09  |  41.9 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: patch03

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| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 73 6f 75 72 63 65 73 | 2e 6d 69 73 63 0a 46 72 |.sources|.misc.Fr|
|00000020| 6f 6d 3a 20 43 72 61 69 | 67 20 4b 6f 6c 62 20 3c |om: Crai|g Kolb <|
|00000030| 72 61 79 73 68 61 64 65 | 2d 72 65 71 75 65 73 74 |rayshade|-request|
|00000040| 40 63 73 2e 70 72 69 6e | 63 65 74 6f 6e 2e 65 64 |@cs.prin|ceton.ed|
|00000050| 75 3e 0a 53 75 62 6a 65 | 63 74 3a 20 20 76 32 38 |u>.Subje|ct: v28|
|00000060| 69 30 32 39 3a 20 20 72 | 61 79 73 68 61 64 65 20 |i029: r|ayshade |
|00000070| 2d 20 41 20 72 61 79 74 | 72 61 63 69 6e 67 20 70 |- A rayt|racing p|
|00000080| 61 63 6b 61 67 65 20 66 | 6f 72 20 55 4e 49 58 2c |ackage f|or UNIX,|
|00000090| 20 50 61 74 63 68 30 33 | 0a 4d 65 73 73 61 67 65 | Patch03|.Message|
|000000a0| 2d 49 44 3a 20 3c 31 39 | 39 32 46 65 62 31 30 2e |-ID: <19|92Feb10.|
|000000b0| 31 36 31 39 33 35 2e 35 | 36 37 37 40 73 70 61 72 |161935.5|677@spar|
|000000c0| 6b 79 2e 69 6d 64 2e 73 | 74 65 72 6c 69 6e 67 2e |ky.imd.s|terling.|
|000000d0| 63 6f 6d 3e 0a 58 2d 4d | 64 34 2d 53 69 67 6e 61 |com>.X-M|d4-Signa|
|000000e0| 74 75 72 65 3a 20 61 39 | 36 36 33 36 32 63 32 37 |ture: a9|66362c27|
|000000f0| 65 38 39 35 30 39 38 63 | 39 64 65 62 33 64 31 38 |e895098c|9deb3d18|
|00000100| 63 61 37 31 62 64 0a 44 | 61 74 65 3a 20 4d 6f 6e |ca71bd.D|ate: Mon|
|00000110| 2c 20 31 30 20 46 65 62 | 20 31 39 39 32 20 31 36 |, 10 Feb| 1992 16|
|00000120| 3a 31 39 3a 33 35 20 47 | 4d 54 0a 41 70 70 72 6f |:19:35 G|MT.Appro|
|00000130| 76 65 64 3a 20 6b 65 6e | 74 40 73 70 61 72 6b 79 |ved: ken|t@sparky|
|00000140| 2e 69 6d 64 2e 73 74 65 | 72 6c 69 6e 67 2e 63 6f |.imd.ste|rling.co|
|00000150| 6d 0a 0a 53 75 62 6d 69 | 74 74 65 64 2d 62 79 3a |m..Submi|tted-by:|
|00000160| 20 43 72 61 69 67 20 4b | 6f 6c 62 20 3c 72 61 79 | Craig K|olb <ray|
|00000170| 73 68 61 64 65 2d 72 65 | 71 75 65 73 74 40 63 73 |shade-re|quest@cs|
|00000180| 2e 70 72 69 6e 63 65 74 | 6f 6e 2e 65 64 75 3e 0a |.princet|on.edu>.|
|00000190| 50 6f 73 74 69 6e 67 2d | 6e 75 6d 62 65 72 3a 20 |Posting-|number: |
|000001a0| 56 6f 6c 75 6d 65 20 32 | 38 2c 20 49 73 73 75 65 |Volume 2|8, Issue|
|000001b0| 20 32 39 0a 41 72 63 68 | 69 76 65 2d 6e 61 6d 65 | 29.Arch|ive-name|
|000001c0| 3a 20 72 61 79 73 68 61 | 64 65 2f 70 61 74 63 68 |: raysha|de/patch|
|000001d0| 30 33 0a 45 6e 76 69 72 | 6f 6e 6d 65 6e 74 3a 20 |03.Envir|onment: |
|000001e0| 55 4e 49 58 0a 50 61 74 | 63 68 2d 54 6f 3a 20 72 |UNIX.Pat|ch-To: r|
|000001f0| 61 79 73 68 61 64 65 3a | 20 56 6f 6c 75 6d 65 20 |ayshade:| Volume |
|00000200| 32 31 2c 20 49 73 73 75 | 65 20 33 2d 32 32 0a 0a |21, Issu|e 3-22..|
|00000210| 53 79 73 74 65 6d 3a 20 | 72 61 79 73 68 61 64 65 |System: |rayshade|
|00000220| 20 76 65 72 73 69 6f 6e | 20 34 2e 30 0a 50 61 74 | version| 4.0.Pat|
|00000230| 63 68 20 23 3a 20 33 0a | 50 72 69 6f 72 69 74 79 |ch #: 3.|Priority|
|00000240| 3a 20 48 49 47 48 0a 53 | 75 62 6a 65 63 74 3a 20 |: HIGH.S|ubject: |
|00000250| 0a 44 61 74 65 3a 20 4d | 6f 6e 20 46 65 62 20 20 |.Date: M|on Feb |
|00000260| 33 20 31 33 3a 32 32 3a | 35 38 20 45 53 54 20 31 |3 13:22:|58 EST 1|
|00000270| 39 39 32 0a 46 72 6f 6d | 3a 20 52 61 79 73 68 61 |992.From|: Raysha|
|00000280| 64 65 20 43 6f 6e 73 74 | 72 75 63 74 69 6f 6e 20 |de Const|ruction |
|00000290| 43 6f 2e 20 3c 72 61 79 | 73 68 61 64 65 2d 72 65 |Co. <ray|shade-re|
|000002a0| 71 75 65 73 74 40 63 73 | 2e 70 72 69 6e 63 65 74 |quest@cs|.princet|
|000002b0| 6f 6e 2e 65 64 75 3e 0a | 0a 44 65 73 63 72 69 70 |on.edu>.|.Descrip|
|000002c0| 74 69 6f 6e 3a 0a 0a 52 | 65 70 65 61 74 2d 42 79 |tion:..R|epeat-By|
|000002d0| 3a 0a 0a 46 69 78 3a 09 | 46 72 6f 6d 20 72 6e 2c |:..Fix:.|From rn,|
|000002e0| 20 73 61 79 20 22 7c 20 | 70 61 74 63 68 20 2d 70 | say "| |patch -p|
|000002f0| 20 2d 4e 20 2d 64 20 44 | 49 52 22 2c 20 77 68 65 | -N -d D|IR", whe|
|00000300| 72 65 20 44 49 52 20 69 | 73 20 79 6f 75 72 20 72 |re DIR i|s your r|
|00000310| 61 79 73 68 61 64 65 20 | 73 6f 75 72 63 65 0a 09 |ayshade |source..|
|00000320| 64 69 72 65 63 74 6f 72 | 79 2e 20 20 4f 75 74 73 |director|y. Outs|
|00000330| 69 64 65 20 6f 66 20 72 | 6e 2c 20 73 61 79 20 22 |ide of r|n, say "|
|00000340| 63 64 20 44 49 52 3b 20 | 70 61 74 63 68 20 2d 70 |cd DIR; |patch -p|
|00000350| 20 2d 4e 20 3c 74 68 69 | 73 61 72 74 69 63 6c 65 | -N <thi|sarticle|
|00000360| 22 2e 0a 09 49 66 20 79 | 6f 75 20 64 6f 6e 27 74 |"...If y|ou don't|
|00000370| 20 68 61 76 65 20 74 68 | 65 20 70 61 74 63 68 20 | have th|e patch |
|00000380| 70 72 6f 67 72 61 6d 2c | 20 61 70 70 6c 79 20 74 |program,| apply t|
|00000390| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 62 79 20 |he follo|wing by |
|000003a0| 68 61 6e 64 2c 0a 09 6f | 72 20 67 65 74 20 70 61 |hand,..o|r get pa|
|000003b0| 74 63 68 20 28 76 65 72 | 73 69 6f 6e 20 32 2e 30 |tch (ver|sion 2.0|
|000003c0| 2c 20 6c 61 74 65 73 74 | 20 70 61 74 63 68 6c 65 |, latest| patchle|
|000003d0| 76 65 6c 29 2e 0a 0a 09 | 41 66 74 65 72 20 70 61 |vel)....|After pa|
|000003e0| 74 63 68 69 6e 67 3a 0a | 09 09 2a 2a 2a 20 44 4f |tching:.|..*** DO|
|000003f0| 20 4e 4f 54 48 49 4e 47 | 2d 2d 49 4e 53 54 41 4c | NOTHING|--INSTAL|
|00000400| 4c 20 41 4c 4c 20 50 41 | 54 43 48 45 53 20 55 50 |L ALL PA|TCHES UP|
|00000410| 20 54 48 52 4f 55 47 48 | 20 23 35 20 46 49 52 53 | THROUGH| #5 FIRS|
|00000420| 54 20 2a 2a 2a 0a 0a 09 | 49 66 20 70 61 74 63 68 |T ***...|If patch|
|00000430| 20 69 6e 64 69 63 61 74 | 65 73 20 74 68 61 74 20 | indicat|es that |
|00000440| 70 61 74 63 68 6c 65 76 | 65 6c 20 69 73 20 74 68 |patchlev|el is th|
|00000450| 65 20 77 72 6f 6e 67 20 | 76 65 72 73 69 6f 6e 2c |e wrong |version,|
|00000460| 20 79 6f 75 20 6d 61 79 | 20 6e 65 65 64 0a 09 74 | you may| need..t|
|00000470| 6f 20 61 70 70 6c 79 20 | 6f 6e 65 20 6f 72 20 6d |o apply |one or m|
|00000480| 6f 72 65 20 70 72 65 76 | 69 6f 75 73 20 70 61 74 |ore prev|ious pat|
|00000490| 63 68 65 73 2c 20 6f 72 | 20 74 68 65 20 70 61 74 |ches, or| the pat|
|000004a0| 63 68 20 6d 61 79 20 61 | 6c 72 65 61 64 79 0a 09 |ch may a|lready..|
|000004b0| 68 61 76 65 20 62 65 65 | 6e 20 61 70 70 6c 69 65 |have bee|n applie|
|000004c0| 64 2e 20 20 53 65 65 20 | 74 68 65 20 70 61 74 63 |d. See |the patc|
|000004d0| 68 6c 65 76 65 6c 2e 68 | 20 66 69 6c 65 20 74 6f |hlevel.h| file to|
|000004e0| 20 66 69 6e 64 20 6f 75 | 74 20 77 68 61 74 20 68 | find ou|t what h|
|000004f0| 61 73 20 6f 72 0a 09 68 | 61 73 20 6e 6f 74 20 62 |as or..h|as not b|
|00000500| 65 65 6e 20 61 70 70 6c | 69 65 64 2e 20 20 49 6e |een appl|ied. In|
|00000510| 20 61 6e 79 20 65 76 65 | 6e 74 2c 20 64 6f 6e 27 | any eve|nt, don'|
|00000520| 74 20 63 6f 6e 74 69 6e | 75 65 20 77 69 74 68 20 |t contin|ue with |
|00000530| 74 68 65 20 70 61 74 63 | 68 2e 0a 0a 09 49 66 20 |the patc|h....If |
|00000540| 79 6f 75 20 61 72 65 20 | 6d 69 73 73 69 6e 67 20 |you are |missing |
|00000550| 70 72 65 76 69 6f 75 73 | 20 70 61 74 63 68 65 73 |previous| patches|
|00000560| 20 74 68 65 79 20 63 61 | 6e 20 62 65 20 6f 62 74 | they ca|n be obt|
|00000570| 61 69 6e 65 64 20 74 68 | 72 6f 75 67 68 0a 09 61 |ained th|rough..a|
|00000580| 6e 6f 6e 79 6d 6f 75 73 | 20 66 74 70 20 66 72 6f |nonymous| ftp fro|
|00000590| 6d 20 77 65 65 64 65 61 | 74 65 72 2e 6d 61 74 68 |m weedea|ter.math|
|000005a0| 2e 79 61 6c 65 2e 65 64 | 75 20 28 31 33 30 2e 31 |.yale.ed|u (130.1|
|000005b0| 33 32 2e 32 33 2e 31 37 | 29 20 69 6e 0a 09 70 75 |32.23.17|) in..pu|
|000005c0| 62 2f 72 61 79 73 68 61 | 64 65 2e 34 2e 30 2f 70 |b/raysha|de.4.0/p|
|000005d0| 61 74 63 68 65 73 2e 0a | 0a 49 6e 64 65 78 3a 20 |atches..|.Index: |
|000005e0| 70 61 74 63 68 6c 65 76 | 65 6c 2e 68 0a 50 72 65 |patchlev|el.h.Pre|
|000005f0| 72 65 71 3a 20 32 0a 31 | 63 31 0a 3c 20 23 64 65 |req: 2.1|c1.< #de|
|00000600| 66 69 6e 65 20 50 41 54 | 43 48 4c 45 56 45 4c 20 |fine PAT|CHLEVEL |
|00000610| 32 0a 2d 2d 2d 0a 3e 20 | 23 64 65 66 69 6e 65 20 |2.---.> |#define |
|00000620| 50 41 54 43 48 4c 45 56 | 45 4c 20 33 0a 0a 49 6e |PATCHLEV|EL 3..In|
|00000630| 64 65 78 3a 20 44 6f 63 | 2f 47 75 69 64 65 2f 72 |dex: Doc|/Guide/r|
|00000640| 75 6e 6e 69 6e 67 2e 74 | 65 78 0a 2a 2a 2a 20 6f |unning.t|ex.*** o|
|00000650| 6c 64 2f 44 6f 63 2f 47 | 75 69 64 65 2f 72 75 6e |ld/Doc/G|uide/run|
|00000660| 6e 69 6e 67 2e 74 65 78 | 09 4d 6f 6e 20 46 65 62 |ning.tex|.Mon Feb|
|00000670| 20 20 33 20 31 32 3a 34 | 39 3a 35 34 20 31 39 39 | 3 12:4|9:54 199|
|00000680| 32 0a 2d 2d 2d 20 6e 65 | 77 2f 44 6f 63 2f 47 75 |2.--- ne|w/Doc/Gu|
|00000690| 69 64 65 2f 72 75 6e 6e | 69 6e 67 2e 74 65 78 09 |ide/runn|ing.tex.|
|000006a0| 46 72 69 20 4a 61 6e 20 | 31 37 20 31 30 3a 32 39 |Fri Jan |17 10:29|
|000006b0| 3a 31 35 20 31 39 39 32 | 0a 2a 2a 2a 2a 2a 2a 2a |:15 1992|.*******|
|000006c0| 2a 2a 2a 2a 2a 2a 2a 2a | 0a 2a 2a 2a 20 31 2c 31 |********|.*** 1,1|
|000006d0| 31 20 2a 2a 2a 2a 0a 20 | 20 5c 63 68 61 70 74 65 |1 ****. | \chapte|
|000006e0| 72 7b 52 75 6e 6e 69 6e | 67 20 52 61 79 73 68 61 |r{Runnin|g Raysha|
|000006f0| 64 65 7d 0a 20 20 0a 21 | 20 7b 5c 65 6d 20 52 61 |de}. .!| {\em Ra|
|00000700| 79 73 68 61 64 65 7d 0a | 20 20 63 61 6e 20 74 61 |yshade}.| can ta|
|00000710| 6b 65 20 61 6e 79 77 68 | 65 72 65 20 66 72 6f 6d |ke anywh|ere from|
|00000720| 20 73 65 63 6f 6e 64 73 | 20 74 6f 20 77 65 65 6b | seconds| to week|
|00000730| 73 20 74 6f 20 72 65 6e | 64 65 72 20 61 6e 20 69 |s to ren|der an i|
|00000740| 6d 61 67 65 2e 20 20 54 | 68 65 20 65 78 61 63 74 |mage. T|he exact|
|00000750| 0a 20 20 74 69 6d 65 20 | 72 65 71 75 69 72 65 64 |. time |required|
|00000760| 20 69 73 20 61 20 66 75 | 6e 63 74 69 6f 6e 20 6f | is a fu|nction o|
|00000770| 66 20 74 68 65 20 73 70 | 65 65 64 20 6f 66 20 74 |f the sp|eed of t|
|00000780| 68 65 0a 20 20 6d 61 63 | 68 69 6e 65 28 73 29 20 |he. mac|hine(s) |
|00000790| 6f 6e 20 77 68 69 63 68 | 0a 20 20 79 6f 75 27 72 |on which|. you'r|
|000007a0| 65 20 77 6f 72 6b 69 6e | 67 2c 20 74 68 65 20 63 |e workin|g, the c|
|000007b0| 6f 6d 70 6c 65 78 69 74 | 79 20 6f 66 20 74 68 65 |omplexit|y of the|
|000007c0| 20 73 63 65 6e 65 2c 20 | 61 6e 64 20 68 6f 77 20 | scene, |and how |
|000007d0| 60 60 67 6f 6f 64 27 27 | 20 79 6f 75 20 77 61 6e |``good''| you wan|
|000007e0| 74 0a 21 20 74 68 65 20 | 66 69 6e 61 6c 20 69 6d |t.! the |final im|
|000007f0| 61 67 65 20 74 6f 20 62 | 65 2e 0a 20 20 0a 20 20 |age to b|e.. . |
|00000800| 43 72 65 61 74 69 6e 67 | 20 61 20 66 69 6e 69 73 |Creating| a finis|
|00000810| 68 65 64 20 72 61 79 2d | 74 72 61 63 65 64 20 69 |hed ray-|traced i|
|00000820| 6d 61 67 65 20 69 73 20 | 61 6e 20 69 74 65 72 61 |mage is |an itera|
|00000830| 74 69 76 65 20 70 72 6f | 63 65 73 73 2e 20 20 55 |tive pro|cess. U|
|00000840| 73 75 61 6c 6c 79 2c 20 | 6d 61 6e 79 0a 20 20 74 |sually, |many. t|
|00000850| 65 73 74 20 72 65 6e 64 | 65 72 69 6e 67 73 20 61 |est rend|erings a|
|00000860| 72 65 20 6d 61 64 65 20 | 61 74 20 6c 6f 77 20 72 |re made |at low r|
|00000870| 65 73 6f 6c 75 74 69 6f | 6e 20 61 6e 64 20 77 69 |esolutio|n and wi|
|00000880| 74 68 0a 2d 2d 2d 20 31 | 2c 31 32 20 2d 2d 2d 2d |th.--- 1|,12 ----|
|00000890| 0a 20 20 5c 63 68 61 70 | 74 65 72 7b 52 75 6e 6e |. \chap|ter{Runn|
|000008a0| 69 6e 67 20 52 61 79 73 | 68 61 64 65 7d 0a 20 20 |ing Rays|hade}. |
|000008b0| 0a 21 20 7b 5c 52 61 79 | 73 68 61 64 65 7d 0a 20 |.! {\Ray|shade}. |
|000008c0| 20 63 61 6e 20 74 61 6b | 65 20 61 6e 79 77 68 65 | can tak|e anywhe|
|000008d0| 72 65 20 66 72 6f 6d 20 | 73 65 63 6f 6e 64 73 20 |re from |seconds |
|000008e0| 74 6f 20 77 65 65 6b 73 | 20 74 6f 20 72 65 6e 64 |to weeks| to rend|
|000008f0| 65 72 20 61 6e 20 69 6d | 61 67 65 2e 20 20 54 68 |er an im|age. Th|
|00000900| 65 20 65 78 61 63 74 0a | 20 20 74 69 6d 65 20 72 |e exact.| time r|
|00000910| 65 71 75 69 72 65 64 20 | 69 73 20 61 20 66 75 6e |equired |is a fun|
|00000920| 63 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 73 70 65 |ction of| the spe|
|00000930| 65 64 20 6f 66 20 74 68 | 65 0a 20 20 6d 61 63 68 |ed of th|e. mach|
|00000940| 69 6e 65 28 73 29 20 6f | 6e 20 77 68 69 63 68 0a |ine(s) o|n which.|
|00000950| 20 20 79 6f 75 27 72 65 | 20 77 6f 72 6b 69 6e 67 | you're| working|
|00000960| 2c 20 74 68 65 20 63 6f | 6d 70 6c 65 78 69 74 79 |, the co|mplexity|
|00000970| 20 6f 66 20 74 68 65 20 | 73 63 65 6e 65 2c 20 61 | of the |scene, a|
|00000980| 6e 64 20 68 6f 77 20 60 | 60 67 6f 6f 64 27 27 20 |nd how `|`good'' |
|00000990| 79 6f 75 20 77 61 6e 74 | 0a 21 20 74 68 65 20 66 |you want|.! the f|
|000009a0| 69 6e 61 6c 20 69 6d 61 | 67 65 20 74 6f 20 62 65 |inal ima|ge to be|
|000009b0| 2e 20 20 5c 66 6f 6f 74 | 6e 6f 74 65 7b 41 70 70 |. \foot|note{App|
|000009c0| 65 6e 64 69 78 20 44 20 | 64 65 73 63 72 69 62 65 |endix D |describe|
|000009d0| 73 20 73 6f 6d 65 20 73 | 69 6d 70 6c 65 0a 21 20 |s some s|imple.! |
|000009e0| 77 61 79 73 20 74 6f 20 | 61 63 63 65 6c 65 72 61 |ways to |accelera|
|000009f0| 74 65 20 74 68 65 20 72 | 65 6e 64 65 72 69 6e 67 |te the r|endering|
|00000a00| 20 70 72 6f 63 65 73 73 | 2e 7d 0a 20 20 0a 20 20 | process|.}. . |
|00000a10| 43 72 65 61 74 69 6e 67 | 20 61 20 66 69 6e 69 73 |Creating| a finis|
|00000a20| 68 65 64 20 72 61 79 2d | 74 72 61 63 65 64 20 69 |hed ray-|traced i|
|00000a30| 6d 61 67 65 20 69 73 20 | 61 6e 20 69 74 65 72 61 |mage is |an itera|
|00000a40| 74 69 76 65 20 70 72 6f | 63 65 73 73 2e 20 20 55 |tive pro|cess. U|
|00000a50| 73 75 61 6c 6c 79 2c 20 | 6d 61 6e 79 0a 20 20 74 |sually, |many. t|
|00000a60| 65 73 74 20 72 65 6e 64 | 65 72 69 6e 67 73 20 61 |est rend|erings a|
|00000a70| 72 65 20 6d 61 64 65 20 | 61 74 20 6c 6f 77 20 72 |re made |at low r|
|00000a80| 65 73 6f 6c 75 74 69 6f | 6e 20 61 6e 64 20 77 69 |esolutio|n and wi|
|00000a90| 74 68 0a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |th.*****|********|
|00000aa0| 2a 2a 0a 2a 2a 2a 20 31 | 33 2c 33 35 20 2a 2a 2a |**.*** 1|3,35 ***|
|00000ab0| 2a 0a 20 20 73 75 72 66 | 61 63 65 20 64 65 66 69 |*. surf|ace defi|
|00000ac0| 6e 69 74 69 6f 6e 73 20 | 6d 69 67 68 74 20 62 65 |nitions |might be|
|00000ad0| 20 6d 6f 64 69 66 69 65 | 64 2c 20 74 68 65 20 65 | modifie|d, the e|
|00000ae0| 79 65 20 6f 72 20 6c 6f | 6f 6b 20 70 6f 73 69 74 |ye or lo|ok posit|
|00000af0| 69 6f 6e 73 20 6d 61 79 | 20 62 65 0a 20 20 73 6c |ions may| be. sl|
|00000b00| 69 67 68 74 6c 79 20 63 | 68 61 6e 67 65 64 2c 20 |ightly c|hanged, |
|00000b10| 6f 72 20 74 68 65 20 69 | 6e 74 65 6e 73 69 74 79 |or the i|ntensity|
|00000b20| 20 6f 66 20 61 20 6c 69 | 67 68 74 20 73 6f 75 72 | of a li|ght sour|
|00000b30| 63 65 20 63 68 61 6e 67 | 65 64 2e 0a 20 20 0a 21 |ce chang|ed.. .!|
|00000b40| 20 54 68 69 73 20 63 68 | 61 70 74 65 72 20 64 65 | This ch|apter de|
|00000b50| 73 63 72 69 62 65 73 20 | 74 68 65 20 62 61 73 69 |scribes |the basi|
|00000b60| 63 20 6f 70 65 72 61 74 | 69 6f 6e 20 6f 66 20 5c |c operat|ion of \|
|00000b70| 72 61 79 73 68 61 64 65 | 20 61 6e 64 20 73 6f 6d |rayshade| and som|
|00000b80| 65 20 6f 66 0a 20 20 74 | 68 65 20 6f 70 74 69 6f |e of. t|he optio|
|00000b90| 6e 73 20 74 68 61 74 20 | 63 6f 6e 74 72 6f 6c 20 |ns that |control |
|00000ba0| 74 68 61 74 20 6f 70 65 | 72 61 74 69 6f 6e 2e 0a |that ope|ration..|
|00000bb0| 20 20 53 65 74 74 69 6e | 67 20 74 68 65 73 65 20 | Settin|g these |
|00000bc0| 6f 70 74 69 6f 6e 73 20 | 70 72 6f 70 65 72 6c 79 |options |properly|
|00000bd0| 20 63 61 6e 20 67 72 65 | 61 74 6c 79 20 72 65 64 | can gre|atly red|
|00000be0| 75 63 65 0a 20 20 72 65 | 6e 64 65 72 69 6e 67 20 |uce. re|ndering |
|00000bf0| 74 69 6d 65 2c 20 69 6d | 70 72 6f 76 65 20 74 68 |time, im|prove th|
|00000c00| 65 20 71 75 61 6c 69 74 | 79 20 6f 66 20 79 6f 75 |e qualit|y of you|
|00000c10| 72 20 69 6d 61 67 65 73 | 2c 20 61 6e 64 20 6d 61 |r images|, and ma|
|00000c20| 6b 65 20 79 6f 75 20 61 | 20 62 65 74 74 65 72 0a |ke you a| better.|
|00000c30| 20 20 70 65 72 73 6f 6e | 2e 0a 20 20 0a 21 20 7b | person|.. .! {|
|00000c40| 5c 65 6d 20 52 61 79 73 | 68 61 64 65 7d 20 75 73 |\em Rays|hade} us|
|00000c50| 75 61 6c 6c 79 20 77 6f | 72 6b 73 20 61 73 20 61 |ually wo|rks as a|
|00000c60| 20 66 69 6c 74 65 72 2c | 20 72 65 61 64 69 6e 67 | filter,| reading|
|00000c70| 20 61 20 64 65 73 63 72 | 69 70 74 69 6f 6e 20 66 | a descr|iption f|
|00000c80| 72 6f 6d 0a 20 20 74 68 | 65 20 73 74 61 6e 64 61 |rom. th|e standa|
|00000c90| 72 64 20 69 6e 70 75 74 | 20 61 6e 64 20 77 72 69 |rd input| and wri|
|00000ca0| 74 69 6e 67 0a 21 20 61 | 6e 20 69 6d 61 67 65 20 |ting.! a|n image |
|00000cb0| 66 69 6c 65 20 74 6f 20 | 74 68 65 20 73 74 61 6e |file to |the stan|
|00000cc0| 64 61 72 64 20 6f 75 74 | 70 75 74 2e 20 20 41 73 |dard out|put. As|
|00000cd0| 20 69 74 20 69 73 20 77 | 6f 72 6b 69 6e 67 2c 20 | it is w|orking, |
|00000ce0| 7b 5c 65 6d 20 72 61 79 | 73 68 61 64 65 7d 20 72 |{\em ray|shade} r|
|00000cf0| 65 70 6f 72 74 73 0a 20 | 20 6f 6e 20 74 68 65 20 |eports. | on the |
|00000d00| 70 72 6f 67 72 65 73 73 | 20 6f 66 20 74 68 65 20 |progress| of the |
|00000d10| 72 65 6e 64 65 72 69 6e | 67 20 62 79 20 77 72 69 |renderin|g by wri|
|00000d20| 74 69 6e 67 20 6d 65 73 | 73 61 67 65 73 20 74 6f |ting mes|sages to|
|00000d30| 20 74 68 65 20 73 74 61 | 6e 64 61 72 64 0a 20 20 | the sta|ndard. |
|00000d40| 65 72 72 6f 72 2e 0a 20 | 20 0a 20 20 5c 73 65 63 |error.. | . \sec|
|00000d50| 74 69 6f 6e 7b 54 68 65 | 20 49 6e 70 75 74 20 46 |tion{The| Input F|
|00000d60| 69 6c 65 7d 0a 20 20 0a | 21 20 54 68 65 20 73 63 |ile}. .|! The sc|
|00000d70| 65 6e 65 20 64 65 73 63 | 72 69 70 74 69 6f 6e 20 |ene desc|ription |
|00000d80| 72 65 61 64 20 62 79 20 | 5c 72 61 79 73 68 61 64 |read by |\rayshad|
|00000d90| 65 20 63 6f 6e 73 69 73 | 74 73 20 6f 66 20 61 20 |e consis|ts of a |
|00000da0| 6e 75 6d 62 65 72 20 6f | 66 0a 20 20 6b 65 79 77 |number o|f. keyw|
|00000db0| 6f 72 64 73 2c 20 65 61 | 63 68 20 66 6f 6c 6c 6f |ords, ea|ch follo|
|00000dc0| 77 65 64 20 62 79 20 61 | 20 73 65 74 20 6f 66 20 |wed by a| set of |
|00000dd0| 61 72 67 75 6d 65 6e 74 | 73 2e 20 20 54 68 65 73 |argument|s. Thes|
|00000de0| 65 20 6b 65 79 77 6f 72 | 64 73 20 63 61 6e 0a 21 |e keywor|ds can.!|
|00000df0| 20 62 65 20 74 68 6f 75 | 67 68 74 20 6f 66 20 61 | be thou|ght of a|
|00000e00| 73 20 63 6f 6d 6d 61 6e | 64 73 20 74 68 61 74 20 |s comman|ds that |
|00000e10| 64 69 72 65 63 74 20 72 | 61 79 73 68 61 64 65 20 |direct r|ayshade |
|00000e20| 74 6f 20 64 6f 20 76 61 | 72 69 6f 75 73 20 74 68 |to do va|rious th|
|00000e30| 69 6e 67 73 2c 0a 20 20 | 73 75 63 68 20 61 73 20 |ings,. |such as |
|00000e40| 63 72 65 61 74 65 20 6f | 62 6a 65 63 74 73 2c 20 |create o|bjects, |
|00000e50| 73 65 74 20 74 68 65 20 | 65 79 65 27 73 20 70 6f |set the |eye's po|
|00000e60| 73 69 74 69 6f 6e 2c 20 | 61 6e 64 20 63 68 61 6e |sition, |and chan|
|00000e70| 67 65 20 61 6e 20 6f 62 | 6a 65 63 74 27 73 0a 20 |ge an ob|ject's. |
|00000e80| 20 61 70 70 65 61 72 61 | 6e 63 65 2e 0a 20 20 0a | appeara|nce.. .|
|00000e90| 2d 2d 2d 20 31 34 2c 33 | 36 20 2d 2d 2d 2d 0a 20 |--- 14,3|6 ----. |
|00000ea0| 20 73 75 72 66 61 63 65 | 20 64 65 66 69 6e 69 74 | surface| definit|
|00000eb0| 69 6f 6e 73 20 6d 69 67 | 68 74 20 62 65 20 6d 6f |ions mig|ht be mo|
|00000ec0| 64 69 66 69 65 64 2c 20 | 74 68 65 20 65 79 65 20 |dified, |the eye |
|00000ed0| 6f 72 20 6c 6f 6f 6b 20 | 70 6f 73 69 74 69 6f 6e |or look |position|
|00000ee0| 73 20 6d 61 79 20 62 65 | 0a 20 20 73 6c 69 67 68 |s may be|. sligh|
|00000ef0| 74 6c 79 20 63 68 61 6e | 67 65 64 2c 20 6f 72 20 |tly chan|ged, or |
|00000f00| 74 68 65 20 69 6e 74 65 | 6e 73 69 74 79 20 6f 66 |the inte|nsity of|
|00000f10| 20 61 20 6c 69 67 68 74 | 20 73 6f 75 72 63 65 20 | a light| source |
|00000f20| 63 68 61 6e 67 65 64 2e | 0a 20 20 0a 21 20 54 68 |changed.|. .! Th|
|00000f30| 69 73 20 63 68 61 70 74 | 65 72 20 64 65 73 63 72 |is chapt|er descr|
|00000f40| 69 62 65 73 20 74 68 65 | 20 62 61 73 69 63 20 6f |ibes the| basic o|
|00000f50| 70 65 72 61 74 69 6f 6e | 20 6f 66 20 7b 5c 72 61 |peration| of {\ra|
|00000f60| 79 73 68 61 64 65 7d 20 | 61 6e 64 20 73 6f 6d 65 |yshade} |and some|
|00000f70| 20 6f 66 0a 20 20 74 68 | 65 20 6f 70 74 69 6f 6e | of. th|e option|
|00000f80| 73 20 74 68 61 74 20 63 | 6f 6e 74 72 6f 6c 20 74 |s that c|ontrol t|
|00000f90| 68 61 74 20 6f 70 65 72 | 61 74 69 6f 6e 2e 0a 20 |hat oper|ation.. |
|00000fa0| 20 53 65 74 74 69 6e 67 | 20 74 68 65 73 65 20 6f | Setting| these o|
|00000fb0| 70 74 69 6f 6e 73 20 70 | 72 6f 70 65 72 6c 79 20 |ptions p|roperly |
|00000fc0| 63 61 6e 20 67 72 65 61 | 74 6c 79 20 72 65 64 75 |can grea|tly redu|
|00000fd0| 63 65 0a 20 20 72 65 6e | 64 65 72 69 6e 67 20 74 |ce. ren|dering t|
|00000fe0| 69 6d 65 2c 20 69 6d 70 | 72 6f 76 65 20 74 68 65 |ime, imp|rove the|
|00000ff0| 20 71 75 61 6c 69 74 79 | 20 6f 66 20 79 6f 75 72 | quality| of your|
|00001000| 20 69 6d 61 67 65 73 2c | 20 61 6e 64 20 6d 61 6b | images,| and mak|
|00001010| 65 20 79 6f 75 20 61 20 | 62 65 74 74 65 72 0a 20 |e you a |better. |
|00001020| 20 70 65 72 73 6f 6e 2e | 0a 20 20 0a 21 20 7b 5c | person.|. .! {\|
|00001030| 52 61 79 73 68 61 64 65 | 7d 20 75 73 75 61 6c 6c |Rayshade|} usuall|
|00001040| 79 20 77 6f 72 6b 73 20 | 61 73 20 61 20 66 69 6c |y works |as a fil|
|00001050| 74 65 72 2c 20 72 65 61 | 64 69 6e 67 20 61 20 64 |ter, rea|ding a d|
|00001060| 65 73 63 72 69 70 74 69 | 6f 6e 20 66 72 6f 6d 0a |escripti|on from.|
|00001070| 20 20 74 68 65 20 73 74 | 61 6e 64 61 72 64 20 69 | the st|andard i|
|00001080| 6e 70 75 74 20 61 6e 64 | 20 77 72 69 74 69 6e 67 |nput and| writing|
|00001090| 0a 21 20 61 6e 20 69 6d | 61 67 65 20 66 69 6c 65 |.! an im|age file|
|000010a0| 20 74 6f 20 74 68 65 20 | 73 74 61 6e 64 61 72 64 | to the |standard|
|000010b0| 20 6f 75 74 70 75 74 2e | 20 20 41 73 20 69 74 20 | output.| As it |
|000010c0| 69 73 20 77 6f 72 6b 69 | 6e 67 2c 20 7b 5c 72 61 |is worki|ng, {\ra|
|000010d0| 79 73 68 61 64 65 7d 20 | 72 65 70 6f 72 74 73 0a |yshade} |reports.|
|000010e0| 20 20 6f 6e 20 74 68 65 | 20 70 72 6f 67 72 65 73 | on the| progres|
|000010f0| 73 20 6f 66 20 74 68 65 | 20 72 65 6e 64 65 72 69 |s of the| renderi|
|00001100| 6e 67 20 62 79 20 77 72 | 69 74 69 6e 67 20 6d 65 |ng by wr|iting me|
|00001110| 73 73 61 67 65 73 20 74 | 6f 20 74 68 65 20 73 74 |ssages t|o the st|
|00001120| 61 6e 64 61 72 64 0a 20 | 20 65 72 72 6f 72 2e 0a |andard. | error..|
|00001130| 20 20 0a 20 20 5c 73 65 | 63 74 69 6f 6e 7b 54 68 | . \se|ction{Th|
|00001140| 65 20 49 6e 70 75 74 20 | 46 69 6c 65 7d 0a 20 20 |e Input |File}. |
|00001150| 0a 21 20 54 68 65 20 73 | 63 65 6e 65 20 64 65 73 |.! The s|cene des|
|00001160| 63 72 69 70 74 69 6f 6e | 20 72 65 61 64 20 62 79 |cription| read by|
|00001170| 20 7b 5c 72 61 79 73 68 | 61 64 65 7d 20 63 6f 6e | {\raysh|ade} con|
|00001180| 73 69 73 74 73 20 6f 66 | 20 61 20 6e 75 6d 62 65 |sists of| a numbe|
|00001190| 72 20 6f 66 0a 20 20 6b | 65 79 77 6f 72 64 73 2c |r of. k|eywords,|
|000011a0| 20 65 61 63 68 20 66 6f | 6c 6c 6f 77 65 64 20 62 | each fo|llowed b|
|000011b0| 79 20 61 20 73 65 74 20 | 6f 66 20 61 72 67 75 6d |y a set |of argum|
|000011c0| 65 6e 74 73 2e 20 20 54 | 68 65 73 65 20 6b 65 79 |ents. T|hese key|
|000011d0| 77 6f 72 64 73 20 63 61 | 6e 0a 21 20 62 65 20 74 |words ca|n.! be t|
|000011e0| 68 6f 75 67 68 74 20 6f | 66 20 61 73 20 63 6f 6d |hought o|f as com|
|000011f0| 6d 61 6e 64 73 20 74 68 | 61 74 20 64 69 72 65 63 |mands th|at direc|
|00001200| 74 20 7b 5c 72 61 79 73 | 68 61 64 65 7d 20 74 6f |t {\rays|hade} to|
|00001210| 20 64 6f 20 76 61 72 69 | 6f 75 73 20 74 68 69 6e | do vari|ous thin|
|00001220| 67 73 2c 0a 20 20 73 75 | 63 68 20 61 73 20 63 72 |gs,. su|ch as cr|
|00001230| 65 61 74 65 20 6f 62 6a | 65 63 74 73 2c 20 73 65 |eate obj|ects, se|
|00001240| 74 20 74 68 65 20 65 79 | 65 27 73 20 70 6f 73 69 |t the ey|e's posi|
|00001250| 74 69 6f 6e 2c 20 61 6e | 64 20 63 68 61 6e 67 65 |tion, an|d change|
|00001260| 20 61 6e 20 6f 62 6a 65 | 63 74 27 73 0a 20 20 61 | an obje|ct's. a|
|00001270| 70 70 65 61 72 61 6e 63 | 65 2e 0a 20 20 0a 2a 2a |ppearanc|e.. .**|
|00001280| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 0a 2a 2a |********|*****.**|
|00001290| 2a 20 33 38 2c 35 32 20 | 2a 2a 2a 2a 0a 20 20 54 |* 38,52 |****. T|
|000012a0| 68 65 73 65 20 6f 70 74 | 69 6f 6e 73 20 6f 76 65 |hese opt|ions ove|
|000012b0| 72 72 69 64 65 20 74 68 | 65 20 76 61 6c 75 65 73 |rride th|e values|
|000012c0| 20 67 69 76 65 6e 20 69 | 6e 20 74 68 65 20 69 6e | given i|n the in|
|000012d0| 70 75 74 20 66 69 6c 65 | 2c 0a 20 20 61 6e 64 20 |put file|,. and |
|000012e0| 61 72 65 20 65 78 70 6c | 61 69 6e 65 64 20 69 6e |are expl|ained in|
|000012f0| 20 64 65 74 61 69 6c 20 | 69 6e 20 41 70 70 65 6e | detail |in Appen|
|00001300| 64 69 78 20 41 2e 0a 20 | 20 0a 21 20 52 61 79 73 |dix A.. | .! Rays|
|00001310| 68 61 64 65 20 69 73 20 | 60 60 63 61 73 65 20 73 |hade is |``case s|
|00001320| 65 6e 73 69 74 69 76 65 | 2c 27 27 20 77 68 69 63 |ensitive|,'' whic|
|00001330| 68 20 6d 65 61 6e 73 20 | 74 68 61 74 20 74 79 70 |h means |that typ|
|00001340| 69 6e 67 0a 20 20 7b 5c | 74 74 20 53 50 48 45 52 |ing. {\|tt SPHER|
|00001350| 45 7d 20 6f 72 20 7b 5c | 74 74 20 53 70 68 65 72 |E} or {\|tt Spher|
|00001360| 65 7d 20 69 6e 73 74 65 | 61 64 20 6f 66 20 7b 5c |e} inste|ad of {\|
|00001370| 74 74 20 73 70 68 65 72 | 65 7d 20 77 6f 6e 27 74 |tt spher|e} won't|
|00001380| 20 77 6f 72 6b 2e 0a 21 | 20 7b 5c 65 6d 20 52 61 | work..!| {\em Ra|
|00001390| 79 73 68 61 64 65 7d 20 | 6b 65 79 77 6f 72 64 73 |yshade} |keywords|
|000013a0| 20 61 72 65 20 61 6c 6c | 20 6c 6f 77 65 72 2d 63 | are all| lower-c|
|000013b0| 61 73 65 2e 20 20 4d 61 | 6e 79 20 70 65 6f 70 6c |ase. Ma|ny peopl|
|000013c0| 65 20 63 68 6f 6f 73 65 | 20 74 6f 0a 20 20 63 61 |e choose| to. ca|
|000013d0| 70 69 74 61 6c 69 7a 65 | 20 74 68 65 20 66 69 72 |pitalize| the fir|
|000013e0| 73 74 20 6c 65 74 74 65 | 72 20 6f 66 20 6e 61 6d |st lette|r of nam|
|000013f0| 65 73 20 74 68 61 74 20 | 74 68 65 79 20 67 69 76 |es that |they giv|
|00001400| 65 20 74 6f 20 6f 62 6a | 65 63 74 73 0a 20 20 6f |e to obj|ects. o|
|00001410| 72 20 73 75 72 66 61 63 | 65 73 20 69 6e 20 6f 72 |r surfac|es in or|
|00001420| 64 65 72 20 74 6f 20 6d | 61 6b 65 20 74 68 65 6e |der to m|ake then|
|00001430| 20 60 60 73 74 61 6e 64 | 20 6f 75 74 27 27 20 69 | ``stand| out'' i|
|00001440| 6e 20 61 6e 20 69 6e 70 | 75 74 20 66 69 6c 65 2e |n an inp|ut file.|
|00001450| 0a 20 20 0a 20 20 4b 65 | 79 77 6f 72 64 73 2c 20 |. . Ke|ywords, |
|00001460| 6e 75 6d 62 65 72 73 20 | 61 6e 64 20 73 74 72 69 |numbers |and stri|
|00001470| 6e 67 73 20 69 6e 20 74 | 68 65 20 69 6e 70 75 74 |ngs in t|he input|
|00001480| 20 66 69 6c 65 20 61 72 | 65 20 73 65 70 61 72 61 | file ar|e separa|
|00001490| 74 65 64 20 62 79 20 73 | 70 61 63 65 73 2c 0a 20 |ted by s|paces,. |
|000014a0| 20 74 61 62 73 2c 20 6f | 72 20 6e 65 77 20 6c 69 | tabs, o|r new li|
|000014b0| 6e 65 73 20 28 63 61 72 | 72 69 61 67 65 20 72 65 |nes (car|riage re|
|000014c0| 74 75 72 6e 73 29 2e 20 | 20 54 68 65 73 65 20 60 |turns). | These `|
|000014d0| 60 77 68 69 74 65 73 70 | 61 63 65 27 27 20 63 68 |`whitesp|ace'' ch|
|000014e0| 61 72 61 63 74 65 72 73 | 0a 21 20 61 72 65 20 68 |aracters|.! are h|
|000014f0| 61 6e 64 6c 65 64 20 69 | 64 65 6e 74 69 63 61 6c |andled i|dentical|
|00001500| 6c 79 20 62 79 20 7b 5c | 65 6d 20 72 61 79 73 68 |ly by {\|em raysh|
|00001510| 61 64 65 7d 2c 20 77 68 | 69 63 68 20 6d 65 61 6e |ade}, wh|ich mean|
|00001520| 73 20 74 68 61 74 20 79 | 6f 75 20 63 61 6e 20 73 |s that y|ou can s|
|00001530| 65 70 61 72 61 74 65 0a | 20 20 6b 65 79 77 6f 72 |eparate.| keywor|
|00001540| 64 73 20 66 72 6f 6d 20 | 6b 65 79 77 6f 72 64 73 |ds from |keywords|
|00001550| 2c 20 6b 65 79 20 77 6f | 72 64 73 20 66 72 6f 6d |, key wo|rds from|
|00001560| 20 61 72 67 75 6d 65 6e | 74 73 2c 20 61 6e 64 20 | argumen|ts, and |
|00001570| 61 72 67 75 6d 65 6e 74 | 73 20 66 72 6f 6d 0a 20 |argument|s from. |
|00001580| 20 61 72 67 75 6d 65 6e | 74 73 20 75 73 69 6e 67 | argumen|ts using|
|00001590| 20 61 6e 79 20 63 6f 6d | 62 69 6e 61 74 69 6f 6e | any com|bination|
|000015a0| 20 6f 66 20 77 68 69 74 | 65 73 70 61 63 65 20 63 | of whit|espace c|
|000015b0| 68 61 72 61 63 74 65 72 | 73 20 74 68 61 74 20 79 |haracter|s that y|
|000015c0| 6f 75 20 63 68 6f 6f 73 | 65 2e 0a 20 20 0a 2d 2d |ou choos|e.. .--|
|000015d0| 2d 20 33 39 2c 35 33 20 | 2d 2d 2d 2d 0a 20 20 54 |- 39,53 |----. T|
|000015e0| 68 65 73 65 20 6f 70 74 | 69 6f 6e 73 20 6f 76 65 |hese opt|ions ove|
|000015f0| 72 72 69 64 65 20 74 68 | 65 20 76 61 6c 75 65 73 |rride th|e values|
|00001600| 20 67 69 76 65 6e 20 69 | 6e 20 74 68 65 20 69 6e | given i|n the in|
|00001610| 70 75 74 20 66 69 6c 65 | 2c 0a 20 20 61 6e 64 20 |put file|,. and |
|00001620| 61 72 65 20 65 78 70 6c | 61 69 6e 65 64 20 69 6e |are expl|ained in|
|00001630| 20 64 65 74 61 69 6c 20 | 69 6e 20 41 70 70 65 6e | detail |in Appen|
|00001640| 64 69 78 20 41 2e 0a 20 | 20 0a 21 20 7b 5c 52 61 |dix A.. | .! {\Ra|
|00001650| 79 73 68 61 64 65 7d 20 | 69 73 20 60 60 63 61 73 |yshade} |is ``cas|
|00001660| 65 20 73 65 6e 73 69 74 | 69 76 65 2c 27 27 20 77 |e sensit|ive,'' w|
|00001670| 68 69 63 68 20 6d 65 61 | 6e 73 20 74 68 61 74 20 |hich mea|ns that |
|00001680| 74 79 70 69 6e 67 0a 20 | 20 7b 5c 74 74 20 53 50 |typing. | {\tt SP|
|00001690| 48 45 52 45 7d 20 6f 72 | 20 7b 5c 74 74 20 53 70 |HERE} or| {\tt Sp|
|000016a0| 68 65 72 65 7d 20 69 6e | 73 74 65 61 64 20 6f 66 |here} in|stead of|
|000016b0| 20 7b 5c 74 74 20 73 70 | 68 65 72 65 7d 20 77 6f | {\tt sp|here} wo|
|000016c0| 6e 27 74 20 77 6f 72 6b | 2e 0a 21 20 7b 5c 52 61 |n't work|..! {\Ra|
|000016d0| 79 73 68 61 64 65 7d 20 | 6b 65 79 77 6f 72 64 73 |yshade} |keywords|
|000016e0| 20 61 72 65 20 61 6c 6c | 20 6c 6f 77 65 72 2d 63 | are all| lower-c|
|000016f0| 61 73 65 2e 20 20 4d 61 | 6e 79 20 70 65 6f 70 6c |ase. Ma|ny peopl|
|00001700| 65 20 63 68 6f 6f 73 65 | 20 74 6f 0a 20 20 63 61 |e choose| to. ca|
|00001710| 70 69 74 61 6c 69 7a 65 | 20 74 68 65 20 66 69 72 |pitalize| the fir|
|00001720| 73 74 20 6c 65 74 74 65 | 72 20 6f 66 20 6e 61 6d |st lette|r of nam|
|00001730| 65 73 20 74 68 61 74 20 | 74 68 65 79 20 67 69 76 |es that |they giv|
|00001740| 65 20 74 6f 20 6f 62 6a | 65 63 74 73 0a 20 20 6f |e to obj|ects. o|
|00001750| 72 20 73 75 72 66 61 63 | 65 73 20 69 6e 20 6f 72 |r surfac|es in or|
|00001760| 64 65 72 20 74 6f 20 6d | 61 6b 65 20 74 68 65 6e |der to m|ake then|
|00001770| 20 60 60 73 74 61 6e 64 | 20 6f 75 74 27 27 20 69 | ``stand| out'' i|
|00001780| 6e 20 61 6e 20 69 6e 70 | 75 74 20 66 69 6c 65 2e |n an inp|ut file.|
|00001790| 0a 20 20 0a 20 20 4b 65 | 79 77 6f 72 64 73 2c 20 |. . Ke|ywords, |
|000017a0| 6e 75 6d 62 65 72 73 20 | 61 6e 64 20 73 74 72 69 |numbers |and stri|
|000017b0| 6e 67 73 20 69 6e 20 74 | 68 65 20 69 6e 70 75 74 |ngs in t|he input|
|000017c0| 20 66 69 6c 65 20 61 72 | 65 20 73 65 70 61 72 61 | file ar|e separa|
|000017d0| 74 65 64 20 62 79 20 73 | 70 61 63 65 73 2c 0a 20 |ted by s|paces,. |
|000017e0| 20 74 61 62 73 2c 20 6f | 72 20 6e 65 77 20 6c 69 | tabs, o|r new li|
|000017f0| 6e 65 73 20 28 63 61 72 | 72 69 61 67 65 20 72 65 |nes (car|riage re|
|00001800| 74 75 72 6e 73 29 2e 20 | 20 54 68 65 73 65 20 60 |turns). | These `|
|00001810| 60 77 68 69 74 65 73 70 | 61 63 65 27 27 20 63 68 |`whitesp|ace'' ch|
|00001820| 61 72 61 63 74 65 72 73 | 0a 21 20 61 72 65 20 68 |aracters|.! are h|
|00001830| 61 6e 64 6c 65 64 20 69 | 64 65 6e 74 69 63 61 6c |andled i|dentical|
|00001840| 6c 79 20 62 79 20 7b 5c | 72 61 79 73 68 61 64 65 |ly by {\|rayshade|
|00001850| 7d 2c 20 77 68 69 63 68 | 20 6d 65 61 6e 73 20 74 |}, which| means t|
|00001860| 68 61 74 20 79 6f 75 20 | 63 61 6e 20 73 65 70 61 |hat you |can sepa|
|00001870| 72 61 74 65 0a 20 20 6b | 65 79 77 6f 72 64 73 20 |rate. k|eywords |
|00001880| 66 72 6f 6d 20 6b 65 79 | 77 6f 72 64 73 2c 20 6b |from key|words, k|
|00001890| 65 79 20 77 6f 72 64 73 | 20 66 72 6f 6d 20 61 72 |ey words| from ar|
|000018a0| 67 75 6d 65 6e 74 73 2c | 20 61 6e 64 20 61 72 67 |guments,| and arg|
|000018b0| 75 6d 65 6e 74 73 20 66 | 72 6f 6d 0a 20 20 61 72 |uments f|rom. ar|
|000018c0| 67 75 6d 65 6e 74 73 20 | 75 73 69 6e 67 20 61 6e |guments |using an|
|000018d0| 79 20 63 6f 6d 62 69 6e | 61 74 69 6f 6e 20 6f 66 |y combin|ation of|
|000018e0| 20 77 68 69 74 65 73 70 | 61 63 65 20 63 68 61 72 | whitesp|ace char|
|000018f0| 61 63 74 65 72 73 20 74 | 68 61 74 20 79 6f 75 20 |acters t|hat you |
|00001900| 63 68 6f 6f 73 65 2e 0a | 20 20 0a 2a 2a 2a 2a 2a |choose..| .*****|
|00001910| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 0a 2a 2a 2a 20 37 |********|**.*** 7|
|00001920| 35 2c 39 33 20 2a 2a 2a | 2a 0a 20 20 61 76 61 69 |5,93 ***|*. avai|
|00001930| 6c 61 62 6c 65 20 66 6f | 72 20 75 73 65 20 69 6e |lable fo|r use in|
|00001940| 20 65 78 70 72 65 73 73 | 69 6f 6e 73 2c 20 69 6e | express|ions, in|
|00001950| 20 6f 72 64 65 72 20 6f | 66 20 64 65 63 72 65 61 | order o|f decrea|
|00001960| 73 69 6e 67 20 70 72 65 | 63 65 64 65 6e 63 65 2e |sing pre|cedence.|
|00001970| 0a 20 20 0a 20 20 54 68 | 65 20 75 70 73 68 6f 74 |. . Th|e upshot|
|00001980| 20 6f 66 20 61 6c 6c 20 | 74 68 69 73 20 69 73 20 | of all |this is |
|00001990| 74 68 61 74 20 74 68 65 | 20 73 74 72 69 6e 67 73 |that the| strings|
|000019a0| 0a 21 20 7b 5c 74 74 20 | 24 34 32 24 7d 2c 20 7b |.! {\tt |$42$}, {|
|000019b0| 5c 74 74 20 24 34 32 2e | 24 7d 2c 0a 21 20 7b 5c |\tt $42.|$},.! {\|
|000019c0| 74 74 20 24 28 32 30 20 | 2b 20 32 32 29 24 7d 2c |tt $(20 |+ 22)$},|
|000019d0| 20 61 6e 64 20 7b 5c 74 | 74 20 24 28 37 5e 32 20 | and {\t|t $(7^2 |
|000019e0| 2d 20 37 29 24 7d 20 6d | 65 61 6e 20 74 68 65 20 |- 7)$} m|ean the |
|000019f0| 73 61 6d 65 20 74 68 69 | 6e 67 0a 21 20 74 6f 20 |same thi|ng.! to |
|00001a00| 7b 5c 65 6d 20 72 61 79 | 73 68 61 64 65 7d 2e 0a |{\em ray|shade}..|
|00001a10| 20 20 0a 20 20 56 61 72 | 69 61 62 6c 65 73 20 6d | . Var|iables m|
|00001a20| 61 79 20 61 6c 73 6f 20 | 62 65 20 64 65 66 69 6e |ay also |be defin|
|00001a30| 65 64 20 61 6e 64 20 75 | 73 65 64 20 69 6e 20 65 |ed and u|sed in e|
|00001a40| 78 70 72 65 73 73 69 6f | 6e 73 2e 20 20 53 65 76 |xpressio|ns. Sev|
|00001a50| 65 72 61 6c 0a 21 20 62 | 75 69 6c 74 2d 69 6e 20 |eral.! b|uilt-in |
|00001a60| 66 75 6e 63 74 69 6f 6e | 73 20 61 72 65 20 61 6c |function|s are al|
|00001a70| 73 6f 20 70 72 6f 76 69 | 64 65 64 2e 20 20 53 65 |so provi|ded. Se|
|00001a80| 65 20 61 70 70 65 6e 64 | 69 78 20 42 20 66 6f 72 |e append|ix B for|
|00001a90| 20 66 75 72 74 68 65 72 | 20 64 65 74 61 69 6c 73 | further| details|
|00001aa0| 2e 0a 20 20 0a 21 20 5c | 52 61 79 73 68 61 64 65 |.. .! \|Rayshade|
|00001ab0| 20 77 69 6c 6c 20 61 75 | 74 6f 6d 61 74 69 63 61 | will au|tomatica|
|00001ac0| 6c 6c 79 20 72 75 6e 20 | 74 68 65 20 69 6e 70 75 |lly run |the inpu|
|00001ad0| 74 20 69 74 20 72 65 63 | 65 69 76 65 73 0a 20 20 |t it rec|eives. |
|00001ae0| 74 68 72 6f 75 67 68 20 | 74 68 65 20 43 20 70 72 |through |the C pr|
|00001af0| 65 70 72 6f 63 65 73 73 | 6f 72 20 69 66 20 69 74 |eprocess|or if it|
|00001b00| 20 69 73 20 61 76 61 69 | 6c 61 62 6c 65 2e 20 20 | is avai|lable. |
|00001b10| 54 68 69 73 0a 20 20 61 | 6c 6c 6f 77 73 20 79 6f |This. a|llows yo|
|00001b20| 75 20 74 6f 20 75 73 65 | 20 43 20 70 72 65 70 72 |u to use| C prepr|
|00001b30| 6f 63 65 73 73 6f 72 20 | 64 69 72 65 63 74 69 76 |ocessor |directiv|
|00001b40| 65 73 2c 20 73 75 63 68 | 20 61 73 20 7b 5c 74 74 |es, such| as {\tt|
|00001b50| 20 5c 23 69 6e 63 6c 75 | 64 65 7d 2c 0a 20 20 7b | \#inclu|de},. {|
|00001b60| 5c 74 74 20 5c 23 64 65 | 66 69 6e 65 7d 2c 20 61 |\tt \#de|fine}, a|
|00001b70| 6e 64 20 7b 5c 74 74 20 | 5c 23 69 66 64 65 66 7d |nd {\tt |\#ifdef}|
|00001b80| 20 77 68 65 6e 20 64 65 | 73 69 67 6e 69 6e 67 20 | when de|signing |
|00001b90| 79 6f 75 72 20 69 6e 70 | 75 74 20 66 69 6c 65 73 |your inp|ut files|
|00001ba0| 2e 0a 20 20 0a 21 20 43 | 6f 6d 6d 65 6e 74 73 20 |.. .! C|omments |
|00001bb0| 6d 61 79 20 62 65 20 69 | 6e 63 6c 75 64 65 64 20 |may be i|ncluded |
|00001bc0| 69 6e 20 5c 72 61 79 73 | 68 61 64 65 20 69 6e 70 |in \rays|hade inp|
|00001bd0| 75 74 20 66 69 6c 65 73 | 20 62 79 20 65 6e 63 6c |ut files| by encl|
|00001be0| 6f 73 69 6e 67 0a 20 20 | 74 65 78 74 20 62 65 74 |osing. |text bet|
|00001bf0| 77 65 65 6e 20 74 68 65 | 20 73 74 72 69 6e 67 73 |ween the| strings|
|00001c00| 20 5c 76 65 72 62 21 2f | 2a 21 20 61 6e 64 20 5c | \verb!/|*! and \|
|00001c10| 76 65 72 62 21 2a 2f 21 | 2c 20 61 73 20 69 6e 20 |verb!*/!|, as in |
|00001c20| 74 68 65 20 43 0a 20 20 | 70 72 6f 67 72 61 6d 6d |the C. |programm|
|00001c30| 69 6e 67 0a 20 20 6c 61 | 6e 67 75 61 67 65 2e 0a |ing. la|nguage..|
|00001c40| 2d 2d 2d 20 37 36 2c 39 | 34 20 2d 2d 2d 2d 0a 20 |--- 76,9|4 ----. |
|00001c50| 20 61 76 61 69 6c 61 62 | 6c 65 20 66 6f 72 20 75 | availab|le for u|
|00001c60| 73 65 20 69 6e 20 65 78 | 70 72 65 73 73 69 6f 6e |se in ex|pression|
|00001c70| 73 2c 20 69 6e 20 6f 72 | 64 65 72 20 6f 66 20 64 |s, in or|der of d|
|00001c80| 65 63 72 65 61 73 69 6e | 67 20 70 72 65 63 65 64 |ecreasin|g preced|
|00001c90| 65 6e 63 65 2e 0a 20 20 | 0a 20 20 54 68 65 20 75 |ence.. |. The u|
|00001ca0| 70 73 68 6f 74 20 6f 66 | 20 61 6c 6c 20 74 68 69 |pshot of| all thi|
|00001cb0| 73 20 69 73 20 74 68 61 | 74 20 74 68 65 20 73 74 |s is tha|t the st|
|00001cc0| 72 69 6e 67 73 0a 21 20 | 7b 5c 74 74 20 34 32 7d |rings.! |{\tt 42}|
|00001cd0| 2c 20 7b 5c 74 74 20 34 | 32 2e 7d 2c 0a 21 20 7b |, {\tt 4|2.},.! {|
|00001ce0| 5c 74 74 20 28 32 30 20 | 2b 20 32 32 29 7d 2c 20 |\tt (20 |+ 22)}, |
|00001cf0| 61 6e 64 20 7b 5c 74 74 | 20 28 37 5c 76 65 72 62 |and {\tt| (7\verb|
|00001d00| 21 5e 21 32 20 2d 20 37 | 29 7d 20 6d 65 61 6e 20 |!^!2 - 7|)} mean |
|00001d10| 74 68 65 20 73 61 6d 65 | 20 74 68 69 6e 67 0a 21 |the same| thing.!|
|00001d20| 20 74 6f 20 7b 5c 72 61 | 79 73 68 61 64 65 7d 2e | to {\ra|yshade}.|
|00001d30| 0a 20 20 0a 20 20 56 61 | 72 69 61 62 6c 65 73 20 |. . Va|riables |
|00001d40| 6d 61 79 20 61 6c 73 6f | 20 62 65 20 64 65 66 69 |may also| be defi|
|00001d50| 6e 65 64 20 61 6e 64 20 | 75 73 65 64 20 69 6e 20 |ned and |used in |
|00001d60| 65 78 70 72 65 73 73 69 | 6f 6e 73 2e 20 20 53 65 |expressi|ons. Se|
|00001d70| 76 65 72 61 6c 0a 21 20 | 62 75 69 6c 74 2d 69 6e |veral.! |built-in|
|00001d80| 20 66 75 6e 63 74 69 6f | 6e 73 20 61 72 65 20 61 | functio|ns are a|
|00001d90| 6c 73 6f 20 70 72 6f 76 | 69 64 65 64 2e 20 20 53 |lso prov|ided. S|
|00001da0| 65 65 20 41 70 70 65 6e | 64 69 78 20 42 20 66 6f |ee Appen|dix B fo|
|00001db0| 72 20 66 75 72 74 68 65 | 72 20 64 65 74 61 69 6c |r furthe|r detail|
|00001dc0| 73 2e 0a 20 20 0a 21 20 | 7b 5c 52 61 79 73 68 61 |s.. .! |{\Raysha|
|00001dd0| 64 65 7d 20 77 69 6c 6c | 20 61 75 74 6f 6d 61 74 |de} will| automat|
|00001de0| 69 63 61 6c 6c 79 20 72 | 75 6e 20 74 68 65 20 69 |ically r|un the i|
|00001df0| 6e 70 75 74 20 69 74 20 | 72 65 63 65 69 76 65 73 |nput it |receives|
|00001e00| 0a 20 20 74 68 72 6f 75 | 67 68 20 74 68 65 20 43 |. throu|gh the C|
|00001e10| 20 70 72 65 70 72 6f 63 | 65 73 73 6f 72 20 69 66 | preproc|essor if|
|00001e20| 20 69 74 20 69 73 20 61 | 76 61 69 6c 61 62 6c 65 | it is a|vailable|
|00001e30| 2e 20 20 54 68 69 73 0a | 20 20 61 6c 6c 6f 77 73 |. This.| allows|
|00001e40| 20 79 6f 75 20 74 6f 20 | 75 73 65 20 43 20 70 72 | you to |use C pr|
|00001e50| 65 70 72 6f 63 65 73 73 | 6f 72 20 64 69 72 65 63 |eprocess|or direc|
|00001e60| 74 69 76 65 73 2c 20 73 | 75 63 68 20 61 73 20 7b |tives, s|uch as {|
|00001e70| 5c 74 74 20 5c 23 69 6e | 63 6c 75 64 65 7d 2c 0a |\tt \#in|clude},.|
|00001e80| 20 20 7b 5c 74 74 20 5c | 23 64 65 66 69 6e 65 7d | {\tt \|#define}|
|00001e90| 2c 20 61 6e 64 20 7b 5c | 74 74 20 5c 23 69 66 64 |, and {\|tt \#ifd|
|00001ea0| 65 66 7d 20 77 68 65 6e | 20 64 65 73 69 67 6e 69 |ef} when| designi|
|00001eb0| 6e 67 20 79 6f 75 72 20 | 69 6e 70 75 74 20 66 69 |ng your |input fi|
|00001ec0| 6c 65 73 2e 0a 20 20 0a | 21 20 43 6f 6d 6d 65 6e |les.. .|! Commen|
|00001ed0| 74 73 20 6d 61 79 20 62 | 65 20 69 6e 63 6c 75 64 |ts may b|e includ|
|00001ee0| 65 64 20 69 6e 20 7b 5c | 72 61 79 73 68 61 64 65 |ed in {\|rayshade|
|00001ef0| 7d 20 69 6e 70 75 74 20 | 66 69 6c 65 73 20 62 79 |} input |files by|
|00001f00| 20 65 6e 63 6c 6f 73 69 | 6e 67 0a 20 20 74 65 78 | enclosi|ng. tex|
|00001f10| 74 20 62 65 74 77 65 65 | 6e 20 74 68 65 20 73 74 |t betwee|n the st|
|00001f20| 72 69 6e 67 73 20 5c 76 | 65 72 62 21 2f 2a 21 20 |rings \v|erb!/*! |
|00001f30| 61 6e 64 20 5c 76 65 72 | 62 21 2a 2f 21 2c 20 61 |and \ver|b!*/!, a|
|00001f40| 73 20 69 6e 20 74 68 65 | 20 43 0a 20 20 70 72 6f |s in the| C. pro|
|00001f50| 67 72 61 6d 6d 69 6e 67 | 0a 20 20 6c 61 6e 67 75 |gramming|. langu|
|00001f60| 61 67 65 2e 0a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |age..***|********|
|00001f70| 2a 2a 2a 2a 0a 2a 2a 2a | 20 39 34 2c 31 30 31 20 |****.***| 94,101 |
|00001f80| 2a 2a 2a 2a 0a 20 20 0a | 20 20 5c 73 65 63 74 69 |****. .| \secti|
|00001f90| 6f 6e 7b 49 6d 61 67 65 | 73 7d 0a 20 20 0a 21 20 |on{Image|s}. .! |
|00001fa0| 54 68 65 20 65 6e 64 20 | 72 65 73 75 6c 74 20 6f |The end |result o|
|00001fb0| 66 20 72 75 6e 6e 69 6e | 67 20 5c 72 61 79 73 68 |f runnin|g \raysh|
|00001fc0| 61 64 65 20 69 73 20 61 | 6e 20 69 6d 61 67 65 20 |ade is a|n image |
|00001fd0| 66 69 6c 65 2e 20 20 44 | 65 70 65 6e 64 69 6e 67 |file. D|epending|
|00001fe0| 20 75 70 6f 6e 0a 21 20 | 68 6f 77 20 69 74 20 77 | upon.! |how it w|
|00001ff0| 61 73 20 69 6e 73 74 61 | 6c 6c 65 64 2c 20 5c 72 |as insta|lled, \r|
|00002000| 61 79 73 68 61 64 65 20 | 77 72 69 74 65 73 20 69 |ayshade |writes i|
|00002010| 6d 61 67 65 73 20 69 6e | 20 65 69 74 68 65 72 20 |mages in| either |
|00002020| 74 68 65 20 55 74 61 68 | 20 52 61 73 74 65 72 0a |the Utah| Raster.|
|00002030| 20 20 7b 5c 65 6d 20 52 | 4c 45 7d 20 66 6f 72 6d | {\em R|LE} form|
|00002040| 61 74 20 6f 72 20 61 20 | 67 65 6e 65 72 69 63 20 |at or a |generic |
|00002050| 62 75 74 20 65 61 73 69 | 6c 79 2d 6d 61 6e 69 70 |but easi|ly-manip|
|00002060| 75 6c 61 74 65 64 20 7b | 5c 65 6d 20 6d 74 76 7d |ulated {|\em mtv}|
|00002070| 20 66 6f 72 6d 61 74 0a | 20 20 75 73 65 64 20 62 | format.| used b|
|00002080| 79 20 4d 61 72 6b 20 56 | 61 6e 64 65 57 65 74 74 |y Mark V|andeWett|
|00002090| 65 72 69 6e 67 20 69 6e | 20 68 69 73 20 7b 5c 65 |ering in| his {\e|
|000020a0| 6d 20 6d 74 76 7d 20 72 | 61 79 20 74 72 61 63 65 |m mtv} r|ay trace|
|000020b0| 72 2e 20 20 54 68 65 20 | 7b 5c 65 6d 20 6d 74 76 |r. The |{\em mtv|
|000020c0| 7d 0a 20 20 66 6f 72 6d | 61 74 20 63 6f 6e 73 69 |}. form|at consi|
|000020d0| 73 74 73 20 6f 66 20 61 | 20 68 65 61 64 65 72 20 |sts of a| header |
|000020e0| 67 69 76 69 6e 67 20 74 | 68 65 20 72 65 73 6f 6c |giving t|he resol|
|000020f0| 75 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 69 6d 61 |ution of| the ima|
|00002100| 67 65 20 66 6f 6c 6c 6f | 77 65 64 0a 2d 2d 2d 20 |ge follo|wed.--- |
|00002110| 39 35 2c 31 30 32 20 2d | 2d 2d 2d 0a 20 20 0a 20 |95,102 -|---. . |
|00002120| 20 5c 73 65 63 74 69 6f | 6e 7b 49 6d 61 67 65 73 | \sectio|n{Images|
|00002130| 7d 0a 20 20 0a 21 20 54 | 68 65 20 65 6e 64 20 72 |}. .! T|he end r|
|00002140| 65 73 75 6c 74 20 6f 66 | 20 72 75 6e 6e 69 6e 67 |esult of| running|
|00002150| 20 7b 5c 72 61 79 73 68 | 61 64 65 7d 20 69 73 20 | {\raysh|ade} is |
|00002160| 61 6e 20 69 6d 61 67 65 | 20 66 69 6c 65 2e 20 20 |an image| file. |
|00002170| 44 65 70 65 6e 64 69 6e | 67 20 75 70 6f 6e 0a 21 |Dependin|g upon.!|
|00002180| 20 68 6f 77 20 69 74 20 | 77 61 73 20 69 6e 73 74 | how it |was inst|
|00002190| 61 6c 6c 65 64 2c 20 7b | 5c 72 61 79 73 68 61 64 |alled, {|\rayshad|
|000021a0| 65 7d 20 77 72 69 74 65 | 73 20 69 6d 61 67 65 73 |e} write|s images|
|000021b0| 20 69 6e 20 65 69 74 68 | 65 72 20 74 68 65 20 55 | in eith|er the U|
|000021c0| 74 61 68 20 52 61 73 74 | 65 72 0a 20 20 7b 5c 65 |tah Rast|er. {\e|
|000021d0| 6d 20 52 4c 45 7d 20 66 | 6f 72 6d 61 74 20 6f 72 |m RLE} f|ormat or|
|000021e0| 20 61 20 67 65 6e 65 72 | 69 63 20 62 75 74 20 65 | a gener|ic but e|
|000021f0| 61 73 69 6c 79 2d 6d 61 | 6e 69 70 75 6c 61 74 65 |asily-ma|nipulate|
|00002200| 64 20 7b 5c 65 6d 20 6d | 74 76 7d 20 66 6f 72 6d |d {\em m|tv} form|
|00002210| 61 74 0a 20 20 75 73 65 | 64 20 62 79 20 4d 61 72 |at. use|d by Mar|
|00002220| 6b 20 56 61 6e 64 65 57 | 65 74 74 65 72 69 6e 67 |k VandeW|ettering|
|00002230| 20 69 6e 20 68 69 73 20 | 7b 5c 65 6d 20 6d 74 76 | in his |{\em mtv|
|00002240| 7d 20 72 61 79 20 74 72 | 61 63 65 72 2e 20 20 54 |} ray tr|acer. T|
|00002250| 68 65 20 7b 5c 65 6d 20 | 6d 74 76 7d 0a 20 20 66 |he {\em |mtv}. f|
|00002260| 6f 72 6d 61 74 20 63 6f | 6e 73 69 73 74 73 20 6f |ormat co|nsists o|
|00002270| 66 20 61 20 68 65 61 64 | 65 72 20 67 69 76 69 6e |f a head|er givin|
|00002280| 67 20 74 68 65 20 72 65 | 73 6f 6c 75 74 69 6f 6e |g the re|solution|
|00002290| 20 6f 66 20 74 68 65 20 | 69 6d 61 67 65 20 66 6f | of the |image fo|
|000022a0| 6c 6c 6f 77 65 64 0a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |llowed.*|********|
|000022b0| 2a 2a 2a 2a 2a 2a 0a 2a | 2a 2a 20 31 30 33 2c 31 |******.*|** 103,1|
|000022c0| 30 39 20 2a 2a 2a 2a 0a | 20 20 73 75 70 70 6f 72 |09 ****.| suppor|
|000022d0| 74 73 20 61 6e 20 61 72 | 62 69 74 72 61 72 79 20 |ts an ar|bitrary |
|000022e0| 6e 75 6d 62 65 72 20 6f | 66 20 63 6f 6c 6f 72 20 |number o|f color |
|000022f0| 63 68 61 6e 6e 65 6c 73 | 2c 0a 20 20 61 6e 20 61 |channels|,. an a|
|00002300| 6c 70 68 61 20 63 68 61 | 6e 6e 65 6c 2c 20 63 6f |lpha cha|nnel, co|
|00002310| 6d 6d 65 6e 74 73 2c 20 | 61 20 68 69 73 74 6f 72 |mments, |a histor|
|00002320| 79 20 66 69 65 6c 64 2c | 20 61 6e 64 20 74 68 65 |y field,| and the|
|00002330| 20 61 62 69 6c 69 74 79 | 0a 20 20 74 6f 20 74 72 | ability|. to tr|
|00002340| 65 61 74 20 69 6d 61 67 | 65 73 20 61 73 20 77 69 |eat imag|es as wi|
|00002350| 6e 64 6f 77 73 20 69 6e | 74 6f 20 61 20 6c 61 72 |ndows in|to a lar|
|00002360| 67 65 72 20 69 6d 61 67 | 65 2e 20 20 41 73 20 61 |ger imag|e. As a|
|00002370| 20 72 65 73 75 6c 74 20 | 6f 66 20 74 68 69 73 0a | result |of this.|
|00002380| 21 20 66 6c 65 78 69 62 | 69 6c 69 74 79 2c 20 61 |! flexib|ility, a|
|00002390| 20 6e 75 6d 62 65 72 20 | 6f 66 20 7b 5c 65 6d 20 | number |of {\em |
|000023a0| 72 61 79 73 68 61 64 65 | 7d 27 73 20 66 65 61 74 |rayshade|}'s feat|
|000023b0| 75 72 65 73 0a 20 20 61 | 72 65 20 6e 6f 74 0a 20 |ures. a|re not. |
|000023c0| 20 73 75 70 70 6f 72 74 | 65 64 20 69 66 20 74 68 | support|ed if th|
|000023d0| 65 20 7b 5c 65 6d 20 6d | 74 76 7d 20 66 6f 72 6d |e {\em m|tv} form|
|000023e0| 61 74 20 69 73 20 62 65 | 69 6e 67 20 75 73 65 64 |at is be|ing used|
|000023f0| 2e 20 59 6f 75 20 61 72 | 65 20 74 68 75 73 20 73 |. You ar|e thus s|
|00002400| 74 72 6f 6e 67 6c 79 0a | 20 20 65 6e 63 6f 75 72 |trongly.| encour|
|00002410| 61 67 65 64 20 74 6f 20 | 6f 62 74 61 69 6e 20 61 |aged to |obtain a|
|00002420| 20 63 6f 70 79 20 6f 66 | 20 74 68 65 20 55 74 61 | copy of| the Uta|
|00002430| 68 20 52 61 73 74 65 72 | 20 54 6f 6f 6c 6b 69 74 |h Raster| Toolkit|
|00002440| 2e 0a 2d 2d 2d 20 31 30 | 34 2c 31 31 30 20 2d 2d |..--- 10|4,110 --|
|00002450| 2d 2d 0a 20 20 73 75 70 | 70 6f 72 74 73 20 61 6e |--. sup|ports an|
|00002460| 20 61 72 62 69 74 72 61 | 72 79 20 6e 75 6d 62 65 | arbitra|ry numbe|
|00002470| 72 20 6f 66 20 63 6f 6c | 6f 72 20 63 68 61 6e 6e |r of col|or chann|
|00002480| 65 6c 73 2c 0a 20 20 61 | 6e 20 61 6c 70 68 61 20 |els,. a|n alpha |
|00002490| 63 68 61 6e 6e 65 6c 2c | 20 63 6f 6d 6d 65 6e 74 |channel,| comment|
|000024a0| 73 2c 20 61 20 68 69 73 | 74 6f 72 79 20 66 69 65 |s, a his|tory fie|
|000024b0| 6c 64 2c 20 61 6e 64 20 | 74 68 65 20 61 62 69 6c |ld, and |the abil|
|000024c0| 69 74 79 0a 20 20 74 6f | 20 74 72 65 61 74 20 69 |ity. to| treat i|
|000024d0| 6d 61 67 65 73 20 61 73 | 20 77 69 6e 64 6f 77 73 |mages as| windows|
|000024e0| 20 69 6e 74 6f 20 61 20 | 6c 61 72 67 65 72 20 69 | into a |larger i|
|000024f0| 6d 61 67 65 2e 20 20 41 | 73 20 61 20 72 65 73 75 |mage. A|s a resu|
|00002500| 6c 74 20 6f 66 20 74 68 | 69 73 0a 21 20 66 6c 65 |lt of th|is.! fle|
|00002510| 78 69 62 69 6c 69 74 79 | 2c 20 61 20 6e 75 6d 62 |xibility|, a numb|
|00002520| 65 72 20 6f 66 20 7b 5c | 72 61 79 73 68 61 64 65 |er of {\|rayshade|
|00002530| 7d 27 73 20 66 65 61 74 | 75 72 65 73 0a 20 20 61 |}'s feat|ures. a|
|00002540| 72 65 20 6e 6f 74 0a 20 | 20 73 75 70 70 6f 72 74 |re not. | support|
|00002550| 65 64 20 69 66 20 74 68 | 65 20 7b 5c 65 6d 20 6d |ed if th|e {\em m|
|00002560| 74 76 7d 20 66 6f 72 6d | 61 74 20 69 73 20 62 65 |tv} form|at is be|
|00002570| 69 6e 67 20 75 73 65 64 | 2e 20 59 6f 75 20 61 72 |ing used|. You ar|
|00002580| 65 20 74 68 75 73 20 73 | 74 72 6f 6e 67 6c 79 0a |e thus s|trongly.|
|00002590| 20 20 65 6e 63 6f 75 72 | 61 67 65 64 20 74 6f 20 | encour|aged to |
|000025a0| 6f 62 74 61 69 6e 20 61 | 20 63 6f 70 79 20 6f 66 |obtain a| copy of|
|000025b0| 20 74 68 65 20 55 74 61 | 68 20 52 61 73 74 65 72 | the Uta|h Raster|
|000025c0| 20 54 6f 6f 6c 6b 69 74 | 2e 0a 2a 2a 2a 2a 2a 2a | Toolkit|..******|
|000025d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 0a 2a 2a 2a 20 31 31 |********|*.*** 11|
|000025e0| 32 2c 31 31 38 20 2a 2a | 2a 2a 0a 20 20 66 6f 72 |2,118 **|**. for|
|000025f0| 6d 61 74 20 69 73 20 75 | 73 65 64 2c 20 74 68 65 |mat is u|sed, the|
|00002600| 20 69 6d 61 67 65 20 77 | 69 6c 6c 20 28 61 6e 64 | image w|ill (and|
|00002610| 20 6d 75 73 74 29 20 63 | 6f 6e 73 69 73 74 20 6f | must) c|onsist o|
|00002620| 66 20 74 68 72 65 65 20 | 65 69 67 68 74 2d 62 69 |f three |eight-bi|
|00002630| 74 0a 20 20 63 6f 6c 6f | 72 20 63 68 61 6e 6e 65 |t. colo|r channe|
|00002640| 6c 73 2e 0a 20 20 49 66 | 20 74 68 65 20 7b 5c 65 |ls.. If| the {\e|
|00002650| 6d 20 52 4c 45 7d 20 66 | 6f 72 6d 61 74 20 69 73 |m RLE} f|ormat is|
|00002660| 20 75 73 65 64 2c 20 74 | 68 65 20 69 6d 61 67 65 | used, t|he image|
|00002670| 20 66 69 6c 65 20 63 6f | 6e 73 69 73 74 73 20 6f | file co|nsists o|
|00002680| 66 20 74 68 72 65 65 0a | 21 20 65 69 67 68 74 2d |f three.|! eight-|
|00002690| 62 69 74 20 63 6f 6c 6f | 72 20 63 68 61 6e 6e 65 |bit colo|r channe|
|000026a0| 6c 73 20 70 6c 75 73 20 | 61 6e 20 65 69 67 68 74 |ls plus |an eight|
|000026b0| 2d 62 69 74 20 61 6c 70 | 68 61 20 63 68 61 6e 6e |-bit alp|ha chann|
|000026c0| 65 6c 2e 20 20 5c 52 61 | 79 73 68 61 64 65 0a 20 |el. \Ra|yshade. |
|000026d0| 20 61 6c 73 6f 20 64 6f | 63 75 6d 65 6e 74 73 20 | also do|cuments |
|000026e0| 69 6e 20 74 68 65 20 7b | 5c 65 6d 20 52 4c 45 7d |in the {|\em RLE}|
|000026f0| 20 68 65 61 64 65 72 20 | 74 68 65 20 63 6f 6d 6d | header |the comm|
|00002700| 61 6e 64 20 6c 69 6e 65 | 20 61 6e 64 20 7b 5c 65 |and line| and {\e|
|00002710| 6d 20 67 61 6d 6d 61 7d | 0a 20 20 76 61 6c 75 65 |m gamma}|. value|
|00002720| 20 75 73 65 64 20 69 6e | 20 63 72 65 61 74 69 6e | used in| creatin|
|00002730| 67 20 74 68 65 20 69 6d | 61 67 65 2e 0a 20 20 0a |g the im|age.. .|
|00002740| 2d 2d 2d 20 31 31 33 2c | 31 31 39 20 2d 2d 2d 2d |--- 113,|119 ----|
|00002750| 0a 20 20 66 6f 72 6d 61 | 74 20 69 73 20 75 73 65 |. forma|t is use|
|00002760| 64 2c 20 74 68 65 20 69 | 6d 61 67 65 20 77 69 6c |d, the i|mage wil|
|00002770| 6c 20 28 61 6e 64 20 6d | 75 73 74 29 20 63 6f 6e |l (and m|ust) con|
|00002780| 73 69 73 74 20 6f 66 20 | 74 68 72 65 65 20 65 69 |sist of |three ei|
|00002790| 67 68 74 2d 62 69 74 0a | 20 20 63 6f 6c 6f 72 20 |ght-bit.| color |
|000027a0| 63 68 61 6e 6e 65 6c 73 | 2e 0a 20 20 49 66 20 74 |channels|.. If t|
|000027b0| 68 65 20 7b 5c 65 6d 20 | 52 4c 45 7d 20 66 6f 72 |he {\em |RLE} for|
|000027c0| 6d 61 74 20 69 73 20 75 | 73 65 64 2c 20 74 68 65 |mat is u|sed, the|
|000027d0| 20 69 6d 61 67 65 20 66 | 69 6c 65 20 63 6f 6e 73 | image f|ile cons|
|000027e0| 69 73 74 73 20 6f 66 20 | 74 68 72 65 65 0a 21 20 |ists of |three.! |
|000027f0| 65 69 67 68 74 2d 62 69 | 74 20 63 6f 6c 6f 72 20 |eight-bi|t color |
|00002800| 63 68 61 6e 6e 65 6c 73 | 20 70 6c 75 73 20 61 6e |channels| plus an|
|00002810| 20 65 69 67 68 74 2d 62 | 69 74 20 61 6c 70 68 61 | eight-b|it alpha|
|00002820| 20 63 68 61 6e 6e 65 6c | 2e 20 20 7b 5c 52 61 79 | channel|. {\Ray|
|00002830| 73 68 61 64 65 7d 0a 20 | 20 61 6c 73 6f 20 64 6f |shade}. | also do|
|00002840| 63 75 6d 65 6e 74 73 20 | 69 6e 20 74 68 65 20 7b |cuments |in the {|
|00002850| 5c 65 6d 20 52 4c 45 7d | 20 68 65 61 64 65 72 20 |\em RLE}| header |
|00002860| 74 68 65 20 63 6f 6d 6d | 61 6e 64 20 6c 69 6e 65 |the comm|and line|
|00002870| 20 61 6e 64 20 7b 5c 65 | 6d 20 67 61 6d 6d 61 7d | and {\e|m gamma}|
|00002880| 0a 20 20 76 61 6c 75 65 | 20 75 73 65 64 20 69 6e |. value| used in|
|00002890| 20 63 72 65 61 74 69 6e | 67 20 74 68 65 20 69 6d | creatin|g the im|
|000028a0| 61 67 65 2e 0a 20 20 0a | 2a 2a 2a 2a 2a 2a 2a 2a |age.. .|********|
|000028b0| 2a 2a 2a 2a 2a 2a 2a 0a | 2a 2a 2a 20 31 32 32 2c |*******.|*** 122,|
|000028c0| 31 33 31 20 2a 2a 2a 2a | 0a 20 20 55 74 61 68 20 |131 ****|. Utah |
|000028d0| 52 61 73 74 65 72 20 54 | 6f 6f 6c 6b 69 74 20 63 |Raster T|oolkit c|
|000028e0| 61 6e 20 62 65 20 75 73 | 65 64 20 74 6f 20 6d 61 |an be us|ed to ma|
|000028f0| 6e 69 70 75 6c 61 74 65 | 20 74 68 65 20 72 65 73 |nipulate| the res|
|00002900| 75 6c 74 69 6e 67 20 60 | 60 6d 6f 76 69 65 27 27 |ulting `|`movie''|
|00002910| 0a 20 20 66 69 6c 65 73 | 2e 0a 20 20 49 66 20 74 |. files|.. If t|
|00002920| 68 65 20 54 6f 6f 6c 6b | 69 74 20 69 73 20 6e 6f |he Toolk|it is no|
|00002930| 74 20 62 65 69 6e 67 20 | 75 73 65 64 2c 20 79 6f |t being |used, yo|
|00002940| 75 20 77 69 6c 6c 20 70 | 72 6f 62 61 62 6c 79 20 |u will p|robably |
|00002950| 6e 65 65 64 20 74 6f 20 | 77 72 69 74 65 0a 21 20 |need to |write.! |
|00002960| 75 74 69 6c 69 74 79 20 | 70 72 6f 67 72 61 6d 73 |utility |programs|
|00002970| 20 74 6f 20 68 61 6e 64 | 6c 65 20 74 68 65 20 64 | to hand|le the d|
|00002980| 65 63 69 64 65 64 6c 79 | 20 6e 6f 6e 2d 73 74 61 |ecidedly| non-sta|
|00002990| 6e 64 61 72 64 20 6d 75 | 6c 74 2d 69 6d 61 67 65 |ndard mu|lt-image|
|000029a0| 20 60 60 6d 74 76 27 27 | 0a 20 20 66 6f 72 6d 61 | ``mtv''|. forma|
|000029b0| 74 20 66 69 6c 65 73 2e | 0a 20 20 0a 21 20 42 79 |t files.|. .! By|
|000029c0| 20 64 65 66 61 75 6c 74 | 2c 20 5c 72 61 79 73 68 | default|, \raysh|
|000029d0| 61 64 65 20 77 72 69 74 | 65 73 20 74 68 65 20 63 |ade writ|es the c|
|000029e0| 6f 6d 70 75 74 65 64 20 | 69 6d 61 67 65 20 74 6f |omputed |image to|
|000029f0| 20 74 68 65 20 73 74 61 | 6e 64 61 72 64 20 6f 75 | the sta|ndard ou|
|00002a00| 74 70 75 74 2e 0a 20 20 | 54 68 65 20 69 6d 61 67 |tput.. |The imag|
|00002a10| 65 20 66 69 6c 65 20 6d | 61 79 20 62 65 20 77 72 |e file m|ay be wr|
|00002a20| 69 74 74 65 6e 20 74 6f | 20 61 20 66 69 6c 65 20 |itten to| a file |
|00002a30| 69 6e 73 74 65 61 64 20 | 62 79 20 73 70 65 63 69 |instead |by speci|
|00002a40| 66 79 69 6e 67 20 61 20 | 66 69 6c 65 20 6e 61 6d |fying a |file nam|
|00002a50| 65 0a 20 20 69 6e 20 74 | 68 65 20 69 6e 70 75 74 |e. in t|he input|
|00002a60| 20 73 74 72 65 61 6d 2e | 0a 20 20 0a 2d 2d 2d 20 | stream.|. .--- |
|00002a70| 31 32 33 2c 31 33 32 20 | 2d 2d 2d 2d 0a 20 20 55 |123,132 |----. U|
|00002a80| 74 61 68 20 52 61 73 74 | 65 72 20 54 6f 6f 6c 6b |tah Rast|er Toolk|
|00002a90| 69 74 20 63 61 6e 20 62 | 65 20 75 73 65 64 20 74 |it can b|e used t|
|00002aa0| 6f 20 6d 61 6e 69 70 75 | 6c 61 74 65 20 74 68 65 |o manipu|late the|
|00002ab0| 20 72 65 73 75 6c 74 69 | 6e 67 20 60 60 6d 6f 76 | resulti|ng ``mov|
|00002ac0| 69 65 27 27 0a 20 20 66 | 69 6c 65 73 2e 0a 20 20 |ie''. f|iles.. |
|00002ad0| 49 66 20 74 68 65 20 54 | 6f 6f 6c 6b 69 74 20 69 |If the T|oolkit i|
|00002ae0| 73 20 6e 6f 74 20 62 65 | 69 6e 67 20 75 73 65 64 |s not be|ing used|
|00002af0| 2c 20 79 6f 75 20 77 69 | 6c 6c 20 70 72 6f 62 61 |, you wi|ll proba|
|00002b00| 62 6c 79 20 6e 65 65 64 | 20 74 6f 20 77 72 69 74 |bly need| to writ|
|00002b10| 65 0a 21 20 75 74 69 6c | 69 74 79 20 70 72 6f 67 |e.! util|ity prog|
|00002b20| 72 61 6d 73 20 74 6f 20 | 68 61 6e 64 6c 65 20 74 |rams to |handle t|
|00002b30| 68 65 20 64 65 63 69 64 | 65 64 6c 79 20 6e 6f 6e |he decid|edly non|
|00002b40| 2d 73 74 61 6e 64 61 72 | 64 20 6d 75 6c 74 69 2d |-standar|d multi-|
|00002b50| 69 6d 61 67 65 20 7b 5c | 65 6d 20 6d 74 76 7d 0a |image {\|em mtv}.|
|00002b60| 20 20 66 6f 72 6d 61 74 | 20 66 69 6c 65 73 2e 0a | format| files..|
|00002b70| 20 20 0a 21 20 42 79 20 | 64 65 66 61 75 6c 74 2c | .! By |default,|
|00002b80| 20 7b 5c 72 61 79 73 68 | 61 64 65 7d 20 77 72 69 | {\raysh|ade} wri|
|00002b90| 74 65 73 20 74 68 65 20 | 63 6f 6d 70 75 74 65 64 |tes the |computed|
|00002ba0| 20 69 6d 61 67 65 20 74 | 6f 20 74 68 65 20 73 74 | image t|o the st|
|00002bb0| 61 6e 64 61 72 64 20 6f | 75 74 70 75 74 2e 0a 20 |andard o|utput.. |
|00002bc0| 20 54 68 65 20 69 6d 61 | 67 65 20 66 69 6c 65 20 | The ima|ge file |
|00002bd0| 6d 61 79 20 62 65 20 77 | 72 69 74 74 65 6e 20 74 |may be w|ritten t|
|00002be0| 6f 20 61 20 66 69 6c 65 | 20 69 6e 73 74 65 61 64 |o a file| instead|
|00002bf0| 20 62 79 20 73 70 65 63 | 69 66 79 69 6e 67 20 61 | by spec|ifying a|
|00002c00| 20 66 69 6c 65 20 6e 61 | 6d 65 0a 20 20 69 6e 20 | file na|me. in |
|00002c10| 74 68 65 20 69 6e 70 75 | 74 20 73 74 72 65 61 6d |the inpu|t stream|
|00002c20| 2e 0a 20 20 0a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.. .***|********|
|00002c30| 2a 2a 2a 2a 0a 2a 2a 2a | 20 31 33 37 2c 31 34 33 |****.***| 137,143|
|00002c40| 20 2a 2a 2a 2a 0a 20 20 | 0a 20 20 54 68 65 20 73 | ****. |. The s|
|00002c50| 69 7a 65 20 6f 66 20 74 | 68 65 20 6f 75 74 70 75 |ize of t|he outpu|
|00002c60| 74 20 69 6d 61 67 65 20 | 69 73 20 6d 65 61 73 75 |t image |is measu|
|00002c70| 72 65 64 20 69 6e 20 70 | 69 78 65 6c 73 2e 20 20 |red in p|ixels. |
|00002c80| 54 68 65 20 7b 5c 65 6d | 20 78 7d 20 73 69 7a 65 |The {\em| x} size|
|00002c90| 0a 20 20 69 73 20 74 68 | 65 20 6e 75 6d 62 65 72 |. is th|e number|
|00002ca0| 20 6f 66 20 70 69 78 65 | 6c 73 20 6c 65 66 74 2d | of pixe|ls left-|
|00002cb0| 74 6f 2d 72 69 67 68 74 | 2c 20 77 68 69 6c 65 20 |to-right|, while |
|00002cc0| 74 68 65 20 7b 5c 65 6d | 20 79 7d 20 73 69 7a 65 |the {\em| y} size|
|00002cd0| 20 69 73 0a 21 20 74 68 | 65 20 6e 75 6d 62 65 72 | is.! th|e number|
|00002ce0| 20 6f 66 20 70 69 78 65 | 6c 73 20 74 6f 70 2d 74 | of pixe|ls top-t|
|00002cf0| 6f 2d 62 6f 74 74 6f 6d | 2e 0a 20 20 0a 20 20 5c |o-bottom|.. . \|
|00002d00| 62 65 67 69 6e 7b 64 65 | 66 6b 65 79 7d 7b 73 63 |begin{de|fkey}{sc|
|00002d10| 72 65 65 6e 7d 7b 7b 5c | 65 6d 20 78 73 69 7a 65 |reen}{{\|em xsize|
|00002d20| 20 79 73 69 7a 65 7d 7d | 0a 20 20 09 55 73 65 20 | ysize}}|. .Use |
|00002d30| 61 20 73 63 72 65 65 6e | 20 7b 5c 65 6d 20 78 73 |a screen| {\em xs|
|00002d40| 69 7a 65 7d 20 70 69 78 | 65 6c 73 20 77 69 64 65 |ize} pix|els wide|
|00002d50| 20 62 79 20 7b 5c 65 6d | 20 79 73 69 7a 65 7d 20 | by {\em| ysize} |
|00002d60| 70 69 78 65 6c 73 20 68 | 69 67 68 2e 0a 2d 2d 2d |pixels h|igh..---|
|00002d70| 20 31 33 38 2c 31 34 34 | 20 2d 2d 2d 2d 0a 20 20 | 138,144| ----. |
|00002d80| 0a 20 20 54 68 65 20 73 | 69 7a 65 20 6f 66 20 74 |. The s|ize of t|
|00002d90| 68 65 20 6f 75 74 70 75 | 74 20 69 6d 61 67 65 20 |he outpu|t image |
|00002da0| 69 73 20 6d 65 61 73 75 | 72 65 64 20 69 6e 20 70 |is measu|red in p|
|00002db0| 69 78 65 6c 73 2e 20 20 | 54 68 65 20 7b 5c 65 6d |ixels. |The {\em|
|00002dc0| 20 78 7d 20 73 69 7a 65 | 0a 20 20 69 73 20 74 68 | x} size|. is th|
|00002dd0| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 70 69 78 65 |e number| of pixe|
|00002de0| 6c 73 20 6c 65 66 74 2d | 74 6f 2d 72 69 67 68 74 |ls left-|to-right|
|00002df0| 2c 20 77 68 69 6c 65 20 | 74 68 65 20 7b 5c 65 6d |, while |the {\em|
|00002e00| 20 79 7d 20 73 69 7a 65 | 20 69 73 0a 21 20 74 68 | y} size| is.! th|
|00002e10| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 70 69 78 65 |e number| of pixe|
|00002e20| 6c 73 20 62 6f 74 74 6f | 6d 2d 74 6f 2d 74 6f 70 |ls botto|m-to-top|
|00002e30| 2e 0a 20 20 0a 20 20 5c | 62 65 67 69 6e 7b 64 65 |.. . \|begin{de|
|00002e40| 66 6b 65 79 7d 7b 73 63 | 72 65 65 6e 7d 7b 7b 5c |fkey}{sc|reen}{{\|
|00002e50| 65 6d 20 78 73 69 7a 65 | 20 79 73 69 7a 65 7d 7d |em xsize| ysize}}|
|00002e60| 0a 20 20 09 55 73 65 20 | 61 20 73 63 72 65 65 6e |. .Use |a screen|
|00002e70| 20 7b 5c 65 6d 20 78 73 | 69 7a 65 7d 20 70 69 78 | {\em xs|ize} pix|
|00002e80| 65 6c 73 20 77 69 64 65 | 20 62 79 20 7b 5c 65 6d |els wide| by {\em|
|00002e90| 20 79 73 69 7a 65 7d 20 | 70 69 78 65 6c 73 20 68 | ysize} |pixels h|
|00002ea0| 69 67 68 2e 0a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |igh..***|********|
|00002eb0| 2a 2a 2a 2a 0a 2a 2a 2a | 20 31 38 35 2c 31 39 31 |****.***| 185,191|
|00002ec0| 20 2a 2a 2a 2a 0a 20 20 | 0a 20 20 5c 73 65 63 74 | ****. |. \sect|
|00002ed0| 69 6f 6e 7b 53 74 61 74 | 69 73 74 69 63 73 20 52 |ion{Stat|istics R|
|00002ee0| 65 70 6f 72 74 69 6e 67 | 7d 0a 20 20 0a 21 20 41 |eporting|}. .! A|
|00002ef0| 73 20 69 74 20 69 73 20 | 77 6f 72 6b 69 6e 67 2c |s it is |working,|
|00002f00| 20 5c 72 61 79 73 68 61 | 64 65 20 69 6e 66 6f 72 | \raysha|de infor|
|00002f10| 6d 73 20 79 6f 75 20 6f | 66 20 69 74 73 20 70 72 |ms you o|f its pr|
|00002f20| 6f 67 72 65 73 73 20 62 | 79 20 77 72 69 74 69 6e |ogress b|y writin|
|00002f30| 67 0a 20 20 6d 65 73 73 | 61 67 65 73 20 74 6f 20 |g. mess|ages to |
|00002f40| 61 20 60 60 72 65 70 6f | 72 74 20 66 69 6c 65 27 |a ``repo|rt file'|
|00002f50| 27 2e 20 20 42 79 20 64 | 65 66 61 75 6c 74 2c 20 |'. By d|efault, |
|00002f60| 74 68 65 20 72 65 70 6f | 72 74 20 66 69 6c 65 20 |the repo|rt file |
|00002f70| 69 73 20 74 68 65 0a 20 | 20 73 74 61 6e 64 61 72 |is the. | standar|
|00002f80| 64 20 65 72 72 6f 72 2e | 20 20 54 68 65 20 72 65 |d error.| The re|
|00002f90| 70 6f 72 74 20 69 74 73 | 65 6c 66 20 63 6f 6e 73 |port its|elf cons|
|00002fa0| 69 73 74 73 20 6f 66 20 | 61 20 6e 75 6d 62 65 72 |ists of |a number|
|00002fb0| 20 6f 66 0a 20 20 70 72 | 6f 67 72 65 73 73 20 72 | of. pr|ogress r|
|00002fc0| 65 70 6f 72 74 20 6c 69 | 6e 65 73 20 63 6f 6e 73 |eport li|nes cons|
|00002fd0| 69 73 74 69 6e 67 20 6f | 66 20 74 68 65 20 6e 75 |isting o|f the nu|
|00002fe0| 6d 62 65 72 20 6f 66 20 | 65 79 65 20 72 61 79 73 |mber of |eye rays|
|00002ff0| 20 74 72 61 63 65 64 2c | 0a 2d 2d 2d 20 31 38 36 | traced,|.--- 186|
|00003000| 2c 31 39 32 20 2d 2d 2d | 2d 0a 20 20 0a 20 20 5c |,192 ---|-. . \|
|00003010| 73 65 63 74 69 6f 6e 7b | 53 74 61 74 69 73 74 69 |section{|Statisti|
|00003020| 63 73 20 52 65 70 6f 72 | 74 69 6e 67 7d 0a 20 20 |cs Repor|ting}. |
|00003030| 0a 21 20 41 73 20 69 74 | 20 69 73 20 77 6f 72 6b |.! As it| is work|
|00003040| 69 6e 67 2c 20 7b 5c 72 | 61 79 73 68 61 64 65 7d |ing, {\r|ayshade}|
|00003050| 20 69 6e 66 6f 72 6d 73 | 20 79 6f 75 20 6f 66 20 | informs| you of |
|00003060| 69 74 73 20 70 72 6f 67 | 72 65 73 73 20 62 79 20 |its prog|ress by |
|00003070| 77 72 69 74 69 6e 67 0a | 20 20 6d 65 73 73 61 67 |writing.| messag|
|00003080| 65 73 20 74 6f 20 61 20 | 60 60 72 65 70 6f 72 74 |es to a |``report|
|00003090| 20 66 69 6c 65 27 27 2e | 20 20 42 79 20 64 65 66 | file''.| By def|
|000030a0| 61 75 6c 74 2c 20 74 68 | 65 20 72 65 70 6f 72 74 |ault, th|e report|
|000030b0| 20 66 69 6c 65 20 69 73 | 20 74 68 65 0a 20 20 73 | file is| the. s|
|000030c0| 74 61 6e 64 61 72 64 20 | 65 72 72 6f 72 2e 20 20 |tandard |error. |
|000030d0| 54 68 65 20 72 65 70 6f | 72 74 20 69 74 73 65 6c |The repo|rt itsel|
|000030e0| 66 20 63 6f 6e 73 69 73 | 74 73 20 6f 66 20 61 20 |f consis|ts of a |
|000030f0| 6e 75 6d 62 65 72 20 6f | 66 0a 20 20 70 72 6f 67 |number o|f. prog|
|00003100| 72 65 73 73 20 72 65 70 | 6f 72 74 20 6c 69 6e 65 |ress rep|ort line|
|00003110| 73 20 63 6f 6e 73 69 73 | 74 69 6e 67 20 6f 66 20 |s consis|ting of |
|00003120| 74 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 65 79 |the numb|er of ey|
|00003130| 65 20 72 61 79 73 20 74 | 72 61 63 65 64 2c 0a 2a |e rays t|raced,.*|
|00003140| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 0a 2a |********|******.*|
|00003150| 2a 2a 20 32 32 31 2c 32 | 33 35 20 2a 2a 2a 2a 0a |** 221,2|35 ****.|
|00003160| 20 20 0a 20 20 49 66 20 | 61 20 70 69 78 65 6c 20 | . If |a pixel |
|00003170| 69 73 20 6e 6f 74 20 73 | 61 6d 70 6c 65 64 20 61 |is not s|ampled a|
|00003180| 74 20 74 68 65 20 70 72 | 6f 70 65 72 20 72 61 74 |t the pr|oper rat|
|00003190| 65 2c 20 61 6c 69 61 73 | 69 6e 67 20 77 69 6c 6c |e, alias|ing will|
|000031a0| 20 72 65 73 75 6c 74 2e | 0a 20 20 41 6c 69 61 73 | result.|. Alias|
|000031b0| 69 6e 67 20 75 73 75 61 | 6c 6c 79 20 61 70 70 65 |ing usua|lly appe|
|000031c0| 61 72 73 20 61 73 20 60 | 60 6a 61 67 67 69 65 73 |ars as `|`jaggies|
|000031d0| 27 27 20 6f 72 20 60 60 | 73 74 61 69 72 20 73 74 |'' or ``|stair st|
|000031e0| 65 70 73 27 27 20 69 6e | 20 74 68 65 20 69 6d 61 |eps'' in| the ima|
|000031f0| 67 65 2e 0a 21 20 49 6e | 20 6f 72 64 65 72 20 74 |ge..! In| order t|
|00003200| 6f 20 72 65 64 75 63 65 | 20 74 68 65 73 65 20 61 |o reduce| these a|
|00003210| 6e 64 20 6f 74 68 65 72 | 20 61 72 74 69 66 61 63 |nd other| artifac|
|00003220| 74 73 2c 20 5c 72 61 79 | 73 68 61 64 65 20 70 72 |ts, \ray|shade pr|
|00003230| 6f 76 69 64 65 73 0a 20 | 20 61 6e 20 61 64 61 70 |ovides. | an adap|
|00003240| 74 69 76 65 20 6a 69 74 | 74 65 72 65 64 20 61 6e |tive jit|tered an|
|00003250| 74 69 61 6c 69 61 73 69 | 6e 67 20 73 63 68 65 6d |tialiasi|ng schem|
|00003260| 65 20 74 68 61 74 20 61 | 74 74 65 6d 70 74 73 20 |e that a|ttempts |
|00003270| 74 6f 20 64 65 74 65 63 | 74 20 77 68 65 72 65 0a |to detec|t where.|
|00003280| 20 20 69 6e 63 72 65 61 | 73 65 64 20 73 61 6d 70 | increa|sed samp|
|00003290| 6c 69 6e 67 20 72 61 74 | 65 73 20 61 72 65 20 6e |ling rat|es are n|
|000032a0| 65 65 64 65 64 2e 0a 20 | 20 49 6e 20 6a 69 74 74 |eeded.. | In jitt|
|000032b0| 65 72 65 64 20 73 61 6d | 70 6c 69 6e 67 2c 20 74 |ered sam|pling, t|
|000032c0| 68 65 20 6c 6f 63 61 74 | 69 6f 6e 20 61 74 20 77 |he locat|ion at w|
|000032d0| 68 69 63 68 20 61 20 73 | 61 6d 70 6c 65 20 69 73 |hich a s|ample is|
|000032e0| 20 74 61 6b 65 6e 20 69 | 73 0a 20 20 70 65 72 74 | taken i|s. pert|
|000032f0| 75 72 62 65 64 20 62 79 | 20 61 20 72 61 6e 64 6f |urbed by| a rando|
|00003300| 6d 20 61 6d 6f 75 6e 74 | 2e 20 20 54 68 69 73 20 |m amount|. This |
|00003310| 70 65 72 74 75 72 62 61 | 74 69 6f 6e 20 72 65 64 |perturba|tion red|
|00003320| 75 63 65 73 20 61 6c 69 | 61 73 69 6e 67 0a 20 20 |uces ali|asing. |
|00003330| 62 75 74 20 61 64 64 73 | 20 6e 6f 69 73 65 20 74 |but adds| noise t|
|00003340| 6f 20 74 68 65 20 69 6d | 61 67 65 2e 20 20 41 70 |o the im|age. Ap|
|00003350| 70 65 6e 64 69 78 20 42 | 20 64 65 73 63 72 69 62 |pendix B| describ|
|00003360| 65 73 20 68 6f 77 20 6a | 69 74 74 65 72 65 64 0a |es how j|ittered.|
|00003370| 21 20 74 69 6d 65 20 73 | 61 6d 70 6c 69 6e 67 20 |! time s|ampling |
|00003380| 69 73 20 69 6d 70 6c 65 | 6d 65 6e 74 65 64 20 69 |is imple|mented i|
|00003390| 6e 20 7b 5c 65 6d 20 72 | 61 79 73 68 61 64 65 7d |n {\em r|ayshade}|
|000033a0| 2e 0a 20 20 0a 21 20 54 | 68 65 20 61 64 61 70 74 |.. .! T|he adapt|
|000033b0| 69 76 65 20 73 61 6d 70 | 6c 69 6e 67 20 73 63 68 |ive samp|ling sch|
|000033c0| 65 6d 65 20 69 6d 70 6c | 65 6d 65 6e 74 65 64 20 |eme impl|emented |
|000033d0| 69 6e 20 5c 72 61 79 73 | 68 61 64 65 20 62 65 67 |in \rays|hade beg|
|000033e0| 69 6e 73 0a 20 20 62 79 | 20 73 61 6d 70 6c 69 6e |ins. by| samplin|
|000033f0| 67 20 65 61 63 68 20 70 | 69 78 65 6c 20 6f 6e 20 |g each p|ixel on |
|00003400| 74 68 65 20 63 75 72 72 | 65 6e 74 20 73 63 61 6e |the curr|ent scan|
|00003410| 6c 69 6e 65 20 6f 6e 63 | 65 2e 0a 20 20 46 6f 72 |line onc|e.. For|
|00003420| 20 65 61 63 68 20 70 69 | 78 65 6c 20 6f 6e 20 74 | each pi|xel on t|
|00003430| 68 65 20 73 63 61 6e 6c | 69 6e 65 2c 20 74 68 65 |he scanl|ine, the|
|00003440| 20 63 6f 6e 74 72 61 73 | 74 20 62 65 74 77 65 65 | contras|t betwee|
|00003450| 6e 20 69 74 20 61 6e 64 | 20 69 74 73 0a 20 20 66 |n it and| its. f|
|00003460| 6f 75 72 20 69 6d 6d 65 | 64 69 61 74 65 20 6e 65 |our imme|diate ne|
|00003470| 69 67 68 62 6f 72 73 20 | 69 73 20 63 6f 6d 70 75 |ighbors |is compu|
|00003480| 74 65 64 2e 20 20 49 66 | 20 74 68 69 73 20 63 6f |ted. If| this co|
|00003490| 6e 74 72 61 73 74 20 69 | 73 20 67 72 65 61 74 65 |ntrast i|s greate|
|000034a0| 72 0a 2d 2d 2d 20 32 32 | 32 2c 32 33 36 20 2d 2d |r.--- 22|2,236 --|
|000034b0| 2d 2d 0a 20 20 0a 20 20 | 49 66 20 61 20 70 69 78 |--. . |If a pix|
|000034c0| 65 6c 20 69 73 20 6e 6f | 74 20 73 61 6d 70 6c 65 |el is no|t sample|
|000034d0| 64 20 61 74 20 74 68 65 | 20 70 72 6f 70 65 72 20 |d at the| proper |
|000034e0| 72 61 74 65 2c 20 61 6c | 69 61 73 69 6e 67 20 77 |rate, al|iasing w|
|000034f0| 69 6c 6c 20 72 65 73 75 | 6c 74 2e 0a 20 20 41 6c |ill resu|lt.. Al|
|00003500| 69 61 73 69 6e 67 20 75 | 73 75 61 6c 6c 79 20 61 |iasing u|sually a|
|00003510| 70 70 65 61 72 73 20 61 | 73 20 60 60 6a 61 67 67 |ppears a|s ``jagg|
|00003520| 69 65 73 27 27 20 6f 72 | 20 60 60 73 74 61 69 72 |ies'' or| ``stair|
|00003530| 20 73 74 65 70 73 27 27 | 20 69 6e 20 74 68 65 20 | steps''| in the |
|00003540| 69 6d 61 67 65 2e 0a 21 | 20 49 6e 20 6f 72 64 65 |image..!| In orde|
|00003550| 72 20 74 6f 20 72 65 64 | 75 63 65 20 74 68 65 73 |r to red|uce thes|
|00003560| 65 20 61 6e 64 20 6f 74 | 68 65 72 20 61 72 74 69 |e and ot|her arti|
|00003570| 66 61 63 74 73 2c 20 7b | 5c 72 61 79 73 68 61 64 |facts, {|\rayshad|
|00003580| 65 7d 20 70 72 6f 76 69 | 64 65 73 0a 20 20 61 6e |e} provi|des. an|
|00003590| 20 61 64 61 70 74 69 76 | 65 20 6a 69 74 74 65 72 | adaptiv|e jitter|
|000035a0| 65 64 20 61 6e 74 69 61 | 6c 69 61 73 69 6e 67 20 |ed antia|liasing |
|000035b0| 73 63 68 65 6d 65 20 74 | 68 61 74 20 61 74 74 65 |scheme t|hat atte|
|000035c0| 6d 70 74 73 20 74 6f 20 | 64 65 74 65 63 74 20 77 |mpts to |detect w|
|000035d0| 68 65 72 65 0a 20 20 69 | 6e 63 72 65 61 73 65 64 |here. i|ncreased|
|000035e0| 20 73 61 6d 70 6c 69 6e | 67 20 72 61 74 65 73 20 | samplin|g rates |
|000035f0| 61 72 65 20 6e 65 65 64 | 65 64 2e 0a 20 20 49 6e |are need|ed.. In|
|00003600| 20 6a 69 74 74 65 72 65 | 64 20 73 61 6d 70 6c 69 | jittere|d sampli|
|00003610| 6e 67 2c 20 74 68 65 20 | 6c 6f 63 61 74 69 6f 6e |ng, the |location|
|00003620| 20 61 74 20 77 68 69 63 | 68 20 61 20 73 61 6d 70 | at whic|h a samp|
|00003630| 6c 65 20 69 73 20 74 61 | 6b 65 6e 20 69 73 0a 20 |le is ta|ken is. |
|00003640| 20 70 65 72 74 75 72 62 | 65 64 20 62 79 20 61 20 | perturb|ed by a |
|00003650| 72 61 6e 64 6f 6d 20 61 | 6d 6f 75 6e 74 2e 20 20 |random a|mount. |
|00003660| 54 68 69 73 20 70 65 72 | 74 75 72 62 61 74 69 6f |This per|turbatio|
|00003670| 6e 20 72 65 64 75 63 65 | 73 20 61 6c 69 61 73 69 |n reduce|s aliasi|
|00003680| 6e 67 0a 20 20 62 75 74 | 20 61 64 64 73 20 6e 6f |ng. but| adds no|
|00003690| 69 73 65 20 74 6f 20 74 | 68 65 20 69 6d 61 67 65 |ise to t|he image|
|000036a0| 2e 20 20 41 70 70 65 6e | 64 69 78 20 42 20 64 65 |. Appen|dix B de|
|000036b0| 73 63 72 69 62 65 73 20 | 68 6f 77 20 6a 69 74 74 |scribes |how jitt|
|000036c0| 65 72 65 64 0a 21 20 74 | 69 6d 65 20 73 61 6d 70 |ered.! t|ime samp|
|000036d0| 6c 69 6e 67 20 69 73 20 | 69 6d 70 6c 65 6d 65 6e |ling is |implemen|
|000036e0| 74 65 64 20 69 6e 20 7b | 5c 72 61 79 73 68 61 64 |ted in {|\rayshad|
|000036f0| 65 7d 2e 0a 20 20 0a 21 | 20 54 68 65 20 61 64 61 |e}.. .!| The ada|
|00003700| 70 74 69 76 65 20 73 61 | 6d 70 6c 69 6e 67 20 73 |ptive sa|mpling s|
|00003710| 63 68 65 6d 65 20 69 6d | 70 6c 65 6d 65 6e 74 65 |cheme im|plemente|
|00003720| 64 20 69 6e 20 7b 5c 72 | 61 79 73 68 61 64 65 7d |d in {\r|ayshade}|
|00003730| 20 62 65 67 69 6e 73 0a | 20 20 62 79 20 73 61 6d | begins.| by sam|
|00003740| 70 6c 69 6e 67 20 65 61 | 63 68 20 70 69 78 65 6c |pling ea|ch pixel|
|00003750| 20 6f 6e 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | on the |current |
|00003760| 73 63 61 6e 6c 69 6e 65 | 20 6f 6e 63 65 2e 0a 20 |scanline| once.. |
|00003770| 20 46 6f 72 20 65 61 63 | 68 20 70 69 78 65 6c 20 | For eac|h pixel |
|00003780| 6f 6e 20 74 68 65 20 73 | 63 61 6e 6c 69 6e 65 2c |on the s|canline,|
|00003790| 20 74 68 65 20 63 6f 6e | 74 72 61 73 74 20 62 65 | the con|trast be|
|000037a0| 74 77 65 65 6e 20 69 74 | 20 61 6e 64 20 69 74 73 |tween it| and its|
|000037b0| 0a 20 20 66 6f 75 72 20 | 69 6d 6d 65 64 69 61 74 |. four |immediat|
|000037c0| 65 20 6e 65 69 67 68 62 | 6f 72 73 20 69 73 20 63 |e neighb|ors is c|
|000037d0| 6f 6d 70 75 74 65 64 2e | 20 20 49 66 20 74 68 69 |omputed.| If thi|
|000037e0| 73 20 63 6f 6e 74 72 61 | 73 74 20 69 73 20 67 72 |s contra|st is gr|
|000037f0| 65 61 74 65 72 0a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |eater.**|********|
|00003800| 2a 2a 2a 2a 2a 0a 2a 2a | 2a 20 32 36 33 2c 32 36 |*****.**|* 263,26|
|00003810| 39 20 2a 2a 2a 2a 0a 20 | 20 61 73 73 69 67 6e 20 |9 ****. | assign |
|00003820| 61 20 63 6f 6c 6f 72 20 | 74 6f 20 61 20 70 69 78 |a color |to a pix|
|00003830| 65 6c 2e 20 20 49 64 65 | 61 6c 6c 79 2c 20 77 68 |el. Ide|ally, wh|
|00003840| 65 6e 20 70 65 72 66 6f | 72 6d 69 6e 67 20 66 69 |en perfo|rming fi|
|00003850| 6c 74 65 72 69 6e 67 0a | 20 20 66 6f 72 20 61 20 |ltering.| for a |
|00003860| 73 70 65 63 69 66 69 63 | 20 70 69 78 65 6c 2c 0a |specific| pixel,.|
|00003870| 20 20 74 68 65 20 66 69 | 6c 74 65 72 20 77 69 6c | the fi|lter wil|
|00003880| 6c 20 63 6f 6e 73 69 64 | 65 72 20 73 61 6d 70 6c |l consid|er sampl|
|00003890| 65 73 20 66 72 6f 6d 20 | 6e 65 69 67 68 62 6f 72 |es from |neighbor|
|000038a0| 69 6e 67 20 72 65 67 69 | 6f 6e 73 2e 20 20 49 6e |ing regi|ons. In|
|000038b0| 0a 21 20 7b 5c 65 6d 20 | 72 61 79 73 68 61 64 65 |.! {\em |rayshade|
|000038c0| 7d 2c 20 74 68 65 20 66 | 69 6c 74 65 72 69 6e 67 |}, the f|iltering|
|000038d0| 20 61 70 70 6c 69 65 64 | 20 74 6f 20 61 20 70 69 | applied| to a pi|
|000038e0| 78 65 6c 20 6d 61 6b 65 | 73 20 75 73 65 20 6f 66 |xel make|s use of|
|000038f0| 20 73 61 6d 70 6c 65 73 | 0a 20 20 74 61 6b 65 6e | samples|. taken|
|00003900| 20 66 6f 72 20 74 68 61 | 74 20 70 69 78 65 6c 20 | for tha|t pixel |
|00003910| 61 6c 6f 6e 65 2e 20 20 | 48 6f 77 65 76 65 72 2c |alone. |However,|
|00003920| 20 6f 6e 65 20 6d 61 79 | 20 69 6e 63 72 65 61 73 | one may| increas|
|00003930| 65 20 74 68 65 20 73 69 | 7a 65 0a 20 20 6f 66 20 |e the si|ze. of |
|00003940| 74 68 65 20 66 69 6c 74 | 65 72 20 74 68 61 74 20 |the filt|er that |
|00003950| 69 73 20 61 70 70 6c 69 | 65 64 20 69 6e 20 6f 72 |is appli|ed in or|
|00003960| 64 65 72 20 74 6f 20 61 | 70 70 72 6f 78 69 6d 61 |der to a|pproxima|
|00003970| 74 65 20 74 68 65 20 72 | 65 73 75 6c 74 73 0a 20 |te the r|esults. |
|00003980| 20 61 20 6d 6f 72 65 20 | 72 6f 62 75 73 74 20 66 | a more |robust f|
|00003990| 69 6c 74 65 72 69 6e 67 | 20 73 63 68 65 6d 65 2e |iltering| scheme.|
|000039a0| 0a 2d 2d 2d 20 32 36 34 | 2c 32 37 30 20 2d 2d 2d |.--- 264|,270 ---|
|000039b0| 2d 0a 20 20 61 73 73 69 | 67 6e 20 61 20 63 6f 6c |-. assi|gn a col|
|000039c0| 6f 72 20 74 6f 20 61 20 | 70 69 78 65 6c 2e 20 20 |or to a |pixel. |
|000039d0| 49 64 65 61 6c 6c 79 2c | 20 77 68 65 6e 20 70 65 |Ideally,| when pe|
|000039e0| 72 66 6f 72 6d 69 6e 67 | 20 66 69 6c 74 65 72 69 |rforming| filteri|
|000039f0| 6e 67 0a 20 20 66 6f 72 | 20 61 20 73 70 65 63 69 |ng. for| a speci|
|00003a00| 66 69 63 20 70 69 78 65 | 6c 2c 0a 20 20 74 68 65 |fic pixe|l,. the|
|00003a10| 20 66 69 6c 74 65 72 20 | 77 69 6c 6c 20 63 6f 6e | filter |will con|
|00003a20| 73 69 64 65 72 20 73 61 | 6d 70 6c 65 73 20 66 72 |sider sa|mples fr|
|00003a30| 6f 6d 20 6e 65 69 67 68 | 62 6f 72 69 6e 67 20 72 |om neigh|boring r|
|00003a40| 65 67 69 6f 6e 73 2e 20 | 20 49 6e 0a 21 20 7b 5c |egions. | In.! {\|
|00003a50| 72 61 79 73 68 61 64 65 | 7d 2c 20 74 68 65 20 66 |rayshade|}, the f|
|00003a60| 69 6c 74 65 72 69 6e 67 | 20 61 70 70 6c 69 65 64 |iltering| applied|
|00003a70| 20 74 6f 20 61 20 70 69 | 78 65 6c 20 6d 61 6b 65 | to a pi|xel make|
|00003a80| 73 20 75 73 65 20 6f 66 | 20 73 61 6d 70 6c 65 73 |s use of| samples|
|00003a90| 0a 20 20 74 61 6b 65 6e | 20 66 6f 72 20 74 68 61 |. taken| for tha|
|00003aa0| 74 20 70 69 78 65 6c 20 | 61 6c 6f 6e 65 2e 20 20 |t pixel |alone. |
|00003ab0| 48 6f 77 65 76 65 72 2c | 20 6f 6e 65 20 6d 61 79 |However,| one may|
|00003ac0| 20 69 6e 63 72 65 61 73 | 65 20 74 68 65 20 73 69 | increas|e the si|
|00003ad0| 7a 65 0a 20 20 6f 66 20 | 74 68 65 20 66 69 6c 74 |ze. of |the filt|
|00003ae0| 65 72 20 74 68 61 74 20 | 69 73 20 61 70 70 6c 69 |er that |is appli|
|00003af0| 65 64 20 69 6e 20 6f 72 | 64 65 72 20 74 6f 20 61 |ed in or|der to a|
|00003b00| 70 70 72 6f 78 69 6d 61 | 74 65 20 74 68 65 20 72 |pproxima|te the r|
|00003b10| 65 73 75 6c 74 73 0a 20 | 20 61 20 6d 6f 72 65 20 |esults. | a more |
|00003b20| 72 6f 62 75 73 74 20 66 | 69 6c 74 65 72 69 6e 67 |robust f|iltering|
|00003b30| 20 73 63 68 65 6d 65 2e | 0a 2a 2a 2a 2a 2a 2a 2a | scheme.|.*******|
|00003b40| 2a 2a 2a 2a 2a 2a 2a 2a | 0a 2a 2a 2a 20 32 37 31 |********|.*** 271|
|00003b50| 2c 32 38 36 20 2a 2a 2a | 2a 0a 20 20 5c 62 65 67 |,286 ***|*. \beg|
|00003b60| 69 6e 7b 64 65 66 6b 65 | 79 7d 7b 66 69 6c 74 65 |in{defke|y}{filte|
|00003b70| 72 7d 7b 7b 5c 65 6d 20 | 74 79 70 65 7d 20 5b 7b |r}{{\em |type} [{|
|00003b80| 5c 65 6d 20 77 69 64 74 | 68 7d 5d 7d 0a 20 20 09 |\em widt|h}]}. .|
|00003b90| 55 73 65 20 74 68 65 20 | 69 6e 64 69 63 61 74 65 |Use the |indicate|
|00003ba0| 64 20 66 69 6c 74 65 72 | 20 74 79 70 65 20 77 69 |d filter| type wi|
|00003bb0| 74 68 20 74 68 65 20 67 | 69 76 65 6e 20 77 69 64 |th the g|iven wid|
|00003bc0| 74 68 2c 0a 20 20 09 69 | 6e 20 70 69 78 65 6c 73 |th,. .i|n pixels|
|00003bd0| 2e 0a 21 20 09 53 75 70 | 70 6f 72 74 65 64 20 66 |..! .Sup|ported f|
|00003be0| 69 6c 74 65 72 20 74 79 | 70 65 73 20 61 72 65 20 |ilter ty|pes are |
|00003bf0| 7b 5c 74 74 20 67 61 75 | 73 73 7d 20 28 67 61 75 |{\tt gau|ss} (gau|
|00003c00| 73 73 69 61 6e 29 0a 20 | 20 09 61 6e 64 20 7b 5c |ssian). | .and {\|
|00003c10| 74 74 20 62 6f 78 7d 20 | 28 74 68 65 20 64 65 66 |tt box} |(the def|
|00003c20| 61 75 6c 74 29 2e 0a 20 | 20 5c 65 6e 64 7b 64 65 |ault).. | \end{de|
|00003c30| 66 6b 65 79 7d 0a 21 20 | 54 68 65 20 64 65 66 61 |fkey}.! |The defa|
|00003c40| 75 6c 74 20 66 69 6c 74 | 65 72 20 77 69 64 74 68 |ult filt|er width|
|00003c50| 20 69 73 20 31 2e 30 20 | 66 6f 72 20 61 20 62 6f | is 1.0 |for a bo|
|00003c60| 78 20 66 69 6c 74 65 72 | 2c 20 31 2e 38 20 66 6f |x filter|, 1.8 fo|
|00003c70| 72 20 61 20 67 61 75 73 | 73 69 61 6e 0a 20 20 66 |r a gaus|sian. f|
|00003c80| 69 6c 74 65 72 2e 20 20 | 54 68 65 20 66 69 6c 74 |ilter. |The filt|
|00003c90| 65 72 20 61 6e 64 20 70 | 69 78 65 6c 20 63 65 6e |er and p|ixel cen|
|00003ca0| 74 65 72 73 20 61 6c 77 | 61 79 73 20 63 6f 69 6e |ters alw|ays coin|
|00003cb0| 63 69 64 65 2e 0a 20 20 | 57 68 65 6e 20 73 61 6d |cide.. |When sam|
|00003cc0| 70 6c 69 6e 67 20 61 20 | 70 69 78 65 6c 2c 20 73 |pling a |pixel, s|
|00003cd0| 61 6d 70 6c 65 73 20 61 | 72 65 20 74 61 6b 65 6e |amples a|re taken|
|00003ce0| 20 6f 76 65 72 20 74 68 | 65 20 61 72 65 61 20 6f | over th|e area o|
|00003cf0| 66 0a 20 20 74 68 65 20 | 70 69 78 65 6c 20 66 69 |f. the |pixel fi|
|00003d00| 6c 74 65 72 2c 20 77 68 | 69 63 68 20 69 73 20 6e |lter, wh|ich is n|
|00003d10| 6f 74 20 6e 65 63 65 73 | 73 61 72 69 6c 79 20 74 |ot neces|sarily t|
|00003d20| 68 65 20 73 61 6d 65 20 | 61 73 20 74 68 65 20 61 |he same |as the a|
|00003d30| 72 65 61 0a 20 20 6f 66 | 20 74 68 65 20 70 69 78 |rea. of| the pix|
|00003d40| 65 6c 20 69 74 73 65 6c | 66 2e 0a 20 20 0a 21 20 |el itsel|f.. .! |
|00003d50| 4a 69 74 74 65 72 65 64 | 20 73 61 6d 70 6c 69 6e |Jittered| samplin|
|00003d60| 67 20 69 73 20 75 73 65 | 64 20 69 6e 20 5c 72 61 |g is use|d in \ra|
|00003d70| 79 73 68 61 64 65 20 74 | 6f 20 73 61 6d 70 6c 65 |yshade t|o sample|
|00003d80| 20 65 78 74 65 6e 64 65 | 64 20 6c 69 67 68 74 0a | extende|d light.|
|00003d90| 20 20 73 6f 75 72 63 65 | 73 20 61 73 20 77 65 6c | source|s as wel|
|00003da0| 6c 2e 20 20 41 20 74 6f | 74 61 6c 20 6f 66 20 24 |l. A to|tal of $|
|00003db0| 73 61 6d 70 6c 65 73 5e | 32 24 20 73 61 6d 70 6c |samples^|2$ sampl|
|00003dc0| 65 73 20 61 72 65 20 74 | 61 6b 65 6e 20 6f 66 0a |es are t|aken of.|
|00003dd0| 20 20 65 61 63 68 20 65 | 78 74 65 6e 64 65 64 20 | each e|xtended |
|00003de0| 6c 69 67 68 74 20 73 6f | 75 72 63 65 20 69 6e 20 |light so|urce in |
|00003df0| 6f 72 64 65 72 20 74 6f | 20 64 65 74 65 72 6d 69 |order to| determi|
|00003e00| 6e 65 20 74 68 65 20 65 | 78 74 65 6e 74 20 6f 66 |ne the e|xtent of|
|00003e10| 20 73 68 61 64 6f 77 69 | 6e 67 2e 0a 20 20 0a 2d | shadowi|ng.. .-|
|00003e20| 2d 2d 20 32 37 32 2c 32 | 38 37 20 2d 2d 2d 2d 0a |-- 272,2|87 ----.|
|00003e30| 20 20 5c 62 65 67 69 6e | 7b 64 65 66 6b 65 79 7d | \begin|{defkey}|
|00003e40| 7b 66 69 6c 74 65 72 7d | 7b 7b 5c 65 6d 20 74 79 |{filter}|{{\em ty|
|00003e50| 70 65 7d 20 5b 7b 5c 65 | 6d 20 77 69 64 74 68 7d |pe} [{\e|m width}|
|00003e60| 5d 7d 0a 20 20 09 55 73 | 65 20 74 68 65 20 69 6e |]}. .Us|e the in|
|00003e70| 64 69 63 61 74 65 64 20 | 66 69 6c 74 65 72 20 74 |dicated |filter t|
|00003e80| 79 70 65 20 77 69 74 68 | 20 74 68 65 20 67 69 76 |ype with| the giv|
|00003e90| 65 6e 20 77 69 64 74 68 | 2c 0a 20 20 09 69 6e 20 |en width|,. .in |
|00003ea0| 70 69 78 65 6c 73 2e 0a | 21 20 09 53 75 70 70 6f |pixels..|! .Suppo|
|00003eb0| 72 74 65 64 20 66 69 6c | 74 65 72 20 74 79 70 65 |rted fil|ter type|
|00003ec0| 73 20 61 72 65 20 7b 5c | 74 74 20 67 61 75 73 73 |s are {\|tt gauss|
|00003ed0| 7d 20 28 47 61 75 73 73 | 69 61 6e 29 0a 20 20 09 |} (Gauss|ian). .|
|00003ee0| 61 6e 64 20 7b 5c 74 74 | 20 62 6f 78 7d 20 28 74 |and {\tt| box} (t|
|00003ef0| 68 65 20 64 65 66 61 75 | 6c 74 29 2e 0a 20 20 5c |he defau|lt).. \|
|00003f00| 65 6e 64 7b 64 65 66 6b | 65 79 7d 0a 21 20 54 68 |end{defk|ey}.! Th|
|00003f10| 65 20 64 65 66 61 75 6c | 74 20 66 69 6c 74 65 72 |e defaul|t filter|
|00003f20| 20 77 69 64 74 68 20 69 | 73 20 31 2e 30 20 66 6f | width i|s 1.0 fo|
|00003f30| 72 20 61 20 62 6f 78 20 | 66 69 6c 74 65 72 2c 20 |r a box |filter, |
|00003f40| 31 2e 38 20 66 6f 72 20 | 61 20 47 61 75 73 73 69 |1.8 for |a Gaussi|
|00003f50| 61 6e 0a 20 20 66 69 6c | 74 65 72 2e 20 20 54 68 |an. fil|ter. Th|
|00003f60| 65 20 66 69 6c 74 65 72 | 20 61 6e 64 20 70 69 78 |e filter| and pix|
|00003f70| 65 6c 20 63 65 6e 74 65 | 72 73 20 61 6c 77 61 79 |el cente|rs alway|
|00003f80| 73 20 63 6f 69 6e 63 69 | 64 65 2e 0a 20 20 57 68 |s coinci|de.. Wh|
|00003f90| 65 6e 20 73 61 6d 70 6c | 69 6e 67 20 61 20 70 69 |en sampl|ing a pi|
|00003fa0| 78 65 6c 2c 20 73 61 6d | 70 6c 65 73 20 61 72 65 |xel, sam|ples are|
|00003fb0| 20 74 61 6b 65 6e 20 6f | 76 65 72 20 74 68 65 20 | taken o|ver the |
|00003fc0| 61 72 65 61 20 6f 66 0a | 20 20 74 68 65 20 70 69 |area of.| the pi|
|00003fd0| 78 65 6c 20 66 69 6c 74 | 65 72 2c 20 77 68 69 63 |xel filt|er, whic|
|00003fe0| 68 20 69 73 20 6e 6f 74 | 20 6e 65 63 65 73 73 61 |h is not| necessa|
|00003ff0| 72 69 6c 79 20 74 68 65 | 20 73 61 6d 65 20 61 73 |rily the| same as|
|00004000| 20 74 68 65 20 61 72 65 | 61 0a 20 20 6f 66 20 74 | the are|a. of t|
|00004010| 68 65 20 70 69 78 65 6c | 20 69 74 73 65 6c 66 2e |he pixel| itself.|
|00004020| 0a 20 20 0a 21 20 4a 69 | 74 74 65 72 65 64 20 73 |. .! Ji|ttered s|
|00004030| 61 6d 70 6c 69 6e 67 20 | 69 73 20 75 73 65 64 20 |ampling |is used |
|00004040| 69 6e 20 7b 5c 72 61 79 | 73 68 61 64 65 7d 20 74 |in {\ray|shade} t|
|00004050| 6f 20 73 61 6d 70 6c 65 | 20 65 78 74 65 6e 64 65 |o sample| extende|
|00004060| 64 20 6c 69 67 68 74 0a | 20 20 73 6f 75 72 63 65 |d light.| source|
|00004070| 73 20 61 73 20 77 65 6c | 6c 2e 20 20 41 20 74 6f |s as wel|l. A to|
|00004080| 74 61 6c 20 6f 66 20 24 | 73 61 6d 70 6c 65 73 5e |tal of $|samples^|
|00004090| 32 24 20 73 61 6d 70 6c | 65 73 20 61 72 65 20 74 |2$ sampl|es are t|
|000040a0| 61 6b 65 6e 20 6f 66 0a | 20 20 65 61 63 68 20 65 |aken of.| each e|
|000040b0| 78 74 65 6e 64 65 64 20 | 6c 69 67 68 74 20 73 6f |xtended |light so|
|000040c0| 75 72 63 65 20 69 6e 20 | 6f 72 64 65 72 20 74 6f |urce in |order to|
|000040d0| 20 64 65 74 65 72 6d 69 | 6e 65 20 74 68 65 20 65 | determi|ne the e|
|000040e0| 78 74 65 6e 74 20 6f 66 | 20 73 68 61 64 6f 77 69 |xtent of| shadowi|
|000040f0| 6e 67 2e 0a 20 20 0a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |ng.. .*|********|
|00004100| 2a 2a 2a 2a 2a 2a 0a 2a | 2a 2a 20 32 39 35 2c 33 |******.*|** 295,3|
|00004110| 30 31 20 2a 2a 2a 2a 0a | 20 20 74 6f 20 74 68 65 |01 ****.| to the|
|00004120| 20 66 69 6e 61 6c 20 70 | 69 63 74 75 72 65 3b 20 | final p|icture; |
|00004130| 69 66 20 69 74 20 69 73 | 20 6e 6f 74 20 61 6c 6c |if it is| not all|
|00004140| 6f 77 65 64 20 74 6f 20 | 67 72 6f 77 20 66 61 72 |owed to |grow far|
|00004150| 20 65 6e 6f 75 67 68 2c | 20 74 68 69 73 0a 20 20 | enough,| this. |
|00004160| 70 72 65 6d 61 74 75 72 | 65 20 74 72 65 65 20 70 |prematur|e tree p|
|00004170| 72 75 6e 69 6e 67 20 6d | 61 79 20 62 65 20 65 76 |runing m|ay be ev|
|00004180| 69 64 65 6e 74 20 69 6e | 20 74 68 65 20 69 6d 61 |ident in| the ima|
|00004190| 67 65 2e 0a 20 20 0a 21 | 20 7b 5c 65 6d 20 52 61 |ge.. .!| {\em Ra|
|000041a0| 79 73 68 61 64 65 7d 20 | 70 72 6f 76 69 64 65 73 |yshade} |provides|
|000041b0| 20 74 77 6f 20 63 6f 6d | 70 6c 69 6d 65 6e 74 61 | two com|plimenta|
|000041c0| 72 79 20 6d 65 74 68 6f | 64 73 20 66 6f 72 20 63 |ry metho|ds for c|
|000041d0| 6f 6e 74 72 6f 6c 6c 69 | 6e 67 20 74 68 65 20 64 |ontrolli|ng the d|
|000041e0| 65 70 74 68 0a 20 20 6f | 66 20 74 68 65 20 72 61 |epth. o|f the ra|
|000041f0| 79 20 74 72 65 65 2e 20 | 20 4f 6e 65 20 6d 65 74 |y tree. | One met|
|00004200| 68 6f 64 20 73 65 74 73 | 20 61 6e 20 61 62 73 6f |hod sets| an abso|
|00004210| 6c 75 74 65 20 6d 61 78 | 69 6d 75 6d 20 66 6f 72 |lute max|imum for|
|00004220| 20 74 68 65 20 74 72 65 | 65 2e 20 20 54 68 65 0a | the tre|e. The.|
|00004230| 20 20 6f 74 68 65 72 20 | 61 6c 6c 6f 77 73 20 6f | other |allows o|
|00004240| 6e 65 20 74 6f 20 61 64 | 61 70 74 69 76 65 6c 79 |ne to ad|aptively|
|00004250| 20 70 72 75 6e 65 20 61 | 20 74 72 65 65 20 61 73 | prune a| tree as|
|00004260| 20 69 74 20 67 72 6f 77 | 73 20 73 6f 20 74 68 61 | it grow|s so tha|
|00004270| 74 20 60 60 75 6e 69 6d | 70 6f 72 74 61 6e 74 27 |t ``unim|portant'|
|00004280| 27 0a 20 20 72 61 79 73 | 20 61 72 65 20 6e 6f 74 |'. rays| are not|
|00004290| 20 73 70 61 77 6e 65 64 | 2e 0a 2d 2d 2d 20 32 39 | spawned|..--- 29|
|000042a0| 36 2c 33 30 32 20 2d 2d | 2d 2d 0a 20 20 74 6f 20 |6,302 --|--. to |
|000042b0| 74 68 65 20 66 69 6e 61 | 6c 20 70 69 63 74 75 72 |the fina|l pictur|
|000042c0| 65 3b 20 69 66 20 69 74 | 20 69 73 20 6e 6f 74 20 |e; if it| is not |
|000042d0| 61 6c 6c 6f 77 65 64 20 | 74 6f 20 67 72 6f 77 20 |allowed |to grow |
|000042e0| 66 61 72 20 65 6e 6f 75 | 67 68 2c 20 74 68 69 73 |far enou|gh, this|
|000042f0| 0a 20 20 70 72 65 6d 61 | 74 75 72 65 20 74 72 65 |. prema|ture tre|
|00004300| 65 20 70 72 75 6e 69 6e | 67 20 6d 61 79 20 62 65 |e prunin|g may be|
|00004310| 20 65 76 69 64 65 6e 74 | 20 69 6e 20 74 68 65 20 | evident| in the |
|00004320| 69 6d 61 67 65 2e 0a 20 | 20 0a 21 20 7b 5c 52 61 |image.. | .! {\Ra|
|00004330| 79 73 68 61 64 65 7d 20 | 70 72 6f 76 69 64 65 73 |yshade} |provides|
|00004340| 20 74 77 6f 20 63 6f 6d | 70 6c 65 6d 65 6e 74 61 | two com|plementa|
|00004350| 72 79 20 6d 65 74 68 6f | 64 73 20 66 6f 72 20 63 |ry metho|ds for c|
|00004360| 6f 6e 74 72 6f 6c 6c 69 | 6e 67 20 74 68 65 20 64 |ontrolli|ng the d|
|00004370| 65 70 74 68 0a 20 20 6f | 66 20 74 68 65 20 72 61 |epth. o|f the ra|
|00004380| 79 20 74 72 65 65 2e 20 | 20 4f 6e 65 20 6d 65 74 |y tree. | One met|
|00004390| 68 6f 64 20 73 65 74 73 | 20 61 6e 20 61 62 73 6f |hod sets| an abso|
|000043a0| 6c 75 74 65 20 6d 61 78 | 69 6d 75 6d 20 66 6f 72 |lute max|imum for|
|000043b0| 20 74 68 65 20 74 72 65 | 65 2e 20 20 54 68 65 0a | the tre|e. The.|
|000043c0| 20 20 6f 74 68 65 72 20 | 61 6c 6c 6f 77 73 20 6f | other |allows o|
|000043d0| 6e 65 20 74 6f 20 61 64 | 61 70 74 69 76 65 6c 79 |ne to ad|aptively|
|000043e0| 20 70 72 75 6e 65 20 61 | 20 74 72 65 65 20 61 73 | prune a| tree as|
|000043f0| 20 69 74 20 67 72 6f 77 | 73 20 73 6f 20 74 68 61 | it grow|s so tha|
|00004400| 74 20 60 60 75 6e 69 6d | 70 6f 72 74 61 6e 74 27 |t ``unim|portant'|
|00004410| 27 0a 20 20 72 61 79 73 | 20 61 72 65 20 6e 6f 74 |'. rays| are not|
|00004420| 20 73 70 61 77 6e 65 64 | 2e 0a 0a 49 6e 64 65 78 | spawned|...Index|
|00004430| 3a 20 44 6f 63 2f 47 75 | 69 64 65 2f 6f 62 6a 65 |: Doc/Gu|ide/obje|
|00004440| 63 74 73 2e 74 65 78 0a | 2a 2a 2a 20 6f 6c 64 2f |cts.tex.|*** old/|
|00004450| 44 6f 63 2f 47 75 69 64 | 65 2f 6f 62 6a 65 63 74 |Doc/Guid|e/object|
|00004460| 73 2e 74 65 78 09 4d 6f | 6e 20 46 65 62 20 20 33 |s.tex.Mo|n Feb 3|
|00004470| 20 31 32 3a 34 39 3a 35 | 36 20 31 39 39 32 0a 2d | 12:49:5|6 1992.-|
|00004480| 2d 2d 20 6e 65 77 2f 44 | 6f 63 2f 47 75 69 64 65 |-- new/D|oc/Guide|
|00004490| 2f 6f 62 6a 65 63 74 73 | 2e 74 65 78 09 46 72 69 |/objects|.tex.Fri|
|000044a0| 20 4a 61 6e 20 31 37 20 | 31 30 3a 32 39 3a 31 35 | Jan 17 |10:29:15|
|000044b0| 20 31 39 39 32 0a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a | 1992.**|********|
|000044c0| 2a 2a 2a 2a 2a 0a 2a 2a | 2a 20 31 2c 36 20 2a 2a |*****.**|* 1,6 **|
|000044d0| 2a 2a 0a 20 20 5c 63 68 | 61 70 74 65 72 7b 4f 62 |**. \ch|apter{Ob|
|000044e0| 6a 65 63 74 20 44 65 66 | 69 6e 69 74 69 6f 6e 7d |ject Def|inition}|
|000044f0| 0a 20 20 0a 21 20 4f 62 | 6a 65 63 74 73 20 69 6e |. .! Ob|jects in|
|00004500| 20 5c 72 61 79 73 68 61 | 64 65 20 61 72 65 20 63 | \raysha|de are c|
|00004510| 6f 6d 70 6f 73 65 64 20 | 6f 66 20 72 65 6c 61 74 |omposed |of relat|
|00004520| 69 76 65 6c 79 20 73 69 | 6d 70 6c 65 20 7b 5c 65 |ively si|mple {\e|
|00004530| 6d 20 70 72 69 6d 69 74 | 69 76 65 7d 0a 20 20 6f |m primit|ive}. o|
|00004540| 62 6a 65 63 74 73 2e 20 | 20 54 68 65 73 65 20 70 |bjects. | These p|
|00004550| 72 69 6d 69 74 69 76 65 | 73 20 6d 61 79 20 62 65 |rimitive|s may be|
|00004560| 20 75 73 65 64 20 62 79 | 20 74 68 65 6d 73 65 6c | used by| themsel|
|00004570| 76 65 73 2c 20 6f 72 20 | 74 68 65 79 0a 20 20 6d |ves, or |they. m|
|00004580| 61 79 20 62 65 20 63 6f | 6d 62 69 6e 65 64 20 74 |ay be co|mbined t|
|00004590| 6f 20 66 6f 72 6d 20 6d | 6f 72 65 20 63 6f 6d 70 |o form m|ore comp|
|000045a0| 6c 65 78 20 6f 62 6a 65 | 63 74 73 20 6b 6e 6f 77 |lex obje|cts know|
|000045b0| 6e 20 61 73 20 7b 5c 65 | 6d 20 61 67 67 72 65 67 |n as {\e|m aggreg|
|000045c0| 61 74 65 73 7d 2e 0a 20 | 20 41 20 73 70 65 63 69 |ates}.. | A speci|
|000045d0| 61 6c 20 66 61 6d 69 6c | 79 20 6f 66 20 61 67 67 |al famil|y of agg|
|000045e0| 72 65 67 61 74 65 20 6f | 62 6a 65 63 74 73 2c 0a |regate o|bjects,.|
|000045f0| 2d 2d 2d 20 31 2c 36 20 | 2d 2d 2d 2d 0a 20 20 5c |--- 1,6 |----. \|
|00004600| 63 68 61 70 74 65 72 7b | 4f 62 6a 65 63 74 20 44 |chapter{|Object D|
|00004610| 65 66 69 6e 69 74 69 6f | 6e 7d 0a 20 20 0a 21 20 |efinitio|n}. .! |
|00004620| 4f 62 6a 65 63 74 73 20 | 69 6e 20 7b 5c 72 61 79 |Objects |in {\ray|
|00004630| 73 68 61 64 65 7d 20 61 | 72 65 20 63 6f 6d 70 6f |shade} a|re compo|
|00004640| 73 65 64 20 6f 66 20 72 | 65 6c 61 74 69 76 65 6c |sed of r|elativel|
|00004650| 79 20 73 69 6d 70 6c 65 | 20 7b 5c 65 6d 20 70 72 |y simple| {\em pr|
|00004660| 69 6d 69 74 69 76 65 7d | 0a 20 20 6f 62 6a 65 63 |imitive}|. objec|
|00004670| 74 73 2e 20 20 54 68 65 | 73 65 20 70 72 69 6d 69 |ts. The|se primi|
|00004680| 74 69 76 65 73 20 6d 61 | 79 20 62 65 20 75 73 65 |tives ma|y be use|
|00004690| 64 20 62 79 20 74 68 65 | 6d 73 65 6c 76 65 73 2c |d by the|mselves,|
|000046a0| 20 6f 72 20 74 68 65 79 | 0a 20 20 6d 61 79 20 62 | or they|. may b|
|000046b0| 65 20 63 6f 6d 62 69 6e | 65 64 20 74 6f 20 66 6f |e combin|ed to fo|
|000046c0| 72 6d 20 6d 6f 72 65 20 | 63 6f 6d 70 6c 65 78 20 |rm more |complex |
|000046d0| 6f 62 6a 65 63 74 73 20 | 6b 6e 6f 77 6e 20 61 73 |objects |known as|
|000046e0| 20 7b 5c 65 6d 20 61 67 | 67 72 65 67 61 74 65 73 | {\em ag|gregates|
|000046f0| 7d 2e 0a 20 20 41 20 73 | 70 65 63 69 61 6c 20 66 |}.. A s|pecial f|
|00004700| 61 6d 69 6c 79 20 6f 66 | 20 61 67 67 72 65 67 61 |amily of| aggrega|
|00004710| 74 65 20 6f 62 6a 65 63 | 74 73 2c 0a 2a 2a 2a 2a |te objec|ts,.****|
|00004720| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 0a 2a 2a 2a 20 |********|***.*** |
|00004730| 31 35 2c 32 31 20 2a 2a | 2a 2a 0a 20 20 41 6e 20 |15,21 **|**. An |
|00004740| 7b 5c 65 6d 20 69 6e 73 | 74 61 6e 63 65 7d 20 69 |{\em ins|tance} i|
|00004750| 73 20 61 6e 20 6f 62 6a | 65 63 74 20 74 68 61 74 |s an obj|ect that|
|00004760| 20 68 61 73 20 6f 70 74 | 69 6f 6e 61 6c 6c 79 20 | has opt|ionally |
|00004770| 62 65 65 6e 20 74 72 61 | 6e 73 66 6f 72 6d 65 64 |been tra|nsformed|
|00004780| 0a 20 20 61 6e 64 0a 20 | 20 74 65 78 74 75 72 65 |. and. | texture|
|00004790| 64 2e 20 20 54 68 65 79 | 20 61 72 65 20 74 68 65 |d. They| are the|
|000047a0| 20 65 6e 74 69 74 69 65 | 73 20 74 68 61 74 20 61 | entitie|s that a|
|000047b0| 72 65 20 61 63 74 75 61 | 6c 6c 79 20 72 65 6e 64 |re actua|lly rend|
|000047c0| 65 72 65 64 20 62 79 0a | 21 20 7b 5c 65 6d 20 72 |ered by.|! {\em r|
|000047d0| 61 79 73 68 61 64 65 7d | 3b 20 77 68 65 6e 20 79 |ayshade}|; when y|
|000047e0| 6f 75 20 73 70 65 63 69 | 66 79 20 74 68 61 74 2c |ou speci|fy that,|
|000047f0| 20 66 6f 72 20 65 78 61 | 6d 70 6c 65 2c 20 61 20 | for exa|mple, a |
|00004800| 74 65 78 74 75 72 65 64 | 0a 20 20 73 70 68 65 72 |textured|. spher|
|00004810| 65 20 69 73 20 74 6f 20 | 62 65 20 72 65 6e 64 65 |e is to |be rende|
|00004820| 72 65 64 2c 20 79 6f 75 | 20 61 72 65 20 73 61 69 |red, you| are sai|
|00004830| 64 20 74 6f 20 62 65 20 | 69 6e 73 74 61 6e 74 69 |d to be |instanti|
|00004840| 61 74 69 6e 67 0a 20 20 | 74 68 65 20 74 65 78 74 |ating. |the text|
|00004850| 75 72 65 64 20 73 70 68 | 65 72 65 2e 0a 20 20 41 |ured sph|ere.. A|
|00004860| 6e 20 69 6e 73 74 61 6e | 63 65 0a 2d 2d 2d 20 31 |n instan|ce.--- 1|
|00004870| 35 2c 32 31 20 2d 2d 2d | 2d 0a 20 20 41 6e 20 7b |5,21 ---|-. An {|
|00004880| 5c 65 6d 20 69 6e 73 74 | 61 6e 63 65 7d 20 69 73 |\em inst|ance} is|
|00004890| 20 61 6e 20 6f 62 6a 65 | 63 74 20 74 68 61 74 20 | an obje|ct that |
|000048a0| 68 61 73 20 6f 70 74 69 | 6f 6e 61 6c 6c 79 20 62 |has opti|onally b|
|000048b0| 65 65 6e 20 74 72 61 6e | 73 66 6f 72 6d 65 64 0a |een tran|sformed.|
|000048c0| 20 20 61 6e 64 0a 20 20 | 74 65 78 74 75 72 65 64 | and. |textured|
|000048d0| 2e 20 20 54 68 65 79 20 | 61 72 65 20 74 68 65 20 |. They |are the |
|000048e0| 65 6e 74 69 74 69 65 73 | 20 74 68 61 74 20 61 72 |entities| that ar|
|000048f0| 65 20 61 63 74 75 61 6c | 6c 79 20 72 65 6e 64 65 |e actual|ly rende|
|00004900| 72 65 64 20 62 79 0a 21 | 20 7b 5c 72 61 79 73 68 |red by.!| {\raysh|
|00004910| 61 64 65 7d 3b 20 77 68 | 65 6e 20 79 6f 75 20 73 |ade}; wh|en you s|
|00004920| 70 65 63 69 66 79 20 74 | 68 61 74 2c 20 66 6f 72 |pecify t|hat, for|
|00004930| 20 65 78 61 6d 70 6c 65 | 2c 20 61 20 74 65 78 74 | example|, a text|
|00004940| 75 72 65 64 0a 20 20 73 | 70 68 65 72 65 20 69 73 |ured. s|phere is|
|00004950| 20 74 6f 20 62 65 20 72 | 65 6e 64 65 72 65 64 2c | to be r|endered,|
|00004960| 20 79 6f 75 20 61 72 65 | 20 73 61 69 64 20 74 6f | you are| said to|
|00004970| 20 62 65 20 69 6e 73 74 | 61 6e 74 69 61 74 69 6e | be inst|antiatin|
|00004980| 67 0a 20 20 74 68 65 20 | 74 65 78 74 75 72 65 64 |g. the |textured|
|00004990| 20 73 70 68 65 72 65 2e | 0a 20 20 41 6e 20 69 6e | sphere.|. An in|
|000049a0| 73 74 61 6e 63 65 0a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |stance.*|********|
|000049b0| 2a 2a 2a 2a 2a 2a 0a 2a | 2a 2a 20 32 35 2c 33 33 |******.*|** 25,33|
|000049c0| 20 2a 2a 2a 2a 0a 20 20 | 0a 20 20 5c 73 65 63 74 | ****. |. \sect|
|000049d0| 69 6f 6e 7b 54 68 65 20 | 57 6f 72 6c 64 20 4f 62 |ion{The |World Ob|
|000049e0| 6a 65 63 74 7d 0a 20 20 | 0a 21 20 57 72 69 74 69 |ject}. |.! Writi|
|000049f0| 6e 67 20 61 20 5c 72 61 | 79 73 68 61 64 65 20 69 |ng a \ra|yshade i|
|00004a00| 6e 70 75 74 20 66 69 6c | 65 20 69 73 20 70 72 69 |nput fil|e is pri|
|00004a10| 6e 63 69 70 61 6c 6c 79 | 0a 20 20 61 20 6d 61 74 |ncipally|. a mat|
|00004a20| 74 65 72 20 6f 66 20 64 | 65 66 69 6e 69 6e 67 20 |ter of d|efining |
|00004a30| 61 20 73 70 65 63 69 61 | 6c 20 61 67 67 72 65 67 |a specia|l aggreg|
|00004a40| 61 74 65 20 6f 62 6a 65 | 63 74 2c 20 74 68 65 20 |ate obje|ct, the |
|00004a50| 57 6f 72 6c 64 20 6f 62 | 6a 65 63 74 2c 0a 21 20 |World ob|ject,.! |
|00004a60| 77 68 69 63 68 20 69 73 | 20 61 20 6c 69 73 74 20 |which is| a list |
|00004a70| 6f 66 20 74 68 65 20 6f | 62 6a 65 63 74 73 20 69 |of the o|bjects i|
|00004a80| 6e 20 74 68 65 20 73 63 | 65 6e 65 2e 20 20 57 68 |n the sc|ene. Wh|
|00004a90| 65 6e 20 77 72 69 74 69 | 6e 67 20 61 20 5c 72 61 |en writi|ng a \ra|
|00004aa0| 79 73 68 61 64 65 0a 20 | 20 69 6e 70 75 74 20 66 |yshade. | input f|
|00004ab0| 69 6c 65 2c 20 61 6c 6c | 20 6f 62 6a 65 63 74 73 |ile, all| objects|
|00004ac0| 20 74 68 61 74 20 61 72 | 65 20 69 6e 73 74 61 6e | that ar|e instan|
|00004ad0| 74 69 61 74 65 64 20 6f | 75 74 73 69 64 65 20 6f |tiated o|utside o|
|00004ae0| 66 20 6f 62 6a 65 63 74 | 2d 64 65 66 69 6e 69 74 |f object|-definit|
|00004af0| 69 6f 6e 0a 20 20 62 6c | 6f 63 6b 73 20 61 72 65 |ion. bl|ocks are|
|00004b00| 20 61 64 64 65 64 20 74 | 6f 20 74 68 65 20 57 6f | added t|o the Wo|
|00004b10| 72 6c 64 20 6f 62 6a 65 | 63 74 3b 20 79 6f 75 20 |rld obje|ct; you |
|00004b20| 6e 65 65 64 20 6e 6f 74 | 20 28 6e 6f 72 20 73 68 |need not| (nor sh|
|00004b30| 6f 75 6c 64 20 79 6f 75 | 29 0a 20 20 64 65 66 69 |ould you|). defi|
|00004b40| 6e 65 20 74 68 65 20 57 | 6f 72 6c 64 20 6f 62 6a |ne the W|orld obj|
|00004b50| 65 63 74 20 65 78 70 6c | 69 63 69 74 6c 79 20 69 |ect expl|icitly i|
|00004b60| 6e 20 74 68 65 20 69 6e | 70 75 74 20 66 69 6c 65 |n the in|put file|
|00004b70| 2e 0a 2d 2d 2d 20 32 35 | 2c 33 33 20 2d 2d 2d 2d |..--- 25|,33 ----|
|00004b80| 0a 20 20 0a 20 20 5c 73 | 65 63 74 69 6f 6e 7b 54 |. . \s|ection{T|
|00004b90| 68 65 20 57 6f 72 6c 64 | 20 4f 62 6a 65 63 74 7d |he World| Object}|
|00004ba0| 0a 20 20 0a 21 20 57 72 | 69 74 69 6e 67 20 61 20 |. .! Wr|iting a |
|00004bb0| 7b 5c 72 61 79 73 68 61 | 64 65 7d 20 69 6e 70 75 |{\raysha|de} inpu|
|00004bc0| 74 20 66 69 6c 65 20 69 | 73 20 70 72 69 6e 63 69 |t file i|s princi|
|00004bd0| 70 61 6c 6c 79 0a 20 20 | 61 20 6d 61 74 74 65 72 |pally. |a matter|
|00004be0| 20 6f 66 20 64 65 66 69 | 6e 69 6e 67 20 61 20 73 | of defi|ning a s|
|00004bf0| 70 65 63 69 61 6c 20 61 | 67 67 72 65 67 61 74 65 |pecial a|ggregate|
|00004c00| 20 6f 62 6a 65 63 74 2c | 20 74 68 65 20 57 6f 72 | object,| the Wor|
|00004c10| 6c 64 20 6f 62 6a 65 63 | 74 2c 0a 21 20 77 68 69 |ld objec|t,.! whi|
|00004c20| 63 68 20 69 73 20 61 20 | 6c 69 73 74 20 6f 66 20 |ch is a |list of |
|00004c30| 74 68 65 20 6f 62 6a 65 | 63 74 73 20 69 6e 20 74 |the obje|cts in t|
|00004c40| 68 65 20 73 63 65 6e 65 | 2e 20 20 57 68 65 6e 20 |he scene|. When |
|00004c50| 77 72 69 74 69 6e 67 20 | 61 20 7b 5c 72 61 79 73 |writing |a {\rays|
|00004c60| 68 61 64 65 7d 0a 20 20 | 69 6e 70 75 74 20 66 69 |hade}. |input fi|
|00004c70| 6c 65 2c 20 61 6c 6c 20 | 6f 62 6a 65 63 74 73 20 |le, all |objects |
|00004c80| 74 68 61 74 20 61 72 65 | 20 69 6e 73 74 61 6e 74 |that are| instant|
|00004c90| 69 61 74 65 64 20 6f 75 | 74 73 69 64 65 20 6f 66 |iated ou|tside of|
|00004ca0| 20 6f 62 6a 65 63 74 2d | 64 65 66 69 6e 69 74 69 | object-|definiti|
|00004cb0| 6f 6e 0a 20 20 62 6c 6f | 63 6b 73 20 61 72 65 20 |on. blo|cks are |
|00004cc0| 61 64 64 65 64 20 74 6f | 20 74 68 65 20 57 6f 72 |added to| the Wor|
|00004cd0| 6c 64 20 6f 62 6a 65 63 | 74 3b 20 79 6f 75 20 6e |ld objec|t; you n|
|00004ce0| 65 65 64 20 6e 6f 74 20 | 28 6e 6f 72 20 73 68 6f |eed not |(nor sho|
|00004cf0| 75 6c 64 20 79 6f 75 29 | 0a 20 20 64 65 66 69 6e |uld you)|. defin|
|00004d00| 65 20 74 68 65 20 57 6f | 72 6c 64 20 6f 62 6a 65 |e the Wo|rld obje|
|00004d10| 63 74 20 65 78 70 6c 69 | 63 69 74 6c 79 20 69 6e |ct expli|citly in|
|00004d20| 20 74 68 65 20 69 6e 70 | 75 74 20 66 69 6c 65 2e | the inp|ut file.|
|00004d30| 0a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.*******|********|
|00004d40| 0a 2a 2a 2a 20 36 37 2c | 37 33 20 2a 2a 2a 2a 0a |.*** 67,|73 ****.|
|00004d50| 20 20 09 67 72 6f 75 70 | 20 6f 66 20 6f 6e 65 20 | .group| of one |
|00004d60| 6f 72 20 6d 6f 72 65 20 | 6d 65 74 61 62 61 6c 6c |or more |metaball|
|00004d70| 73 2e 20 20 45 61 63 68 | 20 6d 65 74 61 62 61 6c |s. Each| metabal|
|00004d80| 6c 20 69 73 20 64 65 66 | 69 6e 65 64 20 62 79 20 |l is def|ined by |
|00004d90| 0a 20 20 09 69 74 73 20 | 70 6f 73 69 74 69 6f 6e |. .its |position|
|00004da0| 20 5c 65 76 65 63 7b 70 | 7d 2c 20 72 61 64 69 75 | \evec{p|}, radiu|
|00004db0| 73 20 7b 5c 65 6d 20 72 | 7d 2c 20 61 6e 64 20 73 |s {\em r|}, and s|
|00004dc0| 74 72 65 6e 67 74 68 20 | 7b 5c 65 6d 20 73 74 7d |trength |{\em st}|
|00004dd0| 2e 0a 20 20 5c 65 6e 64 | 7b 64 65 66 70 72 69 6d |.. \end|{defprim|
|00004de0| 7d 0a 21 20 46 6f 72 20 | 6e 6f 77 2c 20 73 65 65 |}.! For |now, see|
|00004df0| 20 74 68 65 20 73 6f 75 | 72 63 65 20 63 6f 64 65 | the sou|rce code|
|00004e00| 20 66 6f 72 20 6d 6f 72 | 65 20 65 78 70 6c 69 63 | for mor|e explic|
|00004e10| 69 74 20 64 6f 63 75 6d | 65 6e 74 61 74 69 6f 6e |it docum|entation|
|00004e20| 2e 0a 20 20 54 68 65 72 | 65 20 69 73 20 6e 6f 20 |.. Ther|e is no |
|00004e30| 69 6e 76 65 72 73 65 20 | 6d 61 70 70 69 6e 67 20 |inverse |mapping |
|00004e40| 6d 65 74 68 6f 64 20 66 | 6f 72 20 62 6c 6f 62 73 |method f|or blobs|
|00004e50| 2e 0a 20 20 0a 20 20 5c | 62 65 67 69 6e 7b 64 65 |.. . \|begin{de|
|00004e60| 66 70 72 69 6d 7d 7b 62 | 6f 78 7d 7b 5c 65 76 65 |fprim}{b|ox}{\eve|
|00004e70| 63 7b 63 6f 72 6e 65 72 | 31 7d 20 5c 65 76 65 63 |c{corner|1} \evec|
|00004e80| 7b 63 6f 72 6e 65 72 32 | 7d 7d 0a 2d 2d 2d 20 36 |{corner2|}}.--- 6|
|00004e90| 37 2c 37 37 20 2d 2d 2d | 2d 0a 20 20 09 67 72 6f |7,77 ---|-. .gro|
|00004ea0| 75 70 20 6f 66 20 6f 6e | 65 20 6f 72 20 6d 6f 72 |up of on|e or mor|
|00004eb0| 65 20 6d 65 74 61 62 61 | 6c 6c 73 2e 20 20 45 61 |e metaba|lls. Ea|
|00004ec0| 63 68 20 6d 65 74 61 62 | 61 6c 6c 20 69 73 20 64 |ch metab|all is d|
|00004ed0| 65 66 69 6e 65 64 20 62 | 79 20 0a 20 20 09 69 74 |efined b|y . .it|
|00004ee0| 73 20 70 6f 73 69 74 69 | 6f 6e 20 5c 65 76 65 63 |s positi|on \evec|
|00004ef0| 7b 70 7d 2c 20 72 61 64 | 69 75 73 20 7b 5c 65 6d |{p}, rad|ius {\em|
|00004f00| 20 72 7d 2c 20 61 6e 64 | 20 73 74 72 65 6e 67 74 | r}, and| strengt|
|00004f10| 68 20 7b 5c 65 6d 20 73 | 74 7d 2e 0a 20 20 5c 65 |h {\em s|t}.. \e|
|00004f20| 6e 64 7b 64 65 66 70 72 | 69 6d 7d 0a 21 20 54 68 |nd{defpr|im}.! Th|
|00004f30| 65 20 6d 65 74 61 62 61 | 6c 6c 73 20 61 66 66 65 |e metaba|lls affe|
|00004f40| 63 74 20 65 61 63 68 20 | 6f 74 68 65 72 20 61 63 |ct each |other ac|
|00004f50| 63 6f 72 64 69 6e 67 20 | 74 6f 20 61 20 73 75 70 |cording |to a sup|
|00004f60| 65 72 69 6d 70 6f 73 65 | 64 0a 21 20 64 65 6e 73 |erimpose|d.! dens|
|00004f70| 69 74 79 20 64 69 73 74 | 72 69 62 75 74 69 6f 6e |ity dist|ribution|
|00004f80| 3a 0a 21 20 5c 5b 0a 21 | 20 46 28 78 2c 79 2c 7a |:.! \[.!| F(x,y,z|
|00004f90| 29 20 3d 20 5c 73 75 6d | 5f 7b 69 3d 30 7d 5e 6e |) = \sum|_{i=0}^n|
|00004fa0| 20 62 5f 7b 69 7d 65 5e | 7b 2d 64 5f 7b 69 7d 7d | b_{i}e^|{-d_{i}}|
|00004fb0| 20 2d 20 54 20 3d 20 30 | 0a 21 20 5c 5d 0a 20 20 | - T = 0|.! \]. |
|00004fc0| 54 68 65 72 65 20 69 73 | 20 6e 6f 20 69 6e 76 65 |There is| no inve|
|00004fd0| 72 73 65 20 6d 61 70 70 | 69 6e 67 20 6d 65 74 68 |rse mapp|ing meth|
|00004fe0| 6f 64 20 66 6f 72 20 62 | 6c 6f 62 73 2e 0a 20 20 |od for b|lobs.. |
|00004ff0| 0a 20 20 5c 62 65 67 69 | 6e 7b 64 65 66 70 72 69 |. \begi|n{defpri|
|00005000| 6d 7d 7b 62 6f 78 7d 7b | 5c 65 76 65 63 7b 63 6f |m}{box}{|\evec{co|
|00005010| 72 6e 65 72 31 7d 20 5c | 65 76 65 63 7b 63 6f 72 |rner1} \|evec{cor|
|00005020| 6e 65 72 32 7d 7d 0a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |ner2}}.*|********|
|00005030| 2a 2a 2a 2a 2a 2a 0a 2a | 2a 2a 20 31 33 32 2c 31 |******.*|** 132,1|
|00005040| 34 33 20 2a 2a 2a 2a 0a | 20 20 5c 62 65 67 69 6e |43 ****.| \begin|
|00005050| 7b 64 65 66 70 72 69 6d | 7d 7b 70 6f 6c 79 7d 7b |{defprim|}{poly}{|
|00005060| 5c 65 76 65 63 7b 70 31 | 7d 20 5c 65 76 65 63 7b |\evec{p1|} \evec{|
|00005070| 70 32 7d 20 5c 65 76 65 | 63 7b 70 33 7d 20 5b 5c |p2} \eve|c{p3} [\|
|00005080| 65 76 65 63 7b 70 34 7d | 20 5c 6c 64 6f 74 73 20 |evec{p4}| \ldots |
|00005090| 5d 7d 0a 20 20 09 43 72 | 65 61 74 65 73 20 61 20 |]}. .Cr|eates a |
|000050a0| 70 6f 6c 79 67 6f 6e 20 | 77 69 74 68 20 74 68 65 |polygon |with the|
|000050b0| 20 67 69 76 65 6e 20 76 | 65 72 74 69 63 65 73 2e | given v|ertices.|
|000050c0| 20 54 68 65 20 76 65 72 | 74 69 63 65 73 0a 20 20 | The ver|tices. |
|000050d0| 09 73 68 6f 75 6c 64 20 | 62 65 20 67 69 76 65 6e |.should |be given|
|000050e0| 20 69 6e 20 63 6f 75 6e | 74 65 72 2d 63 6c 6f 63 | in coun|ter-cloc|
|000050f0| 6b 77 69 73 65 20 6f 72 | 64 65 72 20 61 73 20 6f |kwise or|der as o|
|00005100| 6e 65 20 69 73 0a 21 20 | 09 6c 6f 6f 6b 69 6e 67 |ne is.! |.looking|
|00005110| 20 61 74 20 74 68 65 20 | 60 60 74 6f 70 27 27 20 | at the |``top'' |
|00005120| 73 69 64 65 20 6f 66 20 | 74 68 65 20 70 6f 6c 79 |side of |the poly|
|00005130| 67 6f 6e 2e 20 20 54 68 | 65 20 6e 75 6d 62 65 72 |gon. Th|e number|
|00005140| 20 6f 66 0a 20 20 09 76 | 65 72 74 69 63 65 73 20 | of. .v|ertices |
|00005150| 69 6e 20 61 20 70 6f 6c | 79 67 6f 6e 20 69 73 20 |in a pol|ygon is |
|00005160| 6c 69 6d 69 74 65 64 20 | 6f 6e 6c 79 20 62 79 20 |limited |only by |
|00005170| 61 76 61 69 6c 61 62 6c | 65 20 6d 65 6d 6f 72 79 |availabl|e memory|
|00005180| 2e 0a 20 20 5c 65 6e 64 | 7b 64 65 66 70 72 69 6d |.. \end|{defprim|
|00005190| 7d 0a 20 20 49 6e 76 65 | 72 73 65 20 6d 61 70 70 |}. Inve|rse mapp|
|000051a0| 69 6e 67 20 66 6f 72 20 | 61 72 62 69 74 72 61 72 |ing for |arbitrar|
|000051b0| 79 20 70 6f 6c 79 67 6f | 6e 73 20 69 73 20 70 72 |y polygo|ns is pr|
|000051c0| 6f 62 6c 65 6d 61 74 69 | 63 61 6c 2e 0a 21 20 5c |oblemati|cal..! \|
|000051d0| 52 61 79 73 68 61 64 65 | 0a 21 20 70 75 6e 74 73 |Rayshade|.! punts|
|000051e0| 20 61 6e 64 20 65 71 75 | 61 74 65 20 24 75 24 20 | and equ|ate $u$ |
|000051f0| 77 69 74 68 20 74 68 65 | 20 24 78 24 20 63 6f 6f |with the| $x$ coo|
|00005200| 72 64 69 6e 61 74 65 20 | 6f 66 20 74 68 65 20 70 |rdinate |of the p|
|00005210| 6f 69 6e 74 20 6f 66 20 | 69 6e 74 65 72 73 65 63 |oint of |intersec|
|00005220| 74 69 6f 6e 2c 0a 20 20 | 61 6e 64 20 24 76 24 20 |tion,. |and $v$ |
|00005230| 77 69 74 68 20 74 68 65 | 20 24 79 24 20 63 6f 6f |with the| $y$ coo|
|00005240| 72 64 69 6e 61 74 65 2e | 0a 20 20 0a 20 20 5c 62 |rdinate.|. . \b|
|00005250| 65 67 69 6e 7b 64 65 66 | 70 72 69 6d 7d 7b 68 65 |egin{def|prim}{he|
|00005260| 69 67 68 74 66 69 65 6c | 64 7d 7b 7b 5c 65 6d 20 |ightfiel|d}{{\em |
|00005270| 66 69 6c 65 7d 7d 0a 2d | 2d 2d 20 31 33 36 2c 31 |file}}.-|-- 136,1|
|00005280| 34 37 20 2d 2d 2d 2d 0a | 20 20 5c 62 65 67 69 6e |47 ----.| \begin|
|00005290| 7b 64 65 66 70 72 69 6d | 7d 7b 70 6f 6c 79 7d 7b |{defprim|}{poly}{|
|000052a0| 5c 65 76 65 63 7b 70 31 | 7d 20 5c 65 76 65 63 7b |\evec{p1|} \evec{|
|000052b0| 70 32 7d 20 5c 65 76 65 | 63 7b 70 33 7d 20 5b 5c |p2} \eve|c{p3} [\|
|000052c0| 65 76 65 63 7b 70 34 7d | 20 5c 6c 64 6f 74 73 20 |evec{p4}| \ldots |
|000052d0| 5d 7d 0a 20 20 09 43 72 | 65 61 74 65 73 20 61 20 |]}. .Cr|eates a |
|000052e0| 70 6f 6c 79 67 6f 6e 20 | 77 69 74 68 20 74 68 65 |polygon |with the|
|000052f0| 20 67 69 76 65 6e 20 76 | 65 72 74 69 63 65 73 2e | given v|ertices.|
|00005300| 20 54 68 65 20 76 65 72 | 74 69 63 65 73 0a 20 20 | The ver|tices. |
|00005310| 09 73 68 6f 75 6c 64 20 | 62 65 20 67 69 76 65 6e |.should |be given|
|00005320| 20 69 6e 20 63 6f 75 6e | 74 65 72 2d 63 6c 6f 63 | in coun|ter-cloc|
|00005330| 6b 77 69 73 65 20 6f 72 | 64 65 72 20 61 73 20 6f |kwise or|der as o|
|00005340| 6e 65 20 69 73 0a 21 20 | 09 6c 6f 6f 6b 69 6e 67 |ne is.! |.looking|
|00005350| 20 61 74 20 74 68 65 20 | 60 60 66 72 6f 6e 74 27 | at the |``front'|
|00005360| 27 20 73 69 64 65 20 6f | 66 20 74 68 65 20 70 6f |' side o|f the po|
|00005370| 6c 79 67 6f 6e 2e 20 20 | 54 68 65 20 6e 75 6d 62 |lygon. |The numb|
|00005380| 65 72 20 6f 66 0a 20 20 | 09 76 65 72 74 69 63 65 |er of. |.vertice|
|00005390| 73 20 69 6e 20 61 20 70 | 6f 6c 79 67 6f 6e 20 69 |s in a p|olygon i|
|000053a0| 73 20 6c 69 6d 69 74 65 | 64 20 6f 6e 6c 79 20 62 |s limite|d only b|
|000053b0| 79 20 61 76 61 69 6c 61 | 62 6c 65 20 6d 65 6d 6f |y availa|ble memo|
|000053c0| 72 79 2e 0a 20 20 5c 65 | 6e 64 7b 64 65 66 70 72 |ry.. \e|nd{defpr|
|000053d0| 69 6d 7d 0a 20 20 49 6e | 76 65 72 73 65 20 6d 61 |im}. In|verse ma|
|000053e0| 70 70 69 6e 67 20 66 6f | 72 20 61 72 62 69 74 72 |pping fo|r arbitr|
|000053f0| 61 72 79 20 70 6f 6c 79 | 67 6f 6e 73 20 69 73 20 |ary poly|gons is |
|00005400| 70 72 6f 62 6c 65 6d 61 | 74 69 63 61 6c 2e 0a 21 |problema|tical..!|
|00005410| 20 7b 5c 52 61 79 73 68 | 61 64 65 7d 0a 21 20 70 | {\Raysh|ade}.! p|
|00005420| 75 6e 74 73 20 61 6e 64 | 20 65 71 75 61 74 65 73 |unts and| equates|
|00005430| 20 24 75 24 20 77 69 74 | 68 20 74 68 65 20 24 78 | $u$ wit|h the $x|
|00005440| 24 20 63 6f 6f 72 64 69 | 6e 61 74 65 20 6f 66 20 |$ coordi|nate of |
|00005450| 74 68 65 20 70 6f 69 6e | 74 20 6f 66 20 69 6e 74 |the poin|t of int|
|00005460| 65 72 73 65 63 74 69 6f | 6e 2c 0a 20 20 61 6e 64 |ersectio|n,. and|
|00005470| 20 24 76 24 20 77 69 74 | 68 20 74 68 65 20 24 79 | $v$ wit|h the $y|
|00005480| 24 20 63 6f 6f 72 64 69 | 6e 61 74 65 2e 0a 20 20 |$ coordi|nate.. |
|00005490| 0a 20 20 5c 62 65 67 69 | 6e 7b 64 65 66 70 72 69 |. \begi|n{defpri|
|000054a0| 6d 7d 7b 68 65 69 67 68 | 74 66 69 65 6c 64 7d 7b |m}{heigh|tfield}{|
|000054b0| 7b 5c 65 6d 20 66 69 6c | 65 7d 7d 0a 2a 2a 2a 2a |{\em fil|e}}.****|
|000054c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 0a 2a 2a 2a 20 |********|***.*** |
|000054d0| 32 35 34 2c 32 36 39 20 | 2a 2a 2a 2a 0a 20 20 66 |254,269 |****. f|
|000054e0| 69 72 73 74 20 67 69 76 | 65 6e 20 6f 62 6a 65 63 |irst giv|en objec|
|000054f0| 74 20 6d 69 6e 75 73 20 | 74 68 65 20 73 70 61 63 |t minus |the spac|
|00005500| 65 20 77 68 65 72 65 20 | 74 68 65 20 73 65 63 6f |e where |the seco|
|00005510| 6e 64 20 69 6e 74 65 72 | 73 65 63 74 65 64 0a 20 |nd inter|sected. |
|00005520| 20 74 68 65 20 66 69 72 | 73 74 2e 0a 20 20 0a 21 | the fir|st.. .!|
|00005530| 20 5c 73 75 62 73 65 63 | 74 69 6f 6e 7b 43 53 47 | \subsec|tion{CSG|
|00005540| 20 69 6e 20 52 61 79 73 | 68 61 64 65 7d 0a 20 20 | in Rays|hade}. |
|00005550| 0a 21 20 43 53 47 20 69 | 6e 20 5c 72 61 79 73 68 |.! CSG i|n \raysh|
|00005560| 61 64 65 20 77 69 6c 6c | 20 67 65 6e 65 72 61 6c |ade will| general|
|00005570| 6c 79 20 6f 70 65 72 61 | 74 65 20 70 72 6f 70 65 |ly opera|te prope|
|00005580| 72 6c 79 20 77 68 65 6e | 20 61 70 70 6c 69 65 64 |rly when| applied|
|00005590| 20 74 6f 0a 20 20 63 6f | 6e 6a 75 6e 63 74 69 6f | to. co|njunctio|
|000055a0| 6e 20 77 69 74 68 0a 20 | 20 6f 6e 20 62 6f 78 65 |n with. | on boxe|
|000055b0| 73 2c 20 73 70 68 65 72 | 65 73 2c 0a 20 20 74 6f |s, spher|es,. to|
|000055c0| 72 69 2c 20 61 6e 64 20 | 62 6c 6f 62 73 2e 0a 20 |ri, and |blobs.. |
|000055d0| 20 54 68 65 73 65 20 70 | 72 69 6d 69 74 69 76 65 | These p|rimitive|
|000055e0| 73 20 61 72 65 20 62 79 | 20 6e 61 74 75 72 65 20 |s are by| nature |
|000055f0| 63 6f 6e 73 69 73 74 65 | 6e 74 2c 20 61 73 20 74 |consiste|nt, as t|
|00005600| 68 65 79 20 61 6c 6c 0a | 21 20 65 6e 63 6c 6f 73 |hey all.|! enclos|
|00005610| 65 20 61 20 70 6f 72 74 | 69 6f 6e 20 6f 66 20 73 |e a port|ion of s|
|00005620| 70 61 63 65 20 28 6e 6f | 20 68 6f 6c 65 20 66 72 |pace (no| hole fr|
|00005630| 6f 6d 20 74 68 65 20 22 | 69 6e 73 69 64 65 22 20 |om the "|inside" |
|00005640| 74 6f 20 74 68 65 0a 21 | 20 22 6f 75 74 73 69 64 |to the.!| "outsid|
|00005650| 65 22 29 2c 20 68 61 76 | 65 20 73 75 72 66 61 63 |e"), hav|e surfac|
|00005660| 65 20 6e 6f 72 6d 61 6c | 73 20 77 68 69 63 68 20 |e normal|s which |
|00005670| 70 6f 69 6e 74 20 6f 75 | 74 77 61 72 64 20 28 74 |point ou|tward (t|
|00005680| 68 65 79 0a 21 20 61 72 | 65 20 6e 6f 74 20 22 69 |hey.! ar|e not "i|
|00005690| 6e 73 69 64 65 2d 6f 75 | 74 22 29 2c 20 61 6e 64 |nside-ou|t"), and|
|000056a0| 20 64 6f 20 6e 6f 74 20 | 68 61 76 65 20 61 6e 79 | do not |have any|
|000056b0| 20 65 78 74 72 61 6e 65 | 6f 75 73 20 73 75 72 66 | extrane|ous surf|
|000056c0| 61 63 65 73 2e 0a 20 20 | 0a 20 20 43 53 47 20 6f |aces.. |. CSG o|
|000056d0| 62 6a 65 63 74 73 20 6d | 61 79 20 61 6c 73 6f 20 |bjects m|ay also |
|000056e0| 62 65 20 63 6f 6e 73 74 | 72 75 63 74 65 64 20 66 |be const|ructed f|
|000056f0| 72 6f 6d 20 61 67 67 72 | 65 67 61 74 65 20 6f 62 |rom aggr|egate ob|
|00005700| 6a 65 63 74 73 2e 0a 20 | 20 54 68 65 73 65 20 61 |jects.. | These a|
|00005710| 67 67 72 65 67 61 74 65 | 73 20 63 6f 6e 74 61 69 |ggregate|s contai|
|00005720| 6e 0a 2d 2d 2d 20 32 35 | 38 2c 32 37 33 20 2d 2d |n.--- 25|8,273 --|
|00005730| 2d 2d 0a 20 20 66 69 72 | 73 74 20 67 69 76 65 6e |--. fir|st given|
|00005740| 20 6f 62 6a 65 63 74 20 | 6d 69 6e 75 73 20 74 68 | object |minus th|
|00005750| 65 20 73 70 61 63 65 20 | 77 68 65 72 65 20 74 68 |e space |where th|
|00005760| 65 20 73 65 63 6f 6e 64 | 20 69 6e 74 65 72 73 65 |e second| interse|
|00005770| 63 74 65 64 0a 20 20 74 | 68 65 20 66 69 72 73 74 |cted. t|he first|
|00005780| 2e 0a 20 20 0a 21 20 5c | 73 75 62 73 65 63 74 69 |.. .! \|subsecti|
|00005790| 6f 6e 7b 43 53 47 20 69 | 6e 20 7b 5c 52 61 79 73 |on{CSG i|n {\Rays|
|000057a0| 68 61 64 65 7d 7d 0a 20 | 20 0a 21 20 43 53 47 20 |hade}}. | .! CSG |
|000057b0| 69 6e 20 7b 5c 72 61 79 | 73 68 61 64 65 7d 20 77 |in {\ray|shade} w|
|000057c0| 69 6c 6c 20 67 65 6e 65 | 72 61 6c 6c 79 20 6f 70 |ill gene|rally op|
|000057d0| 65 72 61 74 65 20 70 72 | 6f 70 65 72 6c 79 20 77 |erate pr|operly w|
|000057e0| 68 65 6e 20 61 70 70 6c | 69 65 64 20 74 6f 0a 20 |hen appl|ied to. |
|000057f0| 20 63 6f 6e 6a 75 6e 63 | 74 69 6f 6e 20 77 69 74 | conjunc|tion wit|
|00005800| 68 0a 20 20 6f 6e 20 62 | 6f 78 65 73 2c 20 73 70 |h. on b|oxes, sp|
|00005810| 68 65 72 65 73 2c 0a 20 | 20 74 6f 72 69 2c 20 61 |heres,. | tori, a|
|00005820| 6e 64 20 62 6c 6f 62 73 | 2e 0a 20 20 54 68 65 73 |nd blobs|.. Thes|
|00005830| 65 20 70 72 69 6d 69 74 | 69 76 65 73 20 61 72 65 |e primit|ives are|
|00005840| 20 62 79 20 6e 61 74 75 | 72 65 20 63 6f 6e 73 69 | by natu|re consi|
|00005850| 73 74 65 6e 74 2c 20 61 | 73 20 74 68 65 79 20 61 |stent, a|s they a|
|00005860| 6c 6c 0a 21 20 65 6e 63 | 6c 6f 73 65 20 61 20 70 |ll.! enc|lose a p|
|00005870| 6f 72 74 69 6f 6e 20 6f | 66 20 73 70 61 63 65 20 |ortion o|f space |
|00005880| 28 6e 6f 20 68 6f 6c 65 | 20 66 72 6f 6d 20 74 68 |(no hole| from th|
|00005890| 65 20 60 60 69 6e 73 69 | 64 65 27 27 20 74 6f 20 |e ``insi|de'' to |
|000058a0| 74 68 65 0a 21 20 60 60 | 6f 75 74 73 69 64 65 27 |the.! ``|outside'|
|000058b0| 27 29 2c 20 68 61 76 65 | 20 73 75 72 66 61 63 65 |'), have| surface|
|000058c0| 20 6e 6f 72 6d 61 6c 73 | 20 77 68 69 63 68 20 70 | normals| which p|
|000058d0| 6f 69 6e 74 20 6f 75 74 | 77 61 72 64 20 28 74 68 |oint out|ward (th|
|000058e0| 65 79 0a 21 20 61 72 65 | 20 6e 6f 74 20 60 60 69 |ey.! are| not ``i|
|000058f0| 6e 73 69 64 65 2d 6f 75 | 74 27 27 29 2c 20 61 6e |nside-ou|t''), an|
|00005900| 64 20 64 6f 20 6e 6f 74 | 20 68 61 76 65 20 61 6e |d do not| have an|
|00005910| 79 20 65 78 74 72 61 6e | 65 6f 75 73 20 73 75 72 |y extran|eous sur|
|00005920| 66 61 63 65 73 2e 0a 20 | 20 0a 20 20 43 53 47 20 |faces.. | . CSG |
|00005930| 6f 62 6a 65 63 74 73 20 | 6d 61 79 20 61 6c 73 6f |objects |may also|
|00005940| 20 62 65 20 63 6f 6e 73 | 74 72 75 63 74 65 64 20 | be cons|tructed |
|00005950| 66 72 6f 6d 20 61 67 67 | 72 65 67 61 74 65 20 6f |from agg|regate o|
|00005960| 62 6a 65 63 74 73 2e 0a | 20 20 54 68 65 73 65 20 |bjects..| These |
|00005970| 61 67 67 72 65 67 61 74 | 65 73 20 63 6f 6e 74 61 |aggregat|es conta|
|00005980| 69 6e 0a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |in.*****|********|
|00005990| 2a 2a 0a 2a 2a 2a 20 33 | 30 39 2c 33 31 38 20 2a |**.*** 3|09,318 *|
|000059a0| 2a 2a 2a 0a 20 20 5c 73 | 75 62 73 65 63 74 69 6f |***. \s|ubsectio|
|000059b0| 6e 7b 50 6f 74 65 6e 74 | 69 61 6c 20 43 53 47 20 |n{Potent|ial CSG |
|000059c0| 50 72 6f 62 6c 65 6d 73 | 7d 0a 20 20 0a 20 20 41 |Problems|}. . A|
|000059d0| 20 63 6f 6e 73 69 73 74 | 65 6e 74 20 43 53 47 20 | consist|ent CSG |
|000059e0| 6d 6f 64 65 6c 20 69 73 | 20 6f 6e 65 20 77 68 69 |model is| one whi|
|000059f0| 63 68 20 69 73 20 6d 61 | 64 65 0a 21 20 75 70 20 |ch is ma|de.! up |
|00005a00| 6f 66 20 73 6f 6c 69 64 | 20 6f 62 6a 65 63 74 73 |of solid| objects|
|00005a10| 20 77 69 74 68 20 6e 6f | 20 64 61 6e 67 6c 69 6e | with no| danglin|
|00005a20| 67 20 73 75 72 66 61 63 | 65 73 2e 20 20 49 6e 20 |g surfac|es. In |
|00005a30| 7b 5c 65 6d 20 72 61 79 | 73 68 61 64 65 7d 2c 0a |{\em ray|shade},.|
|00005a40| 20 20 69 74 20 69 73 20 | 71 75 69 74 65 20 65 61 | it is |quite ea|
|00005a50| 73 79 20 74 6f 20 63 6f | 6e 73 74 72 75 63 74 20 |sy to co|nstruct |
|00005a60| 69 6e 63 6f 6e 73 69 73 | 74 65 6e 74 20 6d 6f 64 |inconsis|tent mod|
|00005a70| 65 6c 73 2c 20 77 68 69 | 63 68 20 77 69 6c 6c 20 |els, whi|ch will |
|00005a80| 75 73 75 61 6c 6c 79 0a | 20 20 61 70 70 65 61 72 |usually.| appear|
|00005a90| 20 69 6e 63 6f 72 72 65 | 63 74 20 69 6e 20 74 68 | incorre|ct in th|
|00005aa0| 65 20 66 69 6e 61 6c 20 | 69 6d 61 67 65 73 2e 0a |e final |images..|
|00005ab0| 21 20 49 6e 20 7b 5c 65 | 6d 20 72 61 79 73 68 61 |! In {\e|m raysha|
|00005ac0| 64 65 7d 2c 20 43 53 47 | 20 69 73 20 69 6d 70 6c |de}, CSG| is impl|
|00005ad0| 65 6d 65 6e 74 65 64 20 | 62 79 20 6d 61 69 6e 74 |emented |by maint|
|00005ae0| 61 69 6e 69 6e 67 0a 20 | 20 74 68 65 20 74 72 65 |aining. | the tre|
|00005af0| 65 20 73 74 72 75 63 74 | 75 72 65 20 6f 66 20 74 |e struct|ure of t|
|00005b00| 68 65 20 43 53 47 20 6f | 70 65 72 61 74 69 6f 6e |he CSG o|peration|
|00005b10| 73 2e 20 20 54 68 69 73 | 20 74 72 65 65 20 69 73 |s. This| tree is|
|00005b20| 20 74 72 61 76 65 72 73 | 65 64 2c 0a 20 20 61 6e | travers|ed,. an|
|00005b30| 64 20 74 68 65 20 6f 70 | 65 72 61 74 6f 72 73 20 |d the op|erators |
|00005b40| 74 68 65 72 65 69 6e 20 | 61 70 70 6c 69 65 64 2c |therein |applied,|
|00005b50| 20 6f 6e 20 61 20 70 65 | 72 2d 72 61 79 20 62 61 | on a pe|r-ray ba|
|00005b60| 73 69 73 2e 0a 20 20 49 | 74 20 69 73 20 74 68 65 |sis.. I|t is the|
|00005b70| 72 65 66 6f 72 65 20 64 | 69 66 66 69 63 75 6c 74 |refore d|ifficult|
|00005b80| 20 74 6f 20 76 65 72 69 | 66 79 20 74 68 65 20 63 | to veri|fy the c|
|00005b90| 6f 6e 73 69 73 74 65 6e | 63 79 20 6f 66 0a 2d 2d |onsisten|cy of.--|
|00005ba0| 2d 20 33 31 33 2c 33 32 | 32 20 2d 2d 2d 2d 0a 20 |- 313,32|2 ----. |
|00005bb0| 20 5c 73 75 62 73 65 63 | 74 69 6f 6e 7b 50 6f 74 | \subsec|tion{Pot|
|00005bc0| 65 6e 74 69 61 6c 20 43 | 53 47 20 50 72 6f 62 6c |ential C|SG Probl|
|00005bd0| 65 6d 73 7d 0a 20 20 0a | 20 20 41 20 63 6f 6e 73 |ems}. .| A cons|
|00005be0| 69 73 74 65 6e 74 20 43 | 53 47 20 6d 6f 64 65 6c |istent C|SG model|
|00005bf0| 20 69 73 20 6f 6e 65 20 | 77 68 69 63 68 20 69 73 | is one |which is|
|00005c00| 20 6d 61 64 65 0a 21 20 | 75 70 20 6f 66 20 73 6f | made.! |up of so|
|00005c10| 6c 69 64 20 6f 62 6a 65 | 63 74 73 20 77 69 74 68 |lid obje|cts with|
|00005c20| 20 6e 6f 20 64 61 6e 67 | 6c 69 6e 67 20 73 75 72 | no dang|ling sur|
|00005c30| 66 61 63 65 73 2e 20 20 | 49 6e 20 7b 5c 72 61 79 |faces. |In {\ray|
|00005c40| 73 68 61 64 65 7d 2c 0a | 20 20 69 74 20 69 73 20 |shade},.| it is |
|00005c50| 71 75 69 74 65 20 65 61 | 73 79 20 74 6f 20 63 6f |quite ea|sy to co|
|00005c60| 6e 73 74 72 75 63 74 20 | 69 6e 63 6f 6e 73 69 73 |nstruct |inconsis|
|00005c70| 74 65 6e 74 20 6d 6f 64 | 65 6c 73 2c 20 77 68 69 |tent mod|els, whi|
|00005c80| 63 68 20 77 69 6c 6c 20 | 75 73 75 61 6c 6c 79 0a |ch will |usually.|
|00005c90| 20 20 61 70 70 65 61 72 | 20 69 6e 63 6f 72 72 65 | appear| incorre|
|00005ca0| 63 74 20 69 6e 20 74 68 | 65 20 66 69 6e 61 6c 20 |ct in th|e final |
|00005cb0| 69 6d 61 67 65 73 2e 0a | 21 20 49 6e 20 7b 5c 72 |images..|! In {\r|
|00005cc0| 61 79 73 68 61 64 65 7d | 2c 20 43 53 47 20 69 73 |ayshade}|, CSG is|
|00005cd0| 20 69 6d 70 6c 65 6d 65 | 6e 74 65 64 20 62 79 20 | impleme|nted by |
|00005ce0| 6d 61 69 6e 74 61 69 6e | 69 6e 67 0a 20 20 74 68 |maintain|ing. th|
|00005cf0| 65 20 74 72 65 65 20 73 | 74 72 75 63 74 75 72 65 |e tree s|tructure|
|00005d00| 20 6f 66 20 74 68 65 20 | 43 53 47 20 6f 70 65 72 | of the |CSG oper|
|00005d10| 61 74 69 6f 6e 73 2e 20 | 20 54 68 69 73 20 74 72 |ations. | This tr|
|00005d20| 65 65 20 69 73 20 74 72 | 61 76 65 72 73 65 64 2c |ee is tr|aversed,|
|00005d30| 0a 20 20 61 6e 64 20 74 | 68 65 20 6f 70 65 72 61 |. and t|he opera|
|00005d40| 74 6f 72 73 20 74 68 65 | 72 65 69 6e 20 61 70 70 |tors the|rein app|
|00005d50| 6c 69 65 64 2c 20 6f 6e | 20 61 20 70 65 72 2d 72 |lied, on| a per-r|
|00005d60| 61 79 20 62 61 73 69 73 | 2e 0a 20 20 49 74 20 69 |ay basis|.. It i|
|00005d70| 73 20 74 68 65 72 65 66 | 6f 72 65 20 64 69 66 66 |s theref|ore diff|
|00005d80| 69 63 75 6c 74 20 74 6f | 20 76 65 72 69 66 79 20 |icult to| verify |
|00005d90| 74 68 65 20 63 6f 6e 73 | 69 73 74 65 6e 63 79 20 |the cons|istency |
|00005da0| 6f 66 0a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |of.*****|********|
|00005db0| 2a 2a 0a 2a 2a 2a 20 33 | 35 38 2c 33 36 34 20 2a |**.*** 3|58,364 *|
|00005dc0| 2a 2a 2a 0a 20 20 53 75 | 63 68 20 70 72 6f 62 6c |***. Su|ch probl|
|00005dd0| 65 6d 73 20 61 72 65 20 | 6f 66 74 65 6e 20 63 61 |ems are |often ca|
|00005de0| 75 73 65 64 20 62 79 0a | 20 20 70 6f 6c 79 67 6f |used by.| polygo|
|00005df0| 6e 73 20 77 69 74 68 20 | 69 6e 63 6f 72 72 65 63 |ns with |incorrec|
|00005e00| 74 6c 79 20 73 70 65 63 | 69 66 69 65 64 0a 20 20 |tly spec|ified. |
|00005e10| 6e 6f 72 6d 61 6c 73 2c | 20 6f 72 20 62 79 20 73 |normals,| or by s|
|00005e20| 75 72 66 61 63 65 73 20 | 74 68 61 74 20 65 78 61 |urfaces |that exa|
|00005e30| 63 74 6c 79 20 63 6f 69 | 6e 63 69 64 65 20 28 77 |ctly coi|ncide (w|
|00005e40| 68 69 63 68 0a 21 20 61 | 70 70 65 61 72 20 61 73 |hich.! a|ppear as|
|00005e50| 20 70 61 72 74 69 61 6c | 20 60 60 73 77 69 73 73 | partial| ``swiss|
|00005e60| 68 2d 63 68 65 65 73 65 | 27 27 20 6f 62 6a 65 63 |h-cheese|'' objec|
|00005e70| 74 73 29 2e 0a 20 20 0a | 20 20 54 68 65 20 66 6f |ts).. .| The fo|
|00005e80| 6c 6c 6f 77 69 6e 67 20 | 65 78 61 6d 70 6c 65 20 |llowing |example |
|00005e90| 69 6c 6c 75 73 74 72 61 | 74 65 73 20 61 6e 20 61 |illustra|tes an a|
|00005ea0| 74 74 65 6d 70 74 20 74 | 6f 20 73 75 62 74 72 61 |ttempt t|o subtra|
|00005eb0| 63 74 20 61 20 73 70 68 | 65 72 65 20 66 72 6f 6d |ct a sph|ere from|
|00005ec0| 0a 20 20 61 20 70 79 72 | 61 6d 69 64 20 64 65 66 |. a pyr|amid def|
|00005ed0| 69 6e 65 64 20 75 73 69 | 6e 67 20 61 6e 20 69 6e |ined usi|ng an in|
|00005ee0| 63 6f 72 72 65 63 74 6c | 79 20 66 61 63 69 6e 67 |correctl|y facing|
|00005ef0| 20 74 72 69 61 6e 67 6c | 65 2e 20 20 4e 6f 74 65 | triangl|e. Note|
|00005f00| 0a 2d 2d 2d 20 33 36 32 | 2c 33 36 38 20 2d 2d 2d |.--- 362|,368 ---|
|00005f10| 2d 0a 20 20 53 75 63 68 | 20 70 72 6f 62 6c 65 6d |-. Such| problem|
|00005f20| 73 20 61 72 65 20 6f 66 | 74 65 6e 20 63 61 75 73 |s are of|ten caus|
|00005f30| 65 64 20 62 79 0a 20 20 | 70 6f 6c 79 67 6f 6e 73 |ed by. |polygons|
|00005f40| 20 77 69 74 68 20 69 6e | 63 6f 72 72 65 63 74 6c | with in|correctl|
|00005f50| 79 20 73 70 65 63 69 66 | 69 65 64 0a 20 20 6e 6f |y specif|ied. no|
|00005f60| 72 6d 61 6c 73 2c 20 6f | 72 20 62 79 20 73 75 72 |rmals, o|r by sur|
|00005f70| 66 61 63 65 73 20 74 68 | 61 74 20 65 78 61 63 74 |faces th|at exact|
|00005f80| 6c 79 20 63 6f 69 6e 63 | 69 64 65 20 28 77 68 69 |ly coinc|ide (whi|
|00005f90| 63 68 0a 21 20 61 70 70 | 65 61 72 20 61 73 20 70 |ch.! app|ear as p|
|00005fa0| 61 72 74 69 61 6c 20 60 | 60 53 77 69 73 73 20 63 |artial `|`Swiss c|
|00005fb0| 68 65 65 73 65 27 27 20 | 6f 62 6a 65 63 74 73 29 |heese'' |objects)|
|00005fc0| 2e 0a 20 20 0a 20 20 54 | 68 65 20 66 6f 6c 6c 6f |.. . T|he follo|
|00005fd0| 77 69 6e 67 20 65 78 61 | 6d 70 6c 65 20 69 6c 6c |wing exa|mple ill|
|00005fe0| 75 73 74 72 61 74 65 73 | 20 61 6e 20 61 74 74 65 |ustrates| an atte|
|00005ff0| 6d 70 74 20 74 6f 20 73 | 75 62 74 72 61 63 74 20 |mpt to s|ubtract |
|00006000| 61 20 73 70 68 65 72 65 | 20 66 72 6f 6d 0a 20 20 |a sphere| from. |
|00006010| 61 20 70 79 72 61 6d 69 | 64 20 64 65 66 69 6e 65 |a pyrami|d define|
|00006020| 64 20 75 73 69 6e 67 20 | 61 6e 20 69 6e 63 6f 72 |d using |an incor|
|00006030| 72 65 63 74 6c 79 20 66 | 61 63 69 6e 67 20 74 72 |rectly f|acing tr|
|00006040| 69 61 6e 67 6c 65 2e 20 | 20 4e 6f 74 65 0a 2a 2a |iangle. | Note.**|
|00006050| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 0a 2a 2a |********|*****.**|
|00006060| 2a 20 33 38 37 2c 33 39 | 33 20 2a 2a 2a 2a 0a 20 |* 387,39|3 ****. |
|00006070| 20 0a 20 20 5c 73 65 63 | 74 69 6f 6e 20 7b 4e 61 | . \sec|tion {Na|
|00006080| 6d 65 64 20 4f 62 6a 65 | 63 74 73 7d 0a 20 20 0a |med Obje|cts}. .|
|00006090| 21 20 41 20 6e 61 6d 65 | 20 6d 61 79 20 62 65 20 |! A name| may be |
|000060a0| 61 73 73 6f 63 69 61 74 | 65 64 20 77 69 74 68 20 |associat|ed with |
|000060b0| 61 6e 79 20 70 72 69 6d | 69 74 69 76 65 2c 20 61 |any prim|itive, a|
|000060c0| 67 67 72 65 67 61 74 65 | 2c 20 6f 72 20 43 53 0a |ggregate|, or CS.|
|000060d0| 20 20 6f 62 6a 65 63 74 | 20 74 68 72 6f 75 67 68 | object| through|
|000060e0| 20 74 68 65 20 75 73 65 | 20 6f 66 20 74 68 65 20 | the use| of the |
|000060f0| 7b 5c 74 74 20 6e 61 6d | 65 7d 0a 20 20 6b 65 79 |{\tt nam|e}. key|
|00006100| 77 6f 72 64 3a 0a 20 20 | 0a 2d 2d 2d 20 33 39 31 |word:. |.--- 391|
|00006110| 2c 33 39 37 20 2d 2d 2d | 2d 0a 20 20 0a 20 20 5c |,397 ---|-. . \|
|00006120| 73 65 63 74 69 6f 6e 20 | 7b 4e 61 6d 65 64 20 4f |section |{Named O|
|00006130| 62 6a 65 63 74 73 7d 0a | 20 20 0a 21 20 41 20 6e |bjects}.| .! A n|
|00006140| 61 6d 65 20 6d 61 79 20 | 62 65 20 61 73 73 6f 63 |ame may |be assoc|
|00006150| 69 61 74 65 64 20 77 69 | 74 68 20 61 6e 79 20 70 |iated wi|th any p|
|00006160| 72 69 6d 69 74 69 76 65 | 2c 20 61 67 67 72 65 67 |rimitive|, aggreg|
|00006170| 61 74 65 2c 20 6f 72 20 | 43 53 47 0a 20 20 6f 62 |ate, or |CSG. ob|
|00006180| 6a 65 63 74 20 74 68 72 | 6f 75 67 68 20 74 68 65 |ject thr|ough the|
|00006190| 20 75 73 65 20 6f 66 20 | 74 68 65 20 7b 5c 74 74 | use of |the {\tt|
|000061a0| 20 6e 61 6d 65 7d 0a 20 | 20 6b 65 79 77 6f 72 64 | name}. | keyword|
|000061b0| 3a 0a 20 20 0a 0a 49 6e | 64 65 78 3a 20 44 6f 63 |:. ..In|dex: Doc|
|000061c0| 2f 47 75 69 64 65 2f 73 | 75 72 66 61 63 65 73 2e |/Guide/s|urfaces.|
|000061d0| 74 65 78 0a 2a 2a 2a 20 | 6f 6c 64 2f 44 6f 63 2f |tex.*** |old/Doc/|
|000061e0| 47 75 69 64 65 2f 73 75 | 72 66 61 63 65 73 2e 74 |Guide/su|rfaces.t|
|000061f0| 65 78 09 4d 6f 6e 20 46 | 65 62 20 20 33 20 31 32 |ex.Mon F|eb 3 12|
|00006200| 3a 35 30 3a 30 32 20 31 | 39 39 32 0a 2d 2d 2d 20 |:50:02 1|992.--- |
|00006210| 6e 65 77 2f 44 6f 63 2f | 47 75 69 64 65 2f 73 75 |new/Doc/|Guide/su|
|00006220| 72 66 61 63 65 73 2e 74 | 65 78 09 46 72 69 20 4a |rfaces.t|ex.Fri J|
|00006230| 61 6e 20 31 37 20 31 30 | 3a 32 39 3a 31 34 20 31 |an 17 10|:29:14 1|
|00006240| 39 39 32 0a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |992.****|********|
|00006250| 2a 2a 2a 0a 2a 2a 2a 20 | 38 2c 31 37 20 2a 2a 2a |***.*** |8,17 ***|
|00006260| 2a 0a 20 20 74 68 65 20 | 60 60 69 6e 74 65 72 69 |*. the |``interi|
|00006270| 6f 72 27 27 20 6f 66 20 | 61 6e 20 6f 62 6a 65 63 |or'' of |an objec|
|00006280| 74 20 69 73 20 74 68 65 | 20 60 60 6f 74 68 65 72 |t is the| ``other|
|00006290| 20 73 69 64 65 27 27 20 | 6f 66 20 74 68 65 20 6f | side'' |of the o|
|000062a0| 62 6a 65 63 74 27 73 20 | 73 75 72 66 61 63 65 0a |bject's |surface.|
|000062b0| 20 20 72 65 6c 61 74 69 | 76 65 20 74 6f 20 74 68 | relati|ve to th|
|000062c0| 65 20 6f 72 69 67 69 6e | 20 6f 66 20 61 20 72 61 |e origin| of a ra|
|000062d0| 79 2e 0a 20 20 0a 21 20 | 52 61 79 73 68 61 64 65 |y.. .! |Rayshade|
|000062e0| 20 75 73 75 61 6c 6c 79 | 20 65 6e 73 75 72 65 73 | usually| ensures|
|000062f0| 20 74 68 61 74 20 61 20 | 70 72 69 6d 69 74 69 76 | that a |primitiv|
|00006300| 65 27 73 20 73 75 72 66 | 61 63 65 20 6e 6f 72 6d |e's surf|ace norm|
|00006310| 61 6c 20 69 73 20 70 6f | 69 6e 74 69 6e 67 0a 20 |al is po|inting. |
|00006320| 20 74 6f 77 61 72 64 73 | 20 74 68 65 20 6f 72 69 | towards| the ori|
|00006330| 67 69 6e 20 6f 66 20 74 | 68 65 20 69 6e 63 69 64 |gin of t|he incid|
|00006340| 65 6e 74 20 72 61 79 20 | 77 68 65 6e 20 70 65 72 |ent ray |when per|
|00006350| 66 6f 72 6d 69 6e 67 20 | 73 68 61 64 69 6e 67 0a |forming |shading.|
|00006360| 20 20 63 61 6c 63 75 6c | 61 74 69 6f 6e 73 2e 20 | calcul|ations. |
|00006370| 20 45 78 63 65 70 74 69 | 6f 6e 73 20 74 6f 20 74 | Excepti|ons to t|
|00006380| 68 69 73 20 72 75 6c 65 | 20 61 72 65 20 74 72 61 |his rule| are tra|
|00006390| 6e 73 70 61 72 65 6e 74 | 20 70 72 69 6d 69 74 69 |nsparent| primiti|
|000063a0| 76 65 73 2c 20 66 6f 72 | 0a 21 20 77 68 69 63 68 |ves, for|.! which|
|000063b0| 20 72 61 79 73 68 61 64 | 65 20 75 73 65 73 20 74 | rayshad|e uses t|
|000063c0| 68 65 20 64 69 72 65 63 | 74 69 6f 6e 20 6f 66 20 |he direc|tion of |
|000063d0| 74 68 65 20 73 75 72 66 | 61 63 65 20 6e 6f 72 6d |the surf|ace norm|
|000063e0| 61 6c 20 74 6f 20 64 65 | 74 65 72 6d 69 6e 65 20 |al to de|termine |
|000063f0| 69 66 0a 20 20 74 68 65 | 20 69 6e 63 69 64 65 6e |if. the| inciden|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.