Expectation ray-casting

65 Views Asked by At

Suppose we have a volume filled with small surfaces. If we cast a ray from a given point, the probability that the ray will not hit a surface is given as

$P(ray\ does\ not\ hit) = exp(-\alpha d/\cos\theta)$

where $\alpha$ is some decay factor, $d/cos\theta$ is the path length of the ray within the volume.

How can we compute the expected value of casting a ray in directions $(\theta, \phi)$, where $0<\theta<\pi/2$ and $0<\phi<2\pi$?

1

There are 1 best solutions below

1
On BEST ANSWER

I'm implying some interpretive guesswork to your question as asked.

Let's work in cylindrical coordinates $(z, \rho, \phi)$, where $\rho^2 = x^2 + y^2$ and $\tan \phi = x/y$. The angle from the $z$-axis to any point we'll denote $\theta$, where $\tan \theta = \rho/z$. Rays (which we can describe by angles $\phi$ and $\theta$) fire from the origin to the infinite plane $z = d$ where $d > 0$. The probability that a ray hits is $\exp (-\alpha d\, \sec \theta)$; the spherical symmetry of the problem lets us ignore $\phi$. (I think you got this backwards in your question, we want the probability of a ray hitting to approach 0 at $d \to \infty$, not the probability of a ray not hitting.) Then the overall probability of a ray strike, noting the boundaries on $\theta$ that your question imposed, is simply $$\int_0^{\pi/2} \exp (-\alpha d \sec \theta)\, d\theta$$ which, unfortunately, I don't think has a closed form (for $\alpha d = 1$, the numerical value is about $0.3283$ per WolframAlpha).