Lecture 12 Quiz

### Question 1

Notice the difference in the shadows between the two photographs of Prof. Kayvon's hand shown below: In the image at left, the hand casts a "hard shadow" edge. In the image at right, the shadow is much "fuzzier" (This effect is often called a "soft shadow" in computer graphics.)

• Describe the reason why the shadow in the left image has hard edges, and the shadow in the right image has much fuzzier boundaries. You're answer should not only describe the characteristics of the light sources that created these shadows, but also describe how these properties result in the effects shown in the picture.
• You'll notice that in the image at left, the shadowed region is not completely black. Give one potential reason why the wall is not completely dark even in regions where it is completely in the shadow of the hand.

Solution:

The shadow at left has hard edges because illumination is coming from a light source that is nearly a point source (in this case, it was the LED light on my iPhone). The entire light sources is either visible to most points on the wall receiving the shadow, or occluded by my hand. The shadow at right is soft because illuminations is coming from a much large area light source (in this case, a living room lamp, where light is emitted from all points on the lamp shade.)

The shadowed region in the photo is not completely black because the wall is illuminated by indirect illumination that arrives at the wall after reflection off some other surface in the room.

### Question 2

Slide 41 leaves the derivation of uniform direction sampling of the hemisphere as an exercise to the students. Since you're a student, do the exercise! ;-)

Solution:

The gist of the solution is the following:

• We know that $p(\phi)$ is a constant, since any azimuthal angle is equally likely. Given a random number $\xi_2$ we can easily pick any $\phi = 2\pi\xi_2$.
• We also know that $dA \sim \sin \theta \mathrm{d}\theta \mathrm{d}\phi$, and that a uniform direction sampling is uniform area sampling of the hemisphere. So: $p(\phi, \theta) = C \sin \theta$
• Integrating $p(\phi, \theta)$ over the hemisphere gives $C=\frac{1}{2\pi}$.
• So $p(\phi,\theta) = \frac{1}{2\pi} \sin \theta = p(\theta)p(\phi)$ ($\phi$ and $\theta$ are independent variables)
• So $p(\theta) = \sin \theta$
• Integrating $p(\theta)$ yields $P(\theta) = -\cos \theta$
• Inverting the CDF yields: $\theta = \cos^{-1}\xi_1$ Done!
{"ft_lang_label":"__label__en","ft_lang_prob":0.9252672,"math_prob":0.994999,"size":2425,"snap":"2020-10-2020-16","text_gpt3_token_len":593,"char_repetition_ratio":0.133829,"word_repetition_ratio":0.0049261083,"special_character_ratio":0.24948454,"punctuation_ratio":0.08714597,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9990425,"pos_list":[0,1,2],"im_url_duplicate_count":[null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-04-01T08:30:41Z\",\"WARC-Record-ID\":\"<urn:uuid:e742e33a-89a7-4c0e-aff5-2c92763d90d6>\",\"Content-Length\":\"8757\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:71e418ad-ebaf-47e8-87e9-3c8f4f521811>\",\"WARC-Concurrent-To\":\"<urn:uuid:954db6bb-09ec-47f3-9b89-8b4e38824e19>\",\"WARC-IP-Address\":\"128.2.220.105\",\"WARC-Target-URI\":\"http://15462.courses.cs.cmu.edu/fall2015/article/16\",\"WARC-Payload-Digest\":\"sha1:FSQKBQR74NWY63MOW5HOBXMQR7DSHAKN\",\"WARC-Block-Digest\":\"sha1:UBSEM5FRKVIO7LR26HPL6SIKYCXR6CVF\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-16/CC-MAIN-2020-16_segments_1585370505550.17_warc_CC-MAIN-20200401065031-20200401095031-00527.warc.gz\"}"}