SARA DON: Here, I present a spherical distribution problem and how I went about finding an approximate solution in Mathematica. If you observe light that passes through a translucent spherical object or radiation that is transmitted through a spherical attenuator, the intensity is not evenly distributed the intensity of transmitted radiation is described by this exponential function where the intensity distribution is governed by the material thickness x and density lambda.
Let's plot this function. You can see that as the material thickness x increases, the intensity of the transmitted radiation decreases exponentially. Let's make a function to model the transmitted radiation intensity in 3D.
In this module, I defined i, i0, and lambda to be local variables. c is the function for a hemisphere. We want to look at the effect on a sphere, but it's easier to work with a hemisphere. So I multiplied the hemisphere by 2. And the function returns intensity as a function of x and y positioned where the xy plane is the projection of the sphere.
Let's have a look at the intensity distribution in 3D. This plot shows us that the intensity at the edges of the projection is greater than the intensity in the middle of the projection. It's a bit hard to visualize, so here's another way to look at it.
You can see that the intensity is highest around the edges and lowest in the center of the projection. I did this by making the arrow length a function of the intensity. Now let's see what happens when we replace lambda, which was a constant, with a function.
This means that we are changing the materials density as a function of the sphere's radius. I'm going to alter the density function I made before so that we can specify different functions for lambda. Here, I'll show you three functions I tried out earlier for lambda to try and make the intensity constant.
There's a cosine function, a nested sine function, as suggested by Professor Carter, and a spherical Bessel function. Let's check that our function works on the lambda as a constant case we tried before. OK, good, it works.
Now let's look at our new density functions. The first one is the cosine function. You can see that the shape is not quite a hemisphere and now looks a bit closer to a cylinder.
Next is the sine function. It looks a lot like the cosine function, more like a cylinder than a hemisphere. And last is the Bessel function. It also looks a lot like the sine and cosine functions.
Since the sine, cosine, and Bessel functions are very similar, I'll plot them a different Way So you can see them more clearly. Here, the blue line is the Bessel function. The red line is the cosine function, and the yellow line is the nested sine function.
OK, since it's hard to see from the 3D plots which of the density functions is closest to giving me constant intensity, Professor Carter suggested that I make a numerical error analysis. If the intensity were constant, we would get a cylinder in a 3D plot. So I found the height of that theoretical cylinder by finding the minima for each of the intensity functions.
Then I subtracted the volume of the intensity from the volume of the theoretical cylinder, and the square of this difference is the error. Here's a list of the errors. But it will be easier to compare if I make a bar chart.
OK, now you can clearly see which function is the winner. When the density is constant, the intensity is the furthest from being constant. The sine and cosine functions are much closer to making the intensity constant.
But the spherical Bessel function definitely makes the most even intensity distribution. There is no perfect solution because at the limit of the edge of the sphere, the material thickness goes to zero. And therefore, the density function must go to infinity. But it looks like the Bessel function makes a good approximation.