i
i
i
i
i
i
i
i
14.4. Choosing Random Points 337
This gives rise to the cumulative distribution function:
P (m)=
1
4
+
m+1
4
1+m
2
if m<0,
3
4
+
m1
4
1+m
2
if m 0.
These can be inverted by solving two quadratic equations. Given an m generated
using ξ
1
,wethenhave
b =
(1 m)ξ
2
if ξ<
1
2
.
m +(1+m)ξ
2
otherwise.
This is not a better way than using normal coordinates; it is just an alternative
way.
Frequently Asked Questions
This chapter discussed probability but not statistics. What is the
distinction?
Probability is the study of how likely an event is. Statistics infers characteristics
of large, but nite, populations of random variables. In that sense, statistics could
be viewed as a specic type of applied probability.
Is Metropolis sampling the same as the Metropolis Light Transport
Algorithm?
No. The Metropolis Light Transport (Veach & Guibas, 1997) algorithm uses
Metropolis sampling as part of its procedure, but it is specically for rendering,
and it has other steps as well.
Notes
The classic reference for geometric probability is Geometric P robability
(Solomon, 1978). Another method for picking random edges in a square is given
in Random–Edge Discrepancy of Supersampling Patterns (Dobkin & Mitchell,
1993). More information on quasi-Monte Carlo methods for graphics can be
found in Efficient Multidimensional Sampling (Kollig & Keller, 2002). Three
classic and very readable books on Monte Carlo methods are Monte Carlo Meth-
ods (Hammersley & Handscomb, 1964), Monte Carlo Methods, Basics (Kalos &
Whitlock, 1986), and The Monte Carlo Method (Sobel et al., 1975).
i
i
i
i
i
i
i
i
338 14. Sampling
Exercises
1. What is the average value of the function xyz in the unit cube (x, y, z)
[0, 1]
3
?
2. What is the average value of r on the unit-radius disk: (r, φ) [0, 1] ×
[0, 2π)?
3. Show that the uniform mapping of canonical random points (ξ
1
2
) to the
barycentric coordinates of any triangle is: β =1
1 ξ
1
,andγ =
(1 u)ξ
2
.
4. What is the average length of a line inside the unit square? Verify your
answer by generating ten million random lines in the unit square and aver-
aging their lengths.
5. What is the average length of a line inside the unit cube? Verify your answer
by generating ten million random lines in the unit cube and averaging their
lengths.
6. Show from the denition of variance that V (x)=E(x
2
) [E(x)]
2
.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.36.32