Graphics Reference
In-Depth Information
In this case, assigning half the probability to each successive path length makes
some sense. In general, picking the right sampling distribution is at the heart of
making such Monte Carlo approaches work well.
31.5.1.3 Solving 50 x 2.1
=
13 Stochastically
Applying these methods to our particular equation, we know that
x = 13
50
1
2.1
,
(31.19)
and that in general we can transform the right-hand side of the equation using the
binomial theorem
k
t k .
( 1 + t ) α =
(31.20)
k = 0
Doing so, with t = 1 50
37
1
1 =
50 and
α
=
2.1 , we get
x = 13
50
1
2.1
(31.21)
= 0
+ 1
1
+ 2
2
37
50
37
50
+
...
(31.22)
1
2
= 1 + 1
37
50
+ α
(
α−
1 )
37
50
+
...
.
(31.23)
2 !
Now, to estimate a solution, we pick a positive integer j with probability 2 j ,
and evaluate the j th term. As we wrote this chapter, we flipped coins and counted
the number of flips until heads, generating the sequence 3, 3, 1; our three estimates
of x are thus the third, third, and first terms of the series, multiplied by 8, 8, and 2,
respectively:
2
x 1 = 8 α
(
α−
1 )
37
50
300
≈−
0.5464,
(31.24)
2 !
250
x 2 = x 1 =
0.5464
...
(31.25)
200
x 3 = 2.
(31.26)
150
100
Recall that the correct solution to the problem is 0.5265. The average of our
three samples is x = .3024, which admittedly is not a very good estimate of the
solution. When we used 10,000 terms, the estimate was 0.5217, which is consid-
erably closer (see Figure 31.4).
50
0
−2
−1
0
1
2
Figure
31.4:
A
histogram
of
You may be concerned that we've assumed we can write a power series for
x , but that when we get to the rendering equation, such a rewrite may not be so
easy. Fortunately, in the case of the rendering equation, the rewrite as an infinite
series is actually quite easy, although estimating the sum of the resultant series
still involves the same randomized approaches.
500
estimates
of
the
root
of
50 x 2.1
= 13 ;
their
average
is
quite near 0.5625 .
31.6 Method 4: Bisection
Our final approach to solving the equation is to find a value of x for which 50 x 2.1 is
less than 13 (such as x = 0) and one for which it's greater than 13 (such as x = 1).
 
 
Search WWH ::




Custom Search