# Total amount of diffusely reflected light off of a sphere?

I have a numerical simulation that uses ray tracing to calculate the total amount of light picked up by a sensor, after diffusely reflecting off of an object. To validate this simulation, I'd like to compare it with an analytical solution. I figured the easiest object to compare it with would be a sphere.

I attempted to calculate the total amount of light reflected by a sphere and visible to an observer (prior to accounting for the inverse square law). Through some work outlined below (if you'd need to see it), I arrived at the following conclusion:

$$I = I_0 \ k_d \ r^2 \frac{\pi}{2}\left(\cos{\alpha} + 1\right)$$

Where $$r$$ is the radius of the sphere, $$k_d$$ is the portion of reflection light, $$\alpha$$ is the angle between the light source vector and the observers vector, and $$I_0$$ is the intensity of an incoming ray of light.

I believe I've done something incorrectly though, as if I take the total amount of incident light over the area, that would be equivalent to $$I_0$$ times the cross sectional area, which comes out to be $$I_{in} = I_0(\pi r^2)$$. Taking the ratio of reflected light to incoming light then becomes:

$$\frac{I_{refl}}{I_{in}} = \left(\frac{k_d}{2}\right)\left[\cos\alpha + 1\right]$$

In this result, if $$\alpha = 0$$, the reflected light would appear to be just $$k_d$$, or the proportion of reflected light. If $$\alpha = \pi$$, it drops to zero. At first I thought that made perfect physical sense, but after thinking about it for awhile, I came to believe that that can't possibly be true. If I were dealing with a flat plate, I would understand the result perfectly. But because its a sphere... this would seem to imply that the total amount of light reflected by a sphere in a lambertian reflection would be just equal to $$k_d$$ times the incoming light. That doesn't seem possible, but at the same time it feels correct.

Am I misunderstanding my result? Is this correct, or have I messed up somewhere in my integration? This result feels correct, but I cannot shake from my mind that I did something incorrectly and this is not physically realistic. Any help whatsoever would be greatly appreciated!

## How I got my result.

The assumptions I'm making here is that both the light source and the observer are distant with respect to the radius of the sphere, however they need not be in the same direction. (They could in theory be on opposite sides of the sphere for example, in which case you'd expect the result to be 0).

The way I approached setting this up was to first setup bounds for my spherical integral. I used the physics definition for spherical coordinates, with azimuthal angle being $$\phi$$ and polar angle $$\theta$$.

I simplified the problem by aligning the x-axis of the sphere up with the light source, and had the observer's polar location be at some azimuthal angle $$\alpha$$. Therefore, my bounds of spherical integration came out to be:

$$-\frac{\pi}{2} + \alpha < \phi < \frac{\pi}{2}$$

and

$$0 < \theta < \pi$$

For the amount of light reflected, I'm just using the lambertian reflection model, so the the angle at which the light is observed from is always constant. This model assumes that the intensity of the reflected light is equal to $$k_d \cos{(\psi)}$$ where $$\psi$$ is the incidence angle (angle between incident light and the surface normal), and $$k_d$$ is just a constant for a given material.

I then tried to represent $$\psi$$ in terms of $$\theta$$ and $$\phi$$, by taking the dot product of the viewing vector with the radial unit vector, which is defined as:

$$\hat{r} = \left<\sin{(\theta)}\cos{(\phi)}, \sin{(\theta)}\sin{(\phi)}, \cos{(\theta)}\right>$$

Because I aligned the light source with the x-axis, and because I am assuming it is distant, then I say that the light source is located at $$\vec{l} = \left$$. So the angle $$\psi$$ is then:

$$\psi = \cos^{-1}{(\hat{r} \cdot \hat{v})} = \cos^{-1}{(\sin{\theta}\cos{\phi})}$$

This simplifies nicely, as the lambertian model is again $$\cos{\psi}$$, and so it can just be replaced with $$\sin{\theta}\cos{\phi}$$.

So I now know my integral bounds, and the integrand. I want to integrate over the area of the region visible to both, so I'd be integrating with respect to $$dA$$. Using the definition of solid angles, $$dA = r^2 d\Omega$$, where $$d\Omega = \sin{\theta} \ d\theta \ d\phi$$. So plugging everything in together now gives me:

$$\int_{-\frac{\pi}{2} + \alpha}^{\frac{\pi}{2}} \int_{0}^{\pi} k_d \cos{\phi}\sin^{2}{\theta} r^2 \ d\theta d\phi$$

So the total amount of light reflected, if there was an incident light is given by $$I_0$$, should be:

$$I = I_0 \ k_d \ r^2 \int_{-\frac{\pi}{2} + \alpha}^{\frac{\pi}{2}} \int_{0}^{\pi} \cos{\phi}\sin^{2}{\theta}\ d\theta d\phi$$

Evaluating this integral gives me:

$$I = I_0 \ k_d \ r^2 \frac{\pi}{2}\left(\cos{\alpha} + 1\right)$$