home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / msdos / raytrace / rayshade / doc / guide / lights.tex < prev    next >
LaTeX Document  |  1992-02-09  |  8.3 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: lights.tex

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Corel 10 Texture (image/corel10Texture) ext Unsupported
1% dexvert Croteam texture file (image/croteamTextureFile) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX document, ASCII text, with CRLF line terminators default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% detectItEasy Format: plain text[CRLF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 63 68 61 70 74 65 72 | 7b 4c 69 67 68 74 20 53 |\chapter|{Light S|
|00000010| 6f 75 72 63 65 73 7d 0d | 0a 0d 0a 54 68 65 20 6c |ources}.|...The l|
|00000020| 69 67 68 74 69 6e 67 20 | 69 6e 20 61 20 73 63 65 |ighting |in a sce|
|00000030| 6e 65 20 69 73 20 64 65 | 74 65 72 6d 69 6e 65 64 |ne is de|termined|
|00000040| 20 62 79 20 74 68 65 20 | 6e 75 6d 62 65 72 2c 20 | by the |number, |
|00000050| 74 79 70 65 2c 20 61 6e | 64 20 6e 61 74 75 72 65 |type, an|d nature|
|00000060| 0d 0a 6f 66 20 74 68 65 | 20 6c 69 67 68 74 20 73 |..of the| light s|
|00000070| 6f 75 72 63 65 73 20 64 | 65 66 69 6e 65 64 20 69 |ources d|efined i|
|00000080| 6e 20 74 68 65 20 69 6e | 70 75 74 20 66 69 6c 65 |n the in|put file|
|00000090| 2e 20 20 41 76 61 69 6c | 61 62 6c 65 20 6c 69 67 |. Avail|able lig|
|000000a0| 68 74 20 73 6f 75 72 63 | 65 73 0d 0a 72 61 6e 67 |ht sourc|es..rang|
|000000b0| 65 20 66 72 6f 6d 20 73 | 69 6d 70 6c 65 20 64 69 |e from s|imple di|
|000000c0| 72 65 63 74 69 6f 6e 61 | 6c 20 73 6f 75 72 63 65 |rectiona|l source|
|000000d0| 73 20 74 6f 20 6d 6f 72 | 65 20 72 65 61 6c 69 73 |s to mor|e realis|
|000000e0| 74 69 63 20 62 75 74 20 | 63 6f 6d 70 75 74 61 74 |tic but |computat|
|000000f0| 69 6f 6e 61 6c 6c 79 0d | 0a 63 6f 73 74 6c 79 20 |ionally.|.costly |
|00000100| 71 75 61 64 72 69 6c 61 | 74 65 72 61 6c 20 61 72 |quadrila|teral ar|
|00000110| 65 61 20 6c 69 67 68 74 | 20 73 6f 75 72 63 65 73 |ea light| sources|
|00000120| 2e 20 20 54 79 70 69 63 | 61 6c 6c 79 2c 20 79 6f |. Typic|ally, yo|
|00000130| 75 20 77 69 6c 6c 20 77 | 61 6e 74 20 74 6f 20 75 |u will w|ant to u|
|00000140| 73 65 0d 0a 70 6f 69 6e | 74 20 6f 72 20 64 69 72 |se..poin|t or dir|
|00000150| 65 63 74 69 6f 6e 61 6c | 20 6c 69 67 68 74 20 73 |ectional| light s|
|00000160| 6f 75 72 63 65 73 20 77 | 68 69 6c 65 20 64 65 76 |ources w|hile dev|
|00000170| 65 6c 6f 70 69 6e 67 20 | 69 6d 61 67 65 73 2e 20 |eloping |images. |
|00000180| 20 57 68 65 6e 0d 0a 66 | 69 6e 61 6c 20 72 65 6e | When..f|inal ren|
|00000190| 64 65 72 69 6e 67 73 20 | 61 72 65 20 6d 61 64 65 |derings |are made|
|000001a0| 2c 20 74 68 65 73 65 20 | 73 69 6d 70 6c 65 20 6c |, these |simple l|
|000001b0| 69 67 68 74 20 73 6f 75 | 72 63 65 73 20 6d 61 79 |ight sou|rces may|
|000001c0| 20 62 65 20 72 65 70 6c | 61 63 65 64 20 62 79 0d | be repl|aced by.|
|000001d0| 0a 74 68 65 20 6d 6f 72 | 65 20 63 6f 6d 70 6c 65 |.the mor|e comple|
|000001e0| 78 20 6f 6e 65 73 2e 0d | 0a 0d 0a 4e 6f 20 6d 61 |x ones..|...No ma|
|000001f0| 74 74 65 72 20 77 68 61 | 74 20 6b 69 6e 64 20 6f |tter wha|t kind o|
|00000200| 66 20 6c 69 67 68 74 20 | 73 6f 75 72 63 65 20 79 |f light |source y|
|00000210| 6f 75 20 75 73 65 2c 20 | 79 6f 75 20 77 69 6c 6c |ou use, |you will|
|00000220| 20 6e 65 65 64 20 74 6f | 0d 0a 73 70 65 63 69 66 | need to|..specif|
|00000230| 79 20 69 74 73 20 69 6e | 74 65 6e 73 69 74 79 2e |y its in|tensity.|
|00000240| 0d 0a 49 6e 20 74 68 69 | 73 20 63 68 61 70 74 65 |..In thi|s chapte|
|00000250| 72 2c 20 61 6e 20 7b 5c | 65 6d 20 49 6e 74 65 6e |r, an {\|em Inten|
|00000260| 73 69 74 79 5c 2f 7d 20 | 69 73 20 65 69 74 68 65 |sity\/} |is eithe|
|00000270| 72 20 61 20 72 65 64 2d | 67 72 65 65 6e 2d 62 6c |r a red-|green-bl|
|00000280| 75 65 20 74 72 69 70 6c | 65 0d 0a 69 6e 64 69 63 |ue tripl|e..indic|
|00000290| 61 74 69 6e 67 20 74 68 | 65 20 63 6f 6c 6f 72 20 |ating th|e color |
|000002a0| 6f 66 20 74 68 65 20 6c | 69 67 68 74 20 73 6f 75 |of the l|ight sou|
|000002b0| 72 63 65 2c 20 6f 72 20 | 61 20 73 69 6e 67 6c 65 |rce, or |a single|
|000002c0| 20 76 61 6c 75 65 20 74 | 68 61 74 20 69 73 0d 0a | value t|hat is..|
|000002d0| 69 6e 74 65 72 70 72 65 | 74 65 64 20 61 73 20 74 |interpre|ted as t|
|000002e0| 68 65 20 69 6e 74 65 6e | 73 69 74 79 20 6f 66 20 |he inten|sity of |
|000002f0| 61 20 60 60 77 68 69 74 | 65 27 27 20 6c 69 67 68 |a ``whit|e'' ligh|
|00000300| 74 2e 0d 0a 49 6e 20 74 | 68 65 20 63 75 72 72 65 |t...In t|he curre|
|00000310| 6e 74 20 76 65 72 73 69 | 6f 6e 20 6f 66 20 7b 5c |nt versi|on of {\|
|00000320| 72 61 79 73 68 61 64 65 | 7d 2c 20 74 68 65 20 69 |rayshade|}, the i|
|00000330| 6e 74 65 6e 73 69 74 79 | 20 6f 66 20 61 20 6c 69 |ntensity| of a li|
|00000340| 67 68 74 20 64 6f 65 73 | 0d 0a 6e 6f 74 20 64 65 |ght does|..not de|
|00000350| 63 72 65 61 73 65 20 61 | 73 0d 0a 6f 6e 65 20 6d |crease a|s..one m|
|00000360| 6f 76 65 73 20 66 61 72 | 74 68 65 72 20 66 72 6f |oves far|ther fro|
|00000370| 6d 20 69 74 2e 0d 0a 0d | 0a 49 66 20 79 6f 75 20 |m it....|.If you |
|00000380| 64 6f 20 6e 6f 74 20 64 | 65 66 69 6e 65 20 61 20 |do not d|efine a |
|00000390| 6c 69 67 68 74 20 73 6f | 75 72 63 65 2c 20 7b 5c |light so|urce, {\|
|000003a0| 72 61 79 73 68 61 64 65 | 7d 20 77 69 6c 6c 20 63 |rayshade|} will c|
|000003b0| 72 65 61 74 65 20 61 20 | 64 69 72 65 63 74 69 6f |reate a |directio|
|000003c0| 6e 61 6c 0d 0a 6c 69 67 | 68 74 20 73 6f 75 72 63 |nal..lig|ht sourc|
|000003d0| 65 20 6f 66 20 69 6e 74 | 65 6e 73 69 74 79 20 31 |e of int|ensity 1|
|000003e0| 2e 30 20 64 65 66 69 6e | 65 64 20 62 79 20 74 68 |.0 defin|ed by th|
|000003f0| 65 20 76 65 63 74 6f 72 | 20 28 31 2e 2c 20 2d 31 |e vector| (1., -1|
|00000400| 2e 2c 20 31 2e 29 2e 0d | 0a 54 68 69 73 20 64 65 |., 1.)..|.This de|
|00000410| 66 61 75 6c 74 20 6c 69 | 67 68 74 20 73 6f 75 72 |fault li|ght sour|
|00000420| 63 65 20 69 73 20 64 65 | 73 69 67 6e 65 64 20 74 |ce is de|signed t|
|00000430| 6f 20 77 6f 72 6b 20 77 | 65 6c 6c 20 77 68 65 6e |o work w|ell when|
|00000440| 20 64 65 66 61 75 6c 74 | 0d 0a 76 69 65 77 69 6e | default|..viewin|
|00000450| 67 20 70 61 72 61 6d 65 | 74 65 72 73 20 61 6e 64 |g parame|ters and|
|00000460| 20 73 75 72 66 61 63 65 | 20 76 61 6c 75 65 73 20 | surface| values |
|00000470| 61 72 65 20 62 65 69 6e | 67 20 75 73 65 64 2e 0d |are bein|g used..|
|00000480| 0a 0d 0a 59 6f 75 20 6d | 61 79 20 64 65 66 69 6e |...You m|ay defin|
|00000490| 65 20 61 6e 79 20 6e 75 | 6d 62 65 72 20 6f 66 20 |e any nu|mber of |
|000004a0| 6c 69 67 68 74 20 73 6f | 75 72 63 65 73 2c 20 62 |light so|urces, b|
|000004b0| 75 74 20 6b 65 65 70 20 | 69 6e 20 6d 69 6e 64 20 |ut keep |in mind |
|000004c0| 74 68 61 74 0d 0a 69 74 | 20 77 69 6c 6c 20 72 65 |that..it| will re|
|000004d0| 71 75 69 72 65 20 6d 6f | 72 65 20 74 69 6d 65 20 |quire mo|re time |
|000004e0| 74 6f 20 72 65 6e 64 65 | 72 20 69 6d 61 67 65 73 |to rende|r images|
|000004f0| 20 74 68 61 74 20 69 6e | 63 6c 75 64 65 20 6d 61 | that in|clude ma|
|00000500| 6e 79 0d 0a 6c 69 67 68 | 74 20 73 6f 75 72 63 65 |ny..ligh|t source|
|00000510| 73 2e 20 20 49 74 20 73 | 68 6f 75 6c 64 20 61 6c |s. It s|hould al|
|00000520| 73 6f 20 62 65 20 6e 6f | 74 65 64 20 74 68 61 74 |so be no|ted that|
|00000530| 20 74 68 65 20 6c 69 67 | 68 74 20 73 6f 75 72 63 | the lig|ht sourc|
|00000540| 65 73 20 74 68 65 6d 73 | 65 6c 76 65 73 0d 0a 77 |es thems|elves..w|
|00000550| 69 6c 6c 20 6e 6f 74 20 | 61 70 70 65 61 72 20 69 |ill not |appear i|
|00000560| 6e 20 74 68 65 20 69 6d | 61 67 65 2c 20 65 76 65 |n the im|age, eve|
|00000570| 6e 20 69 66 20 74 68 65 | 79 20 61 72 65 20 70 6c |n if the|y are pl|
|00000580| 61 63 65 64 20 69 6e 20 | 66 72 61 6d 65 2e 0d 0a |aced in |frame...|
|00000590| 0d 0a 5c 73 65 63 74 69 | 6f 6e 7b 4c 69 67 68 74 |..\secti|on{Light|
|000005a0| 20 53 6f 75 72 63 65 20 | 54 79 70 65 73 7d 0d 0a | Source |Types}..|
|000005b0| 0d 0a 54 68 65 20 61 6d | 6f 75 6e 74 20 6f 66 20 |..The am|ount of |
|000005c0| 61 6d 62 69 65 6e 74 20 | 6c 69 67 68 74 20 70 72 |ambient |light pr|
|000005d0| 65 73 65 6e 74 20 69 6e | 20 61 20 73 63 65 6e 65 |esent in| a scene|
|000005e0| 20 69 73 20 63 6f 6e 74 | 72 6f 6c 6c 65 64 20 62 | is cont|rolled b|
|000005f0| 79 20 61 0d 0a 70 73 65 | 75 64 6f 20 6c 69 67 68 |y a..pse|udo ligh|
|00000600| 74 20 73 6f 75 72 63 65 | 20 6f 66 20 74 79 70 65 |t source| of type|
|00000610| 20 7b 5c 65 6d 20 61 6d | 62 69 65 6e 74 7d 2e 0d | {\em am|bient}..|
|00000620| 0a 0d 0a 5c 62 65 67 69 | 6e 7b 64 65 66 6b 65 79 |...\begi|n{defkey|
|00000630| 7d 7b 6c 69 67 68 74 7d | 7b 7b 5c 65 6d 20 49 6e |}{light}|{{\em In|
|00000640| 74 65 6e 73 69 74 79 5c | 2f 7d 20 61 6d 62 69 65 |tensity\|/} ambie|
|00000650| 6e 74 7d 0d 0a 09 44 65 | 66 69 6e 65 20 74 68 65 |nt}...De|fine the|
|00000660| 20 61 6d 6f 75 6e 74 20 | 6f 66 20 61 6d 62 69 65 | amount |of ambie|
|00000670| 6e 74 20 6c 69 67 68 74 | 20 70 72 65 73 65 6e 74 |nt light| present|
|00000680| 20 69 6e 20 74 68 65 20 | 65 6e 74 69 72 65 0d 0a | in the |entire..|
|00000690| 09 73 63 65 6e 65 2e 0d | 0a 5c 65 6e 64 7b 64 65 |.scene..|.\end{de|
|000006a0| 66 6b 65 79 7d 0d 0a 0d | 0a 54 68 65 72 65 20 69 |fkey}...|.There i|
|000006b0| 73 20 6f 6e 6c 79 20 6f | 6e 65 20 61 6d 62 69 65 |s only o|ne ambie|
|000006c0| 6e 74 20 6c 69 67 68 74 | 20 73 6f 75 72 63 65 3b |nt light| source;|
|000006d0| 20 69 74 73 20 64 65 66 | 61 75 6c 74 20 69 6e 74 | its def|ault int|
|000006e0| 65 6e 73 69 74 79 20 69 | 73 0d 0a 7b 31 2c 20 31 |ensity i|s..{1, 1|
|000006f0| 2c 20 31 7d 2e 20 20 49 | 66 20 6d 6f 72 65 20 74 |, 1}. I|f more t|
|00000700| 68 61 6e 20 6f 6e 65 20 | 61 6d 62 69 65 6e 74 20 |han one |ambient |
|00000710| 6c 69 67 68 74 20 73 6f | 75 72 63 65 20 69 73 20 |light so|urce is |
|00000720| 64 65 66 69 6e 65 64 2c | 0d 0a 6f 6e 6c 79 20 74 |defined,|..only t|
|00000730| 68 65 20 6c 61 73 74 20 | 69 6e 73 74 61 6e 63 65 |he last |instance|
|00000740| 20 69 73 20 75 73 65 64 | 2e 20 20 41 20 73 75 72 | is used|. A sur|
|00000750| 66 61 63 65 27 73 20 61 | 6d 62 69 65 6e 74 20 63 |face's a|mbient c|
|00000760| 6f 6c 6f 72 0d 0a 69 73 | 20 6d 75 6c 74 69 70 6c |olor..is| multipl|
|00000770| 69 65 64 20 62 79 20 74 | 68 65 20 69 6e 74 65 6e |ied by t|he inten|
|00000780| 73 69 74 79 20 6f 66 20 | 74 68 65 20 61 6d 62 69 |sity of |the ambi|
|00000790| 65 6e 74 20 73 6f 75 72 | 63 65 20 74 6f 20 67 69 |ent sour|ce to gi|
|000007a0| 76 65 20 74 68 65 0d 0a | 74 6f 74 61 6c 20 61 6d |ve the..|total am|
|000007b0| 62 69 65 6e 74 20 6c 69 | 67 68 74 20 72 65 66 6c |bient li|ght refl|
|000007c0| 65 63 74 65 64 20 66 72 | 6f 6d 20 74 68 65 20 73 |ected fr|om the s|
|000007d0| 75 72 66 61 63 65 2e 0d | 0a 0d 0a 44 69 72 65 63 |urface..|...Direc|
|000007e0| 74 69 6f 6e 61 6c 20 73 | 6f 75 72 63 65 73 20 61 |tional s|ources a|
|000007f0| 72 65 20 64 65 73 63 72 | 69 62 65 64 20 62 79 20 |re descr|ibed by |
|00000800| 61 20 64 69 72 65 63 74 | 69 6f 6e 20 61 6c 6f 6e |a direct|ion alon|
|00000810| 65 2c 20 61 6e 64 20 61 | 72 65 20 75 73 65 66 75 |e, and a|re usefu|
|00000820| 6c 0d 0a 66 6f 72 20 6d | 6f 64 65 6c 69 6e 67 20 |l..for m|odeling |
|00000830| 6c 69 67 68 74 20 73 6f | 75 72 63 65 73 20 74 68 |light so|urces th|
|00000840| 61 74 20 61 72 65 20 65 | 66 66 65 63 74 69 76 65 |at are e|ffective|
|00000850| 6c 79 20 69 6e 66 69 6e | 69 74 65 6c 79 20 66 61 |ly infin|itely fa|
|00000860| 72 20 61 77 61 79 0d 0a | 66 72 6f 6d 20 74 68 65 |r away..|from the|
|00000870| 20 6f 62 6a 65 63 74 73 | 20 74 68 65 79 20 69 6c | objects| they il|
|00000880| 6c 75 6d 69 6e 61 74 65 | 2e 20 20 20 0d 0a 0d 0a |luminate|. ....|
|00000890| 5c 62 65 67 69 6e 7b 64 | 65 66 6b 65 79 7d 7b 6c |\begin{d|efkey}{l|
|000008a0| 69 67 68 74 7d 7b 7b 5c | 65 6d 20 49 6e 74 65 6e |ight}{{\|em Inten|
|000008b0| 73 69 74 79 5c 2f 7d 20 | 7b 5c 74 74 20 64 69 72 |sity\/} |{\tt dir|
|000008c0| 65 63 74 69 6f 6e 61 6c | 7d 20 5c 65 76 65 63 7b |ectional|} \evec{|
|000008d0| 64 69 72 65 63 74 69 6f | 6e 7d 7d 0d 0a 09 44 65 |directio|n}}...De|
|000008e0| 66 69 6e 65 20 61 20 6c | 69 67 68 74 20 73 6f 75 |fine a l|ight sou|
|000008f0| 72 63 65 20 77 69 74 68 | 20 74 68 65 20 67 69 76 |rce with| the giv|
|00000900| 65 6e 20 69 6e 74 65 6e | 73 69 74 79 20 74 68 61 |en inten|sity tha|
|00000910| 74 20 69 73 0d 0a 09 64 | 65 66 69 6e 65 64 20 74 |t is...d|efined t|
|00000920| 6f 20 62 65 20 69 6e 20 | 74 68 65 20 67 69 76 65 |o be in |the give|
|00000930| 6e 20 64 69 72 65 63 74 | 69 6f 6e 20 66 72 6f 6d |n direct|ion from|
|00000940| 20 65 76 65 72 79 20 70 | 6f 69 6e 74 0d 0a 09 69 | every p|oint...i|
|00000950| 74 20 69 6c 6c 75 6d 69 | 6e 61 74 65 73 2e 20 20 |t illumi|nates. |
|00000960| 54 68 65 20 64 69 72 65 | 63 74 69 6f 6e 20 6e 65 |The dire|ction ne|
|00000970| 65 64 20 6e 6f 74 20 62 | 65 20 6e 6f 72 6d 61 6c |ed not b|e normal|
|00000980| 69 7a 65 64 2e 0d 0a 5c | 65 6e 64 7b 64 65 66 6b |ized...\|end{defk|
|00000990| 65 79 7d 0d 0a 0d 0a 50 | 6f 69 6e 74 20 73 6f 75 |ey}....P|oint sou|
|000009a0| 72 63 65 73 20 61 72 65 | 20 64 65 66 69 6e 65 64 |rces are| defined|
|000009b0| 20 61 73 20 61 20 73 69 | 6e 67 6c 65 20 70 6f 69 | as a si|ngle poi|
|000009c0| 6e 74 20 69 6e 20 73 70 | 61 63 65 2e 20 20 54 68 |nt in sp|ace. Th|
|000009d0| 65 79 20 70 72 6f 64 75 | 63 65 0d 0a 73 68 61 64 |ey produ|ce..shad|
|000009e0| 6f 77 73 20 77 69 74 68 | 20 73 68 61 72 70 20 65 |ows with| sharp e|
|000009f0| 64 67 65 73 20 61 6e 64 | 20 61 72 65 20 61 20 67 |dges and| are a g|
|00000a00| 6f 6f 64 20 72 65 70 6c | 61 63 65 6d 65 6e 74 20 |ood repl|acement |
|00000a10| 66 6f 72 20 65 78 74 65 | 6e 64 65 64 0d 0a 61 6e |for exte|nded..an|
|00000a20| 64 20 6f 74 68 65 72 20 | 63 6f 6d 70 75 74 61 74 |d other |computat|
|00000a30| 69 6f 6e 61 6c 6c 79 20 | 65 78 70 65 6e 73 69 76 |ionally |expensiv|
|00000a40| 65 20 6c 69 67 68 74 20 | 73 6f 75 72 63 65 2e 0d |e light |source..|
|00000a50| 0a 0d 0a 5c 62 65 67 69 | 6e 7b 64 65 66 6b 65 79 |...\begi|n{defkey|
|00000a60| 7d 7b 6c 69 67 68 74 7d | 7b 7b 5c 65 6d 20 49 6e |}{light}|{{\em In|
|00000a70| 74 65 6e 73 69 74 79 5c | 2f 7d 20 7b 5c 74 74 20 |tensity\|/} {\tt |
|00000a80| 70 6f 69 6e 74 7d 20 5c | 65 76 65 63 7b 70 6f 73 |point} \|evec{pos|
|00000a90| 7d 7d 0d 0a 09 50 6c 61 | 63 65 20 61 20 70 6f 69 |}}...Pla|ce a poi|
|00000aa0| 6e 74 20 6c 69 67 68 74 | 20 73 6f 75 72 63 65 20 |nt light| source |
|00000ab0| 77 69 74 68 20 74 68 65 | 20 67 69 76 65 6e 20 69 |with the| given i|
|00000ac0| 6e 74 65 6e 73 69 74 79 | 20 61 74 20 74 68 65 0d |ntensity| at the.|
|00000ad0| 0a 09 67 69 76 65 6e 20 | 70 6f 73 69 74 69 6f 6e |..given |position|
|00000ae0| 2e 0d 0a 5c 65 6e 64 7b | 64 65 66 6b 65 79 7d 0d |...\end{|defkey}.|
|00000af0| 0a 0d 0a 53 70 6f 74 6c | 69 67 68 74 73 20 61 72 |...Spotl|ights ar|
|00000b00| 65 20 75 73 65 66 75 6c | 20 66 6f 72 20 63 72 65 |e useful| for cre|
|00000b10| 61 74 69 6e 67 20 64 72 | 61 6d 61 74 69 63 20 6c |ating dr|amatic l|
|00000b20| 6f 63 61 6c 69 7a 65 64 | 20 6c 69 67 68 74 69 6e |ocalized| lightin|
|00000b30| 67 20 65 66 66 65 63 74 | 73 2e 0d 0a 54 68 65 79 |g effect|s...They|
|00000b40| 20 61 72 65 20 64 65 66 | 69 6e 65 64 20 62 79 20 | are def|ined by |
|00000b50| 74 68 65 69 72 20 70 6f | 73 69 74 69 6f 6e 2c 20 |their po|sition, |
|00000b60| 74 68 65 20 64 69 72 65 | 63 74 69 6f 6e 20 69 6e |the dire|ction in|
|00000b70| 20 77 68 69 63 68 20 74 | 68 65 79 0d 0a 61 72 65 | which t|hey..are|
|00000b80| 20 70 6f 69 6e 74 69 6e | 67 2c 20 61 6e 64 20 74 | pointin|g, and t|
|00000b90| 68 65 20 77 69 64 74 68 | 20 6f 66 20 74 68 65 20 |he width| of the |
|00000ba0| 62 65 61 6d 20 6f 66 20 | 6c 69 67 68 74 20 74 68 |beam of |light th|
|00000bb0| 65 79 20 70 72 6f 64 75 | 63 65 2e 0d 0a 0d 0a 5c |ey produ|ce.....\|
|00000bc0| 62 65 67 69 6e 7b 64 65 | 66 6b 65 79 7d 7b 6c 69 |begin{de|fkey}{li|
|00000bd0| 67 68 74 7d 7b 7b 5c 65 | 6d 20 49 6e 74 65 6e 73 |ght}{{\e|m Intens|
|00000be0| 69 74 79 5c 2f 7d 20 7b | 5c 74 74 20 73 70 6f 74 |ity\/} {|\tt spot|
|00000bf0| 7d 20 5c 65 76 65 63 7b | 70 6f 73 7d 20 5c 65 76 |} \evec{|pos} \ev|
|00000c00| 65 63 7b 74 6f 7d 0d 0a | 20 20 20 20 7b 24 5c 61 |ec{to}..| {$\a|
|00000c10| 6c 70 68 61 24 7d 20 5b | 20 24 5c 74 68 65 74 61 |lpha$} [| $\theta|
|00000c20| 5f 7b 69 6e 7d 24 20 24 | 5c 74 68 65 74 61 5f 7b |_{in}$ $|\theta_{|
|00000c30| 6f 75 74 7d 24 20 5d 7d | 0d 0a 09 50 6c 61 63 65 |out}$ ]}|...Place|
|00000c40| 20 61 20 73 70 6f 74 6c | 69 67 68 74 20 61 74 20 | a spotl|ight at |
|00000c50| 5c 65 76 65 63 7b 70 6f | 73 7d 2c 20 6f 72 69 65 |\evec{po|s}, orie|
|00000c60| 6e 74 65 64 20 61 73 20 | 74 6f 20 62 65 20 70 6f |nted as |to be po|
|00000c70| 69 6e 74 69 6e 67 20 61 | 74 0d 0a 09 5c 65 76 65 |inting a|t...\eve|
|00000c80| 63 7b 74 6f 7d 2e 20 20 | 54 68 65 20 69 6e 74 65 |c{to}. |The inte|
|00000c90| 6e 73 69 74 79 20 6f 66 | 20 74 68 65 20 6c 69 67 |nsity of| the lig|
|00000ca0| 68 74 20 66 61 6c 6c 73 | 20 6f 66 66 20 61 73 0d |ht falls| off as.|
|00000cb0| 0a 09 24 28 63 6f 73 69 | 6e 65 20 5c 74 68 65 74 |..$(cosi|ne \thet|
|00000cc0| 61 29 5e 7b 5c 61 6c 70 | 68 61 7d 24 2c 20 77 68 |a)^{\alp|ha}$, wh|
|00000cd0| 65 72 65 20 24 5c 74 68 | 65 74 61 24 20 69 73 20 |ere $\th|eta$ is |
|00000ce0| 74 68 65 20 61 6e 67 6c | 65 20 62 65 74 77 65 65 |the angl|e betwee|
|00000cf0| 6e 20 74 68 65 0d 0a 09 | 73 70 6f 74 6c 69 67 68 |n the...|spotligh|
|00000d00| 74 27 73 20 6d 61 69 6e | 20 61 78 69 73 20 61 6e |t's main| axis an|
|00000d10| 64 20 74 68 65 20 76 65 | 63 74 6f 72 20 66 72 6f |d the ve|ctor fro|
|00000d20| 6d 20 74 68 65 20 73 70 | 6f 74 6c 69 67 68 74 20 |m the sp|otlight |
|00000d30| 74 6f 20 74 68 65 0d 0a | 09 70 6f 69 6e 74 20 62 |to the..|.point b|
|00000d40| 65 69 6e 67 20 69 6c 6c | 75 6d 69 6e 61 74 65 64 |eing ill|uminated|
|00000d50| 2e 20 20 24 5c 74 68 65 | 74 61 5f 7b 69 6e 7d 24 |. $\the|ta_{in}$|
|00000d60| 20 61 6e 64 0d 0a 09 24 | 5c 74 68 65 74 61 5f 7b | and...$|\theta_{|
|00000d70| 6f 75 74 7d 24 20 6d 61 | 79 20 62 65 20 75 73 65 |out}$ ma|y be use|
|00000d80| 64 20 74 6f 20 63 6f 6e | 74 72 6f 6c 20 74 68 65 |d to con|trol the|
|00000d90| 20 72 61 64 69 75 73 20 | 6f 66 20 74 68 65 20 63 | radius |of the c|
|00000da0| 6f 6e 65 20 6f 66 20 6c | 69 67 68 74 0d 0a 09 70 |one of l|ight...p|
|00000db0| 72 6f 64 75 63 65 64 20 | 62 79 20 74 68 65 20 73 |roduced |by the s|
|00000dc0| 70 6f 74 6c 69 67 68 74 | 2e 0d 0a 5c 65 6e 64 7b |potlight|...\end{|
|00000dd0| 64 65 66 6b 65 79 7d 0d | 0a 24 5c 74 68 65 74 61 |defkey}.|.$\theta|
|00000de0| 5f 7b 69 6e 7d 24 20 69 | 73 20 74 68 65 20 74 68 |_{in}$ i|s the th|
|00000df0| 65 20 61 6e 67 6c 65 20 | 61 74 20 77 68 69 63 68 |e angle |at which|
|00000e00| 0d 0a 74 68 65 20 6c 69 | 67 68 74 20 73 6f 75 72 |..the li|ght sour|
|00000e10| 63 65 20 62 65 67 69 6e | 73 20 74 6f 20 62 65 20 |ce begin|s to be |
|00000e20| 61 74 74 65 6e 75 61 74 | 65 64 2e 20 20 41 74 20 |attenuat|ed. At |
|00000e30| 24 5c 74 68 65 74 61 5f | 7b 6f 75 74 7d 24 2c 0d |$\theta_|{out}$,.|
|00000e40| 0a 74 68 65 20 73 70 6f | 74 6c 69 67 68 74 20 69 |.the spo|tlight i|
|00000e50| 6e 74 65 6e 73 69 74 79 | 20 69 73 20 7a 65 72 6f |ntensity| is zero|
|00000e60| 2e 0d 0a 54 68 69 73 20 | 61 66 66 6f 72 64 73 20 |...This |affords |
|00000e70| 63 6f 6e 74 72 6f 6c 0d | 0a 6f 76 65 72 20 68 6f |control.|.over ho|
|00000e80| 77 20 60 60 66 75 7a 7a | 79 27 27 20 74 68 65 20 |w ``fuzz|y'' the |
|00000e90| 65 64 67 65 73 20 6f 66 | 20 74 68 65 20 73 70 6f |edges of| the spo|
|00000ea0| 74 6c 69 67 68 74 20 61 | 72 65 2e 20 20 49 66 20 |tlight a|re. If |
|00000eb0| 6e 65 69 74 68 65 72 20 | 61 6e 67 6c 65 0d 0a 69 |neither |angle..i|
|00000ec0| 73 20 67 69 76 65 6e 2c | 20 74 68 65 79 20 62 6f |s given,| they bo|
|00000ed0| 74 68 20 61 72 65 20 65 | 66 66 65 63 74 69 76 65 |th are e|ffective|
|00000ee0| 6c 79 20 73 65 74 20 74 | 6f 20 31 38 30 20 64 65 |ly set t|o 180 de|
|00000ef0| 67 72 65 65 73 2e 0d 0a | 0d 0a 45 78 74 65 6e 64 |grees...|..Extend|
|00000f00| 65 64 20 73 6f 75 72 63 | 65 73 20 61 72 65 20 6d |ed sourc|es are m|
|00000f10| 65 61 6e 74 20 74 6f 20 | 6d 6f 64 65 6c 20 73 70 |eant to |model sp|
|00000f20| 68 65 72 69 63 61 6c 20 | 6c 69 67 68 74 20 73 6f |herical |light so|
|00000f30| 75 72 63 65 73 2e 20 20 | 55 6e 6c 69 6b 65 0d 0a |urces. |Unlike..|
|00000f40| 70 6f 69 6e 74 20 73 6f | 75 72 63 65 73 2c 20 65 |point so|urces, e|
|00000f50| 78 74 65 6e 64 65 64 20 | 73 6f 75 72 63 65 73 20 |xtended |sources |
|00000f60| 61 63 74 75 61 6c 6c 79 | 20 70 6f 73 73 65 73 73 |actually| possess|
|00000f70| 20 61 20 72 61 64 69 75 | 73 2c 20 61 6e 64 20 61 | a radiu|s, and a|
|00000f80| 73 20 73 75 63 68 0d 0a | 61 72 65 20 63 61 70 61 |s such..|are capa|
|00000f90| 62 6c 65 20 6f 72 20 70 | 72 6f 64 75 63 69 6e 67 |ble or p|roducing|
|00000fa0| 20 73 68 61 64 6f 77 73 | 20 77 69 74 68 20 66 75 | shadows| with fu|
|00000fb0| 7a 7a 79 20 65 64 67 65 | 73 20 28 7b 5c 65 6d 20 |zzy edge|s ({\em |
|00000fc0| 70 65 6e 75 6d 62 72 61 | 65 7d 29 2e 20 20 49 66 |penumbra|e}). If|
|00000fd0| 0d 0a 79 6f 75 20 64 6f | 20 6e 6f 74 20 73 70 65 |..you do| not spe|
|00000fe0| 63 69 66 69 63 61 6c 6c | 79 20 64 65 73 69 72 65 |cificall|y desire|
|00000ff0| 20 70 65 6e 75 6d 62 72 | 61 65 20 69 6e 20 79 6f | penumbr|ae in yo|
|00001000| 75 72 20 69 6d 61 67 65 | 2c 20 75 73 65 20 61 20 |ur image|, use a |
|00001010| 70 6f 69 6e 74 0d 0a 73 | 6f 75 72 63 65 20 69 6e |point..s|ource in|
|00001020| 73 74 65 61 64 2e 0d 0a | 0d 0a 5c 62 65 67 69 6e |stead...|..\begin|
|00001030| 7b 64 65 66 6b 65 79 7d | 7b 6c 69 67 68 74 7d 7b |{defkey}|{light}{|
|00001040| 7b 5c 65 6d 20 49 6e 74 | 65 6e 73 69 74 79 5c 2f |{\em Int|ensity\/|
|00001050| 7d 20 7b 5c 74 74 20 65 | 78 74 65 6e 64 65 64 7d |} {\tt e|xtended}|
|00001060| 20 7b 5c 65 6d 20 72 61 | 64 69 75 73 7d 20 5c 65 | {\em ra|dius} \e|
|00001070| 76 65 63 7b 70 6f 73 7d | 20 7d 0d 0a 09 43 72 65 |vec{pos}| }...Cre|
|00001080| 61 74 65 20 61 6e 20 65 | 78 74 65 6e 64 65 64 20 |ate an e|xtended |
|00001090| 6c 69 67 68 74 20 73 6f | 75 72 63 65 20 61 74 20 |light so|urce at |
|000010a0| 74 68 65 20 67 69 76 65 | 6e 20 70 6f 73 69 74 69 |the give|n positi|
|000010b0| 6f 6e 20 61 6e 64 20 77 | 69 74 68 0d 0a 09 74 68 |on and w|ith...th|
|000010c0| 65 20 67 69 76 65 6e 20 | 7b 5c 65 6d 20 72 61 64 |e given |{\em rad|
|000010d0| 69 75 73 7d 2e 0d 0a 5c | 65 6e 64 7b 64 65 66 6b |ius}...\|end{defk|
|000010e0| 65 79 7d 0d 0a 54 68 65 | 20 73 68 61 64 6f 77 73 |ey}..The| shadows|
|000010f0| 20 63 61 73 74 20 62 79 | 0d 0a 65 78 74 65 6e 64 | cast by|..extend|
|00001100| 65 64 20 73 6f 75 72 63 | 65 73 20 61 72 65 20 6d |ed sourc|es are m|
|00001110| 6f 64 65 6c 65 64 20 62 | 79 20 74 61 6b 69 6e 67 |odeled b|y taking|
|00001120| 20 73 61 6d 70 6c 65 73 | 20 6f 66 20 74 68 65 20 | samples| of the |
|00001130| 73 6f 75 72 63 65 20 61 | 74 0d 0a 64 69 66 66 65 |source a|t..diffe|
|00001140| 72 65 6e 74 20 6c 6f 63 | 61 74 69 6f 6e 73 20 6f |rent loc|ations o|
|00001150| 6e 20 69 74 73 20 73 75 | 72 66 61 63 65 2e 20 20 |n its su|rface. |
|00001160| 57 68 65 6e 20 74 68 65 | 20 73 6f 75 72 63 65 20 |When the| source |
|00001170| 69 73 20 70 61 72 74 69 | 61 6c 6c 79 0d 0a 68 69 |is parti|ally..hi|
|00001180| 64 64 65 6e 20 66 72 6f | 6d 20 61 20 67 69 76 65 |dden fro|m a give|
|00001190| 6e 20 70 6f 69 6e 74 20 | 69 6e 20 73 70 61 63 65 |n point |in space|
|000011a0| 2c 20 74 68 61 74 20 70 | 6f 69 6e 74 20 69 73 20 |, that p|oint is |
|000011b0| 69 6e 20 70 61 72 74 69 | 61 6c 20 73 68 61 64 6f |in parti|al shado|
|000011c0| 77 0d 0a 77 69 74 68 20 | 72 65 73 70 65 63 74 20 |w..with |respect |
|000011d0| 74 6f 20 74 68 65 20 65 | 78 74 65 6e 64 65 64 20 |to the e|xtended |
|000011e0| 73 6f 75 72 63 65 2c 20 | 61 6e 64 20 74 68 65 20 |source, |and the |
|000011f0| 73 61 6d 70 6c 69 6e 67 | 20 70 72 6f 63 65 73 73 |sampling| process|
|00001200| 20 69 73 0d 0a 75 73 75 | 61 6c 6c 79 20 61 62 6c | is..usu|ally abl|
|00001210| 65 20 74 6f 20 64 65 74 | 65 72 6d 69 6e 65 20 74 |e to det|ermine t|
|00001220| 68 69 73 20 66 61 63 74 | 2e 0d 0a 0d 0a 51 75 61 |his fact|.....Qua|
|00001230| 64 72 69 6c 61 74 65 72 | 61 6c 20 6c 69 67 68 74 |drilater|al light|
|00001240| 20 73 6f 75 72 63 65 73 | 20 61 72 65 20 63 6f 6d | sources| are com|
|00001250| 70 75 74 61 74 69 6f 6e | 61 6c 6c 79 20 6d 6f 72 |putation|ally mor|
|00001260| 65 20 65 78 70 65 6e 73 | 69 76 65 20 74 68 61 6e |e expens|ive than|
|00001270| 20 65 78 74 65 6e 64 65 | 64 0d 0a 6c 69 67 68 74 | extende|d..light|
|00001280| 20 73 6f 75 72 63 65 73 | 2c 20 62 75 74 20 61 72 | sources|, but ar|
|00001290| 65 20 6d 6f 72 65 20 66 | 6c 65 78 69 62 6c 65 20 |e more f|lexible |
|000012a0| 61 6e 64 20 70 72 6f 64 | 75 63 65 20 6d 6f 72 65 |and prod|uce more|
|000012b0| 20 72 65 61 6c 69 73 74 | 69 63 20 72 65 73 75 6c | realist|ic resul|
|000012c0| 74 73 2e 0d 0a 54 68 69 | 73 20 69 73 20 64 75 65 |ts...Thi|s is due|
|000012d0| 20 74 6f 20 74 68 65 20 | 66 61 63 74 20 74 68 61 | to the |fact tha|
|000012e0| 74 20 61 6e 20 61 72 65 | 61 20 73 6f 75 72 63 65 |t an are|a source|
|000012f0| 20 69 73 20 61 70 70 72 | 6f 78 69 6d 61 74 65 64 | is appr|oximated|
|00001300| 20 62 79 20 61 0d 0a 6e | 75 6d 62 65 72 20 6f 66 | by a..n|umber of|
|00001310| 20 70 6f 69 6e 74 20 73 | 6f 75 72 63 65 73 20 77 | point s|ources w|
|00001320| 68 6f 73 65 20 70 6f 73 | 69 74 69 6f 6e 73 20 61 |hose pos|itions a|
|00001330| 72 65 20 6a 69 74 74 65 | 72 65 64 20 74 6f 20 72 |re jitte|red to r|
|00001340| 65 64 75 63 65 20 61 6c | 69 61 73 69 6e 67 2e 0d |educe al|iasing..|
|00001350| 0a 42 65 63 61 75 73 65 | 20 65 61 63 68 20 6f 66 |.Because| each of|
|00001360| 20 74 68 65 73 65 20 70 | 6f 69 6e 74 20 73 6f 75 | these p|oint sou|
|00001370| 72 63 65 73 20 68 61 73 | 20 73 68 61 64 69 6e 67 |rces has| shading|
|00001380| 20 63 61 6c 63 75 6c 61 | 74 69 6f 6e 73 20 70 65 | calcula|tions pe|
|00001390| 72 66 6f 72 6d 65 64 0d | 0a 69 6e 64 69 76 69 64 |rformed.|.individ|
|000013a0| 75 61 6c 6c 79 2c 20 61 | 72 65 61 20 73 6f 75 72 |ually, a|rea sour|
|000013b0| 63 65 73 20 6d 61 79 20 | 62 65 20 70 6c 61 63 65 |ces may |be place|
|000013c0| 64 20 72 65 6c 61 74 69 | 76 65 6c 79 20 63 6c 6f |d relati|vely clo|
|000013d0| 73 65 20 74 6f 20 74 68 | 65 0d 0a 6f 62 6a 65 63 |se to th|e..objec|
|000013e0| 74 73 20 69 74 20 69 6c | 6c 75 6d 69 6e 61 74 65 |ts it il|luminate|
|000013f0| 73 2c 20 61 6e 64 20 61 | 20 72 65 61 73 6f 6e 61 |s, and a| reasona|
|00001400| 62 6c 65 20 69 6d 61 67 | 65 20 77 69 6c 6c 20 72 |ble imag|e will r|
|00001410| 65 73 75 6c 74 2e 0d 0a | 0d 0a 5c 62 65 67 69 6e |esult...|..\begin|
|00001420| 7b 64 65 66 6b 65 79 7d | 7b 6c 69 67 68 74 7d 7b |{defkey}|{light}{|
|00001430| 7b 5c 65 6d 20 49 6e 74 | 65 6e 73 69 74 79 5c 2f |{\em Int|ensity\/|
|00001440| 7d 20 7b 5c 74 74 20 61 | 72 65 61 7d 20 5c 65 76 |} {\tt a|rea} \ev|
|00001450| 65 63 7b 70 31 7d 20 5c | 65 76 65 63 7b 70 32 7d |ec{p1} \|evec{p2}|
|00001460| 20 7b 5c 65 6d 20 75 73 | 61 6d 70 7d 0d 0a 09 5c | {\em us|amp}...\|
|00001470| 65 76 65 63 7b 70 33 7d | 20 7b 5c 65 6d 20 76 73 |evec{p3}| {\em vs|
|00001480| 61 6d 70 7d 7d 0d 0a 09 | 43 72 65 61 74 65 20 61 |amp}}...|Create a|
|00001490| 20 71 75 61 64 72 69 6c | 61 74 65 72 61 6c 20 61 | quadril|ateral a|
|000014a0| 72 65 61 20 6c 69 67 68 | 74 20 73 6f 75 72 63 65 |rea ligh|t source|
|000014b0| 2e 0d 0a 09 54 68 65 20 | 24 75 24 20 61 78 69 73 |....The |$u$ axis|
|000014c0| 0d 0a 09 69 73 20 64 65 | 66 69 6e 65 64 20 62 79 |...is de|fined by|
|000014d0| 20 74 68 65 20 76 65 63 | 74 6f 72 20 66 72 6f 6d | the vec|tor from|
|000014e0| 20 5c 65 76 65 63 7b 70 | 31 7d 20 74 6f 20 5c 65 | \evec{p|1} to \e|
|000014f0| 76 65 63 7b 70 32 7d 2e | 20 20 41 6c 6f 6e 67 0d |vec{p2}.| Along.|
|00001500| 0a 09 74 68 69 73 20 61 | 78 69 73 20 61 20 74 6f |..this a|xis a to|
|00001510| 74 61 6c 20 6f 66 20 7b | 5c 65 6d 20 75 73 61 6d |tal of {|\em usam|
|00001520| 70 7d 20 73 61 6d 70 6c | 65 73 20 77 69 6c 6c 20 |p} sampl|es will |
|00001530| 62 65 20 74 61 6b 65 6e | 2e 0d 0a 09 54 68 65 20 |be taken|....The |
|00001540| 24 76 24 20 61 78 69 73 | 20 6f 66 20 74 68 65 20 |$v$ axis| of the |
|00001550| 6c 69 67 68 74 20 73 6f | 75 72 63 65 20 69 73 20 |light so|urce is |
|00001560| 64 65 66 69 6e 65 64 20 | 62 79 20 74 68 65 20 76 |defined |by the v|
|00001570| 65 63 74 6f 72 0d 0a 09 | 66 72 6f 6d 20 5c 65 76 |ector...|from \ev|
|00001580| 65 63 7b 70 31 7d 20 74 | 6f 20 5c 65 76 65 63 7b |ec{p1} t|o \evec{|
|00001590| 70 33 7d 2e 20 20 41 6c | 6f 6e 67 20 74 68 69 73 |p3}. Al|ong this|
|000015a0| 20 61 78 69 73 20 61 20 | 74 6f 74 61 6c 20 6f 66 | axis a |total of|
|000015b0| 0d 0a 09 7b 5c 65 6d 20 | 76 73 61 6d 70 7d 20 73 |...{\em |vsamp} s|
|000015c0| 61 6d 70 6c 65 73 20 77 | 69 6c 6c 20 62 65 20 74 |amples w|ill be t|
|000015d0| 61 6b 65 6e 2e 0d 0a 5c | 65 6e 64 7b 64 65 66 6b |aken...\|end{defk|
|000015e0| 65 79 7d 0d 0a 54 68 65 | 20 76 61 6c 75 65 73 20 |ey}..The| values |
|000015f0| 6f 66 20 7b 5c 65 6d 20 | 75 73 61 6d 70 7d 20 61 |of {\em |usamp} a|
|00001600| 6e 64 20 7b 5c 65 6d 20 | 76 73 61 6d 70 7d 20 61 |nd {\em |vsamp} a|
|00001610| 72 65 20 75 73 75 61 6c | 6c 79 20 63 68 6f 73 65 |re usual|ly chose|
|00001620| 6e 20 74 6f 20 62 65 0d | 0a 70 72 6f 70 6f 72 74 |n to be.|.proport|
|00001630| 69 6f 6e 61 6c 20 74 6f | 20 74 68 65 20 6c 65 6e |ional to| the len|
|00001640| 67 74 68 73 20 6f 66 20 | 74 68 65 20 24 75 24 20 |gths of |the $u$ |
|00001650| 61 6e 64 20 24 76 24 20 | 61 78 65 73 2e 20 20 43 |and $v$ |axes. C|
|00001660| 68 6f 6f 73 69 6e 67 20 | 61 0d 0a 72 65 6c 61 74 |hoosing |a..relat|
|00001670| 69 76 65 6c 79 20 68 69 | 67 68 20 6e 75 6d 62 65 |ively hi|gh numbe|
|00001680| 72 20 6f 66 20 73 61 6d | 70 6c 65 73 20 77 69 6c |r of sam|ples wil|
|00001690| 6c 20 72 65 73 75 6c 74 | 20 69 6e 20 61 20 67 6f |l result| in a go|
|000016a0| 6f 64 20 61 70 70 72 6f | 78 69 6d 61 74 69 6f 6e |od appro|ximation|
|000016b0| 0d 0a 74 6f 20 61 20 60 | 60 72 65 61 6c 27 27 20 |..to a `|`real'' |
|000016c0| 71 75 61 64 72 69 6c 61 | 74 65 72 61 6c 20 73 6f |quadrila|teral so|
|000016d0| 75 72 63 65 2e 20 20 48 | 6f 77 65 76 65 72 2c 20 |urce. H|owever, |
|000016e0| 62 65 63 61 75 73 65 20 | 63 6f 6d 70 6c 65 74 65 |because |complete|
|000016f0| 0d 0a 6c 69 67 68 74 69 | 6e 67 20 63 61 6c 63 75 |..lighti|ng calcu|
|00001700| 6c 61 74 69 6f 6e 73 20 | 61 72 65 20 70 65 72 66 |lations |are perf|
|00001710| 6f 72 6d 65 64 20 66 6f | 72 20 65 61 63 68 20 73 |ormed fo|r each s|
|00001720| 61 6d 70 6c 65 2c 0d 0a | 74 68 65 20 63 6f 6d 70 |ample,..|the comp|
|00001730| 75 74 61 74 69 6f 6e 61 | 6c 20 63 6f 73 74 20 69 |utationa|l cost i|
|00001740| 73 20 64 69 72 65 63 74 | 6c 79 20 70 72 6f 70 6f |s direct|ly propo|
|00001750| 72 74 69 6f 6e 61 6c 20 | 74 6f 20 74 68 65 20 70 |rtional |to the p|
|00001760| 72 6f 64 75 63 74 0d 0a | 6f 66 20 7b 5c 65 6d 20 |roduct..|of {\em |
|00001770| 75 73 61 6d 70 7d 20 61 | 6e 64 20 7b 5c 65 6d 20 |usamp} a|nd {\em |
|00001780| 76 73 61 6d 70 7d 2e 0d | 0a 0d 0a 5c 73 65 63 74 |vsamp}..|...\sect|
|00001790| 69 6f 6e 7b 53 68 61 64 | 6f 77 73 7d 0d 0a 0d 0a |ion{Shad|ows}....|
|000017a0| 49 6e 20 6f 72 64 65 72 | 20 74 6f 20 64 65 74 65 |In order| to dete|
|000017b0| 72 6d 69 6e 65 20 74 68 | 65 20 63 6f 6c 6f 72 20 |rmine th|e color |
|000017c0| 6f 66 20 61 20 70 6f 69 | 6e 74 20 6f 6e 20 74 68 |of a poi|nt on th|
|000017d0| 65 20 73 75 72 66 61 63 | 65 0d 0a 6f 66 20 61 6e |e surfac|e..of an|
|000017e0| 79 20 6f 62 6a 65 63 74 | 2c 20 69 74 20 69 73 20 |y object|, it is |
|000017f0| 6e 65 63 65 73 73 61 72 | 79 0d 0a 74 6f 20 64 65 |necessar|y..to de|
|00001800| 74 65 72 6d 69 6e 65 20 | 69 66 20 74 68 61 74 20 |termine |if that |
|00001810| 70 6f 69 6e 74 20 69 73 | 20 69 6e 20 73 68 61 64 |point is| in shad|
|00001820| 6f 77 20 77 69 74 68 20 | 72 65 73 70 65 63 74 20 |ow with |respect |
|00001830| 74 6f 20 65 61 63 68 0d | 0a 64 65 66 69 6e 65 64 |to each.|.defined|
|00001840| 20 6c 69 67 68 74 20 73 | 6f 75 72 63 65 2e 20 20 | light s|ource. |
|00001850| 49 66 20 74 68 65 20 70 | 6f 69 6e 74 20 69 73 20 |If the p|oint is |
|00001860| 74 6f 74 61 6c 6c 79 20 | 69 6e 20 73 68 61 64 6f |totally |in shado|
|00001870| 77 20 77 69 74 68 20 72 | 65 73 70 65 63 74 20 74 |w with r|espect t|
|00001880| 6f 0d 0a 61 20 6c 69 67 | 68 74 20 73 6f 75 72 63 |o..a lig|ht sourc|
|00001890| 65 2c 20 74 68 65 6e 20 | 74 68 65 20 6c 69 67 68 |e, then |the ligh|
|000018a0| 74 20 73 6f 75 72 63 65 | 20 6d 61 6b 65 73 20 6e |t source| makes n|
|000018b0| 6f 20 63 6f 6e 74 72 69 | 62 75 74 69 6f 6e 20 74 |o contri|bution t|
|000018c0| 6f 20 74 68 65 0d 0a 70 | 6f 69 6e 74 27 73 20 66 |o the..p|oint's f|
|000018d0| 69 6e 61 6c 20 63 6f 6c | 6f 72 2e 0d 0a 0d 0a 54 |inal col|or.....T|
|000018e0| 68 69 73 20 73 68 61 64 | 6f 77 69 6e 67 20 64 65 |his shad|owing de|
|000018f0| 74 65 72 6d 69 6e 61 74 | 69 6f 6e 20 69 73 20 6d |terminat|ion is m|
|00001900| 61 64 65 20 62 79 20 74 | 72 61 63 69 6e 67 20 72 |ade by t|racing r|
|00001910| 61 79 73 20 66 72 6f 6d | 20 74 68 65 20 70 6f 69 |ays from| the poi|
|00001920| 6e 74 0d 0a 6f 66 20 69 | 6e 74 65 72 73 65 63 74 |nt..of i|ntersect|
|00001930| 69 6f 6e 20 74 6f 20 65 | 61 63 68 20 6c 69 67 68 |ion to e|ach ligh|
|00001940| 74 20 73 6f 75 72 63 65 | 2e 20 20 54 68 65 73 65 |t source|. These|
|00001950| 20 60 60 73 68 61 64 6f | 77 20 66 65 65 6c 65 72 | ``shado|w feeler|
|00001960| 27 27 20 72 61 79 73 0d | 0a 63 61 6e 20 61 64 64 |'' rays.|.can add|
|00001970| 20 73 75 62 73 74 61 6e | 74 69 61 6c 6c 79 20 74 | substan|tially t|
|00001980| 6f 20 74 68 65 20 6f 76 | 65 72 61 6c 6c 20 72 65 |o the ov|erall re|
|00001990| 6e 64 65 72 69 6e 67 20 | 74 69 6d 65 2e 20 20 54 |ndering |time. T|
|000019a0| 68 69 73 20 69 73 20 65 | 73 70 65 63 69 61 6c 6c |his is e|speciall|
|000019b0| 79 0d 0a 74 72 75 65 20 | 69 66 20 65 78 74 65 6e |y..true |if exten|
|000019c0| 64 65 64 20 6f 72 20 61 | 72 65 61 20 6c 69 67 68 |ded or a|rea ligh|
|000019d0| 74 20 73 6f 75 72 63 65 | 73 20 61 72 65 20 75 73 |t source|s are us|
|000019e0| 65 64 2e 20 20 49 66 20 | 61 74 20 61 6e 79 20 70 |ed. If |at any p|
|000019f0| 6f 69 6e 74 20 79 6f 75 | 0d 0a 77 69 73 68 20 74 |oint you|..wish t|
|00001a00| 6f 20 64 69 73 61 62 6c | 65 20 73 68 61 64 6f 77 |o disabl|e shadow|
|00001a10| 20 64 65 74 65 72 6d 69 | 6e 61 74 69 6f 6e 20 6f | determi|nation o|
|00001a20| 6e 20 61 20 67 6c 6f 62 | 61 6c 20 73 63 61 6c 65 |n a glob|al scale|
|00001a30| 2c 20 74 68 65 72 65 20 | 69 73 0d 0a 61 20 63 6f |, there |is..a co|
|00001a40| 6d 6d 61 6e 64 2d 6c 69 | 6e 65 20 6f 70 74 69 6f |mmand-li|ne optio|
|00001a50| 6e 20 28 7b 5c 74 74 20 | 2d 6e 7d 29 20 74 68 61 |n ({\tt |-n}) tha|
|00001a60| 74 20 61 6c 6c 6f 77 73 | 20 79 6f 75 20 74 6f 20 |t allows| you to |
|00001a70| 64 6f 20 73 6f 2e 20 20 | 49 74 20 69 73 20 61 6c |do so. |It is al|
|00001a80| 73 6f 0d 0a 70 6f 73 73 | 69 62 6c 65 0d 0a 74 6f |so..poss|ible..to|
|00001a90| 20 64 69 73 61 62 6c 65 | 20 74 68 65 20 63 61 73 | disable| the cas|
|00001aa0| 74 69 6e 67 20 6f 66 20 | 73 68 61 64 6f 77 73 20 |ting of |shadows |
|00001ab0| 6f 6e 74 6f 20 67 69 76 | 65 6e 20 6f 62 6a 65 63 |onto giv|en objec|
|00001ac0| 74 73 20 74 68 72 6f 75 | 67 68 20 74 68 65 20 75 |ts throu|gh the u|
|00001ad0| 73 65 0d 0a 6f 66 20 74 | 68 65 20 7b 5c 74 74 20 |se..of t|he {\tt |
|00001ae0| 6e 6f 73 68 61 64 6f 77 | 7d 20 6b 65 79 77 6f 72 |noshadow|} keywor|
|00001af0| 64 20 69 6e 20 73 75 72 | 66 61 63 65 20 64 65 73 |d in sur|face des|
|00001b00| 63 72 69 70 74 69 6f 6e | 73 2e 20 20 49 6e 20 61 |cription|s. In a|
|00001b10| 64 64 69 74 69 6f 6e 2c | 0d 0a 74 68 65 20 7b 5c |ddition,|..the {\|
|00001b20| 74 74 20 6e 6f 73 68 61 | 64 6f 77 7d 20 6b 65 79 |tt nosha|dow} key|
|00001b30| 77 6f 72 64 20 6d 61 79 | 20 62 65 20 67 69 76 65 |word may| be give|
|00001b40| 6e 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 74 68 65 20 |n follow|ing the |
|00001b50| 64 65 66 69 6e 69 74 69 | 6f 6e 0d 0a 6f 66 20 61 |definiti|on..of a|
|00001b60| 20 6c 69 67 68 74 20 73 | 6f 75 72 63 65 2c 20 63 | light s|ource, c|
|00001b70| 61 75 73 69 6e 67 20 74 | 68 65 20 6c 69 67 68 74 |ausing t|he light|
|00001b80| 20 73 6f 75 72 63 65 20 | 74 6f 20 63 61 73 74 20 | source |to cast |
|00001b90| 6e 6f 20 73 68 61 64 6f | 77 73 20 6f 6e 74 6f 0d |no shado|ws onto.|
|00001ba0| 0a 61 6e 79 20 73 75 72 | 66 61 63 65 2e 0d 0a 0d |.any sur|face....|
|00001bb0| 0a 44 65 74 65 72 6d 69 | 6e 69 6e 67 20 69 66 20 |.Determi|ning if |
|00001bc0| 61 20 70 6f 69 6e 74 20 | 69 73 20 69 6e 20 73 68 |a point |is in sh|
|00001bd0| 61 64 6f 77 20 77 69 74 | 68 20 72 65 73 70 65 63 |adow wit|h respec|
|00001be0| 74 20 74 6f 20 61 20 6c | 69 67 68 74 20 73 6f 75 |t to a l|ight sou|
|00001bf0| 72 63 65 0d 0a 69 73 20 | 72 65 6c 61 74 69 76 65 |rce..is |relative|
|00001c00| 6c 79 20 73 69 6d 70 6c | 65 20 69 66 20 61 6c 6c |ly simpl|e if all|
|00001c10| 20 74 68 65 20 6f 62 6a | 65 63 74 73 20 69 6e 20 | the obj|ects in |
|00001c20| 61 20 73 63 65 6e 65 20 | 61 72 65 20 6f 70 61 71 |a scene |are opaq|
|00001c30| 75 65 2e 20 20 49 6e 0d | 0a 74 68 69 73 20 63 61 |ue. In.|.this ca|
|00001c40| 73 65 2c 20 6f 6e 65 20 | 73 69 6d 70 6c 79 20 74 |se, one |simply t|
|00001c50| 72 61 63 65 73 20 61 20 | 72 61 79 20 66 72 6f 6d |races a |ray from|
|00001c60| 20 74 68 65 20 70 6f 69 | 6e 74 20 74 6f 20 74 68 | the poi|nt to th|
|00001c70| 65 20 6c 69 67 68 74 20 | 73 6f 75 72 63 65 2e 0d |e light |source..|
|00001c80| 0a 49 66 20 74 68 65 20 | 72 61 79 20 68 69 74 73 |.If the |ray hits|
|00001c90| 20 61 6e 20 6f 62 6a 65 | 63 74 20 62 65 66 6f 72 | an obje|ct befor|
|00001ca0| 65 20 69 74 20 72 65 61 | 63 68 65 73 20 74 68 65 |e it rea|ches the|
|00001cb0| 20 6c 69 67 68 74 20 73 | 6f 75 72 63 65 2c 20 74 | light s|ource, t|
|00001cc0| 68 65 6e 0d 0a 74 68 65 | 20 70 6f 69 6e 74 20 69 |hen..the| point i|
|00001cd0| 73 20 69 6e 20 73 68 61 | 64 6f 77 2e 0d 0a 0d 0a |s in sha|dow.....|
|00001ce0| 53 68 61 64 6f 77 20 64 | 65 74 65 72 6d 69 6e 61 |Shadow d|etermina|
|00001cf0| 74 69 6f 6e 0d 0a 62 65 | 63 6f 6d 65 73 20 6d 6f |tion..be|comes mo|
|00001d00| 72 65 20 63 6f 6d 70 6c | 69 63 61 74 65 64 20 69 |re compl|icated i|
|00001d10| 66 20 74 68 65 72 65 20 | 61 72 65 20 6f 6e 65 20 |f there |are one |
|00001d20| 6f 72 20 6d 6f 72 65 20 | 6f 62 6a 65 63 74 73 20 |or more |objects |
|00001d30| 77 69 74 68 0d 0a 6e 6f | 6e 2d 7a 65 72 6f 20 74 |with..no|n-zero t|
|00001d40| 72 61 6e 73 70 61 72 65 | 6e 63 79 20 62 65 74 77 |ranspare|ncy betw|
|00001d50| 65 65 6e 20 74 68 65 20 | 70 6f 69 6e 74 20 61 6e |een the |point an|
|00001d60| 64 20 74 68 65 20 6c 69 | 67 68 74 20 73 6f 75 72 |d the li|ght sour|
|00001d70| 63 65 2e 0d 0a 54 72 61 | 6e 73 70 61 72 65 6e 74 |ce...Tra|nsparent|
|00001d80| 20 6f 62 6a 65 63 74 73 | 20 6d 61 79 20 6e 6f 74 | objects| may not|
|00001d90| 20 63 6f 6d 70 6c 65 74 | 65 6c 79 20 62 6c 6f 63 | complet|ely bloc|
|00001da0| 6b 20 74 68 65 20 6c 69 | 67 68 74 20 66 72 6f 6d |k the li|ght from|
|00001db0| 20 61 20 73 6f 75 72 63 | 65 2c 0d 0a 62 75 74 20 | a sourc|e,..but |
|00001dc0| 6d 65 72 65 6c 79 20 61 | 74 74 65 6e 75 61 74 65 |merely a|ttenuate|
|00001dd0| 20 69 74 2e 20 49 6e 20 | 73 75 63 68 20 63 61 73 | it. In |such cas|
|00001de0| 65 73 2c 20 69 74 20 69 | 73 20 6e 65 63 65 73 73 |es, it i|s necess|
|00001df0| 61 72 79 20 74 6f 20 63 | 6f 6d 70 75 74 65 20 74 |ary to c|ompute t|
|00001e00| 68 65 0d 0a 61 6d 6f 75 | 6e 74 20 6f 66 20 61 74 |he..amou|nt of at|
|00001e10| 74 65 6e 75 61 74 69 6f | 6e 20 61 74 20 65 61 63 |tenuatio|n at eac|
|00001e20| 68 20 69 6e 74 65 72 73 | 65 63 74 69 6f 6e 20 61 |h inters|ection a|
|00001e30| 6e 64 20 74 6f 20 63 6f | 6e 74 69 6e 75 65 0d 0a |nd to co|ntinue..|
|00001e40| 74 68 65 20 73 68 61 64 | 6f 77 20 72 61 79 20 75 |the shad|ow ray u|
|00001e50| 6e 74 69 6c 20 69 74 20 | 65 69 74 68 65 72 20 72 |ntil it |either r|
|00001e60| 65 61 63 68 65 73 20 74 | 68 65 20 6c 69 67 68 74 |eaches t|he light|
|00001e70| 20 73 6f 75 72 63 65 20 | 6f 72 20 75 6e 74 69 6c | source |or until|
|00001e80| 0d 0a 74 68 65 20 6c 69 | 67 68 74 20 69 73 20 63 |..the li|ght is c|
|00001e90| 6f 6d 70 6c 65 74 65 6c | 79 20 61 74 74 65 6e 75 |ompletel|y attenu|
|00001ea0| 61 74 65 64 2e 0d 0a 0d | 0a 42 79 20 64 65 66 61 |ated....|.By defa|
|00001eb0| 75 6c 74 2c 20 7b 5c 72 | 61 79 73 68 61 64 65 7d |ult, {\r|ayshade}|
|00001ec0| 20 63 6f 6d 70 75 74 65 | 73 20 73 68 61 64 6f 77 | compute|s shadow|
|00001ed0| 20 61 74 74 65 6e 75 61 | 74 69 6f 6e 20 62 79 20 | attenua|tion by |
|00001ee0| 61 73 73 75 6d 69 6e 67 | 0d 0a 74 68 61 74 20 74 |assuming|..that t|
|00001ef0| 68 65 20 69 6e 64 65 78 | 20 6f 66 20 72 65 66 72 |he index| of refr|
|00001f00| 61 63 74 69 6f 6e 20 6f | 66 20 74 68 65 20 74 72 |action o|f the tr|
|00001f10| 61 6e 73 70 61 72 65 6e | 74 20 6f 62 6a 65 63 74 |ansparen|t object|
|00001f20| 20 69 73 20 74 68 65 0d | 0a 73 61 6d 65 20 61 73 | is the.|.same as|
|00001f30| 20 74 68 61 74 20 6f 66 | 20 74 68 65 20 6d 65 64 | that of| the med|
|00001f40| 69 75 6d 20 74 68 72 6f | 75 67 68 20 77 68 69 63 |ium thro|ugh whic|
|00001f50| 68 20 74 68 65 20 72 61 | 79 20 69 73 20 74 72 61 |h the ra|y is tra|
|00001f60| 76 65 6c 69 6e 67 2e 0d | 0a 54 6f 20 64 69 73 61 |veling..|.To disa|
|00001f70| 62 6c 65 0d 0a 70 61 72 | 74 69 61 6c 20 73 68 61 |ble..par|tial sha|
|00001f80| 64 6f 77 69 6e 67 20 64 | 75 65 20 74 6f 20 74 72 |dowing d|ue to tr|
|00001f90| 61 6e 73 70 61 72 65 6e | 74 20 6f 62 6a 65 63 74 |ansparen|t object|
|00001fa0| 73 2c 20 74 68 65 20 7b | 5c 74 74 20 73 68 61 64 |s, the {|\tt shad|
|00001fb0| 6f 77 74 72 61 6e 73 70 | 7d 0d 0a 6b 65 79 77 6f |owtransp|}..keywo|
|00001fc0| 72 64 20 73 68 6f 75 6c | 64 20 62 65 20 67 69 76 |rd shoul|d be giv|
|00001fd0| 65 6e 20 73 6f 6d 65 77 | 68 65 72 65 20 69 6e 20 |en somew|here in |
|00001fe0| 74 68 65 20 69 6e 70 75 | 74 20 66 69 6c 65 2e 0d |the inpu|t file..|
|00001ff0| 0a 0d 0a 5c 62 65 67 69 | 6e 7b 64 65 66 6b 65 79 |...\begi|n{defkey|
|00002000| 7d 7b 73 68 61 64 6f 77 | 74 72 61 6e 73 70 7d 7b |}{shadow|transp}{|
|00002010| 7d 0d 0a 09 54 68 65 20 | 69 6e 74 65 6e 73 69 74 |}...The |intensit|
|00002020| 79 20 6f 66 20 6c 69 67 | 68 74 20 73 74 72 69 6b |y of lig|ht strik|
|00002030| 69 6e 67 20 61 20 70 6f | 69 6e 74 20 69 73 20 7b |ing a po|int is {|
|00002040| 5c 65 6d 20 6e 6f 74 7d | 20 61 66 66 65 63 74 65 |\em not}| affecte|
|00002050| 64 20 62 79 0d 0a 09 69 | 6e 74 65 72 76 65 6e 69 |d by...i|nterveni|
|00002060| 6e 67 20 74 72 61 6e 73 | 70 61 72 65 6e 74 20 6f |ng trans|parent o|
|00002070| 62 6a 65 63 74 73 2e 0d | 0a 5c 65 6e 64 7b 64 65 |bjects..|.\end{de|
|00002080| 66 6b 65 79 7d 0d 0a 49 | 66 20 79 6f 75 20 65 6e |fkey}..I|f you en|
|00002090| 63 6c 6f 73 65 20 61 6e | 20 6f 62 6a 65 63 74 20 |close an| object |
|000020a0| 62 65 68 69 6e 64 20 61 | 20 74 72 61 6e 73 70 61 |behind a| transpa|
|000020b0| 72 65 6e 74 20 73 75 72 | 66 61 63 65 2c 20 61 6e |rent sur|face, an|
|000020c0| 64 20 79 6f 75 20 77 69 | 73 68 0d 0a 74 68 65 20 |d you wi|sh..the |
|000020d0| 69 6e 6e 65 72 20 6f 62 | 6a 65 63 74 20 74 6f 20 |inner ob|ject to |
|000020e0| 62 65 20 69 6c 6c 75 6d | 69 6e 61 74 65 64 2c 20 |be illum|inated, |
|000020f0| 79 6f 75 20 6d 75 73 74 | 20 6e 6f 74 20 75 73 65 |you must| not use|
|00002100| 20 74 68 65 20 7b 5c 74 | 74 20 73 68 61 64 6f 77 | the {\t|t shadow|
|00002110| 74 72 61 6e 73 70 7d 0d | 0a 6b 65 79 77 6f 72 64 |transp}.|.keyword|
|00002120| 20 6f 72 20 74 68 65 20 | 7b 5c 74 74 20 2d 6f 7d | or the |{\tt -o}|
|00002130| 20 6f 70 74 69 6f 6e 2e | 0d 0a | option.|.. |
+--------+-------------------------+-------------------------+--------+--------+