The way you figure that out is to calculate the surface area of a sphere
that sits inside your Y sized shell that has the diameter of the shell I.D.
minus the star diameter, then divide that area by the area of the star that
intersects it, which is the area of a circle with the diameter of the
X-sized star. So the formula would be:
r1 = inside radius of shell casing
r2 = radius of star
A1 = area of inner sphere = 4*PI*(r1 - r2)^2
A2 = area of star cross section = PI*r2^2
Stars that fit in shell = A1/A2 = 4( r1 - r2 )^2 / r2^2
This formula actually overcalculates the number of stars by a little bit
because it does not account for the gaps between the stars. The real space
consumed by a single star in a matrix of stars is a hexagon shape. So
substituting the area of a hexagon for A2, gives you:
A2 = 6*r2^2 / SQRT( 3 )
Actual stars that fit in shell = 4*SQRT(3)*PI(r1 - r2)^2 / 6*r2^2
If you take the example case of how many 1" stars it takes to fill a 9" I.D.
shell casing, the first formula says 256, while the more accurate one says
232.
Hmmm, this looks like another useful auto-calculator I could put on
passfire.com :)
-Kyle