raytracing.github.io icon indicating copy to clipboard operation
raytracing.github.io copied to clipboard

Book 3.6.1: Is the 'Monte Carlo basics' correct?

Open LiuZengqiang opened this issue 1 year ago • 2 comments

In book3-6.1Returning to the Cornell Box: Remember Monte Carlo basics: ∫f(x)≈∑f(r)/p(r) ..., Shouldn't the correct formula be ∫f(x)≈(1/N)*∑f(r)/p(r)?

LiuZengqiang avatar Sep 14 '23 09:09 LiuZengqiang

Maybe the correct formula is ∫f(x)dx≈(1/N)*∑f(r)/p(r)?

LiuZengqiang avatar Sep 14 '23 11:09 LiuZengqiang

This is definitely a typo. From the wikipedia artice on Monte Carlo integration the correct formula should be:

$$ \int f(x) dx \approx \frac 1 N \sum_{i=0}^{N-1} \frac {f(x_i)} {p(x_i)} $$

Related to #1534

dimitry-ishenko avatar Apr 25 '24 16:04 dimitry-ishenko