RayTracing / raytracing.github.io

Main Web Site (Online Books)
https://raytracing.github.io/
Creative Commons Zero v1.0 Universal
8.72k stars 856 forks source link

Book 3.3.7: Mistake in the ICD calculation? #1594

Closed dimitriskikidis closed 2 months ago

dimitriskikidis commented 2 months ago

At the end of the section, since the PDF is

$$ p(r)=\begin{cases} 0, & r < 0\ \frac{3}{8} r^2 & 0 \leq r \leq 2\ 0 & 2 < r \end{cases} $$

and the corresponding CDF is

$$P(r) = \frac{r^3}{8}$$

then we have

$$y=\frac{r^3}{8}$$

and solving for $r$ in terms of $y$ we get

$$y=\frac{r^3}{8}$$

$$r^3=8y$$

$$r=(8y)^\frac{1}{3}=2y^\frac{1}{3}$$

so the correct ICD should be

$$P^{-1}(x) = ICD(d) = 2d^\frac{1}{3}$$

instead of

$$P^{-1}(x) = ICD(d) = 8d^\frac{1}{3}$$

Please delete this issue if I am mistaken somewhere. Thank you for your great work!

hollasch commented 2 months ago

Duplicate of #1310.