I saw this statement the other day in reference to the surface area of a sphere in a 3b1b video, and I have way too much time on my hands so I tried to create a MATLAB program that does a Monte Carlo simulation of a square pyramid (base length = 1, height = 1) and the shadow it would cast if it were randomly rotated.
Just from the math, the surface area $= \sqrt{5} + 1 \approx 3.236$, so $\frac{1}{4}$ of that $\approx 0.809$.
However, when I run my program the average area of the shadow always comes out to $\approx 0.77$. I did run it a number of times with large sample sizes, so I don't think it's just the case that I have too few samples, and it always comes out to 0.76 or 0.77 (almost always (0.77)
I'm thinking that I'm just using the wrong definition of a shadow. I'm imagining a faraway light shining straight down on the pyramid (so parallel rays), so the shadow is just the cross-sectional area of the rotated pyramid in the x-y plane.
Here's the program run twice, where I then find the area of the light blue shaded region. The green shape is three dimensional, but the camera is directly above it, looking directly down and the blue figure is that 2-d cross-section: (Sorry I don't know how to make the pictures smaller)
When I have the computer do this millions of times and then average the area of the light blue shapes, and it comes out to $\approx 0.77$
Am I thinking about the idea of "shadow" wrong? Or why is it off?
Any ideas are greatly appreciated!




Project it on a plane of a random direction $u$ and get a two dimensional object, calculate its area, and then average over all unit vectors $u$.
To get a random unit vector $u$, you consider $3$ normal independent variables $X_1$, $X_2$, $X_3$ with distribution $N(0,1)$, $X = (X_1, X_2, X_3)$, and $u = \frac{X}{\|X\|}$.