Does a Lampshade Cast a Hyperbolic Shadow?
Plotting a Lamp
Have you ever looked at the shadow that a lampshade casts on a wall? I looked at this lamp in my living room one night and asked to myself, "I wonder what kind of curve is being traced out by the edge of those shadows?"
It certainly looked like these curves were a pair of hyperbolas, so I thought I'd spend a few minutes trying to verify my suspicions. The first thing you need to do is start with a lampshade that is a shaved off cone. In cylindrical coordinates, we can define the following equation in Mathematica:
shade[s_,t_] = {(2-s/2) Cos[t], (2-s/2) Sin[t], s-1};
For this example, we can let $0 \leq t < 2\pi$ and $0 \leq s \leq 2$. We also need a wall for the shadow to be cast upon:
wall[u_,v_] = {u, 3, v};
Every lamp needs a lightbulb, so let's represent one as a sphere of radius $\frac{1}{2}$ centered at the origin:
sphere[s_,t_] = 0.5{Cos[t] Sin[s], Sin[t] Sin[s], Cos[s]};
Finally, let's throw in a cylindrical base on the lamp with $0 \leq t < 2\pi$ and $-4 \leq s \leq -0.5$:
base[s_,t_] = {0.25 Cos[t], 0.25 Sin[t], s};
Here it is all plotted out, minus the shadow:
shadePlot = ParametricPlot3D[shade[s,t], {t,0,2Pi}, {s,0,2},
PlotStyle->Brown, Mesh->False];
wallPlot = ParametricPlot3D[wall[u,v], {u,-5,5}, {v,-5,6},
Mesh->False,
PlotStyle->{Lighter[Lighter[Green]],
Lighting->"Neutral", Specularity[0]}];
bulbPlot = ParametricPlot3D[sphere[s,t], {t,0,2Pi}, {s,0,Pi},
PlotStyle->{Yellow}, Mesh->False];
basePlot = ParametricPlot3D[
{0.25 Cos[t], 0.25 Sin[t], s}, {s,-4,-0.5}, {t,0,2Pi},
PlotStyle->Gray, Mesh->False];
Show[shadePlot, wallPlot, bulbPlot, basePlot,
PlotRange->{{-5,5},{-3,3},{-5,6}},
Background->White, Boxed->True, Axes->True]
Adding in the Shadows
To figure out the shadow cast on the wall, we need to look at where a light ray from the light bulb hits the top edge of the lampshade. After this, we need to follow this light ray until it hits the wall. This will be the edge of the top shadow.
First, we find the equation of the top of the lampshade:
topOfShade[t_] = {Cos[t], Sin[t], 1};
Next, we find the equation of a ray of light starting from the lightbulb at $(0,0,0)$ and hitting the top of the lampshade at $(\cos t, \sin t, 1)$. This is just an equation for a line starting at the origin when $s = 0$ and ending at $(\cos t, \sin t, 1)$ when $s = 1$:
topRay[s_,t_] = {0,0,0} + s(topOfShade[t] - {0,0,0})
Running this code shows that topRay[s,t] = {s Cos[t], s Sin[t], s}. Next, we use Mathematica to find where this ray of light hits the wall — where the $y$-coordinates match:
Solve[topRay[s,t][[2]] == wall[u,v][[2]], s]
This gives us {{s -> 3 Csc[t]}}. The shadow on the wall above the lampshade is:
topShadow[t_] = topRay[3 Csc[t], t]
(* Output: {3 Cot[t], 3, 3 Csc[t]} *)
Repeating for the bottom of the lampshade:
bottomOfShade[t_] = {2 Cos[t], 2 Sin[t], -1};
bottomRay[s_,t_] = {0,0,0} + s(bottomOfShade[t] - {0,0,0});
Solve[bottomRay[s,t][[2]] == wall[u,v][[2]], s];
bottomShadow[t_] = bottomRay[3 Csc[t]/2, t]
(* Output: {3 Cot[t], 3, -(3 Csc[t])/2} *)
At last, here's the picture with the shadows plotted on the wall:
Showing that the Shadows are Hyperbolas
Now, you might ask what kind of curves topShadow[t] = {3 Cot[t], 3, 3 Csc[t]} and bottomShadow[t] = {3 Cot[t], 3, -(3 Csc[t])/2} are. You can show pretty easily that these are hyperbolas.
In general, say that you have $\{x(t), y(t)\} = \{a \cot t,\; b \csc t\}$. When you compute $\left(\frac{y}{b}\right)^2 - \left(\frac{x}{a}\right)^2$ using TrigReduce in Mathematica, you get $1$. So our shadows satisfy:
That is, we have hyperbolic shadows.
Finally, here's a picture of light rays escaping past the lampshade and creating the hyperbolic shadow curves:
Mathematica Notebooks
This notebook was originally shared on the Wolfram Community. You can download the Mathematica notebook:
← Back to Blog