Average Energy/Light in a box

45 Views Asked by At

Imagine there exists a region of completely empty space bounded by a rectangular prism, R, with length, l, width, w, and height, h. There is a star(a simple light/particle emitting object) in the center of one of the faces of the bounding rectangular prism. there is a gradient of light fall off which starts with the lights original brightness and slowly gradually decreases towards zero the farther away you get from the emitter, even outside of the bounded rectangular prism you could imagine it reaches zero at infinity. This light fall off propagates spherically from the emitter . What is the average energy/light of the entire bounding rectangular prism. Another way to visualize this is a box with density which decreases spherically from a point on the side of the box and you must evaluate the average density of the box.

The function of light fall off should look something like

$$L(x) = \frac{2E}{1+e^{\frac{1}{c}x}}$$

                  or

$$L(x) = \frac{1}{\frac{1}{c}x+E}$$

where x is the distance from the emitter, E is the starting energy/density, and c is some constant which controls the rate of fall off. while the exact function does not matter to me I have provided two examples for you to use whichever you think will be easier to work with. Feel free to also use any functions you like which follows the same boundary conditions of starting at E at $x=0$ and ending tending towards $0$ as $x$ goes to $\infty$.

I have attempted this by trying to take rectangular cross sections of a perfect sphere/hemisphere to no avail, I also have tried to create functions which capture the x,y, and z inputs for rotation to any given ray/vector from the emitter but I am unaware and could not find how to map a function which draws out the rectangular prism in 3d space, although I figure you could do it with some form of multivariable Fourier series, but i do not feel that is the easiest method to go about generating a approximation.

if it is much simpler feel free to generalize to a perfect cube rather then a rectangle but im not sure it would help much either way. Feel free to choose the center of any face on the rectangular prism to place the emitter.