### Playing detective with rolling shutter photos

A while back, my friend Britta sent me an interesting photo she took with her iPhone while on a trip in a turboprop plane. The photo looked similar to this one, with a strange view of the propellors due to the “rolling shutter” effect of the CMOS sensor in the iPhone camera.

This effect piqued my curiosity. Can we figure out the rate at which a propellor is spinning by analyzing this kind of photo? And can we figure out the real number of propellor blades in the photo? (You can scroll to the end for answers if you’re impatient!)

#### Learning more about the iPhone camera’s properties

To start my research, I found this example of rolling shutter effect in video, showing strings vibrating at known frequencies (musical notes):

The yellow arrow represents the width in pixels of the image, which I measured to be about 393 px (when full size). The red arrow represents the width in pixels of the “wavelength” of the wave, which is measured to be about 171 px (when full size). This length actually reflects a temporal wave more than it does a spatial one, as in the small circular opening of the guitar, the string practically vibrates up and down remaining horizontal. A low E string on a guitar is supposed to be about 82 Hz, but I measured it with Audacity to be closer to 81 Hz. Then since the wavelength (red) represents the number of pixels sweeped out by the rolling shutter in one period of the E string, we can compute the shutter sweep time (professionally called the readout time) of the front-facing camera in the iPhone 4.

$$(1/81\mbox{Hz}) /\frac{817-646}{934-541}\approx \boxed{28\mbox{ ms}.}$$

#### Describing the rolling shutter effect

Now we can explore what’s happening in the propellor image above. Let’s say the propellor is rotating (counterclockwise), and the shutter is rolling from left to right. We can look at what will happen on the top and bottom halves of the propellor separately. On the top side, the blades are moving toward the rolling shutter, so there will be a larger relative velocity between the two, and therefore more “collisions” between the shutter and the blades. This will result in a larger-than-normal blade count. On the other hand, the bottom of the propellor will be moving in the same direction as the rolling shutter, and thus the relative velocity is smaller. This results in fewer blades, and each blade (and the space between them) will be stretched out.

There is a subtlety here: the velocity of the blades is not uniform with respect to radius. This means that points toward the center of rotation have less velocity, and so the rolling shutter effect is less noticable there. In fact, on the lower side, there is a point at which the blade’s velocity matches the sweep rate. Something very special happens here, and we will examine this in detail later. Therefore we expect the propellor to look normal within some (possibly small) neighborhood of the axis, but at some point on the bottom a critical point is reached where the tangential velocity matches the sweep velocity. Below that point, the relative velocity becomes greater again, but in the opposite direction, so we can expect that text written on the blades would appear in reverse.

#### Coming up with a theoretical framework

To help illustrate this effect, let’s come up with a theoretical framework. Consider a unit disk, spinning about its center at angular velocity $$\omega$$. We may draw radial blades on this disk to give the appearance of propellors. We may now consider a vertical line that sweeps from left to right at a constant rate $$v$$. We will define $$s=\frac{v}{\omega}$$. This is a satisfactory approach, since for any propellor, we may use a distance unit equal to the radius of the propellor, at which point $$s$$ is defined unambiguously as a unitless parameter. In the following animations, I have animated what a 5-blade propellor would look like for various parameters of $$s$$. These animations are made by a mathematical function written with standard functions in Mathematica via a time-dependent DensityPlot (function from $$\mathbb{R}^2\times [0,2\pi)\rightarrow \mathbb{R}$$). There are easier ways to do this, but I wanted to come up with a single mathematical function that would capture all the magic of the rolling shutter. The animation illustrates what a video of the propellor would look like, and also helps visualize what’s going on between the blades. If the video aspect seems confusing, you can also interpret these animations as showing how the pattern changes as the initial angle of the propellor (when the photo started to be taken) changes.

(s=10) Shutter rolls so quickly that the 5 blades of the propellor appear normal. This is within the intended regime of the camera:

(s=2) Blade arrangement still topologically correct, but geometrically stretched on the bottom, and compressed toward the top:

(s=1) The topological threshold. Beyond this point objects begin to tear:

(s=0.8) Past the topological threshold, we begin to see the bottom side of the blade moving in the “wrong” direction:

(s=0.3) All hell breaks loose. We can see the critical point is quite visible just under the center of rotation. Blades seem to join and be torn apart from this point. Propellors appear on one side (at about 4 o’clock), and disappear on the other side (at about eight o’clock).

(s=0.1) An extreme example where the critical point is not resolvable due to the centeral hub. Blades begin to look like planar waves moving from the right to the left:

#### Examining the motion of the blades

How can we examine the apparent motion of the blades in these animations? I will do this by quantifying the apparent velocity field of the blades in the above animations. What we can do first is define a function whose gradient results in the velocity field of the unwarped propellor. Since the velocity is always tangential, we want a function proportional to $$\theta$$. This function is not continuous in the transition from $$\theta=2\pi$$ to $$\theta=0$$. This is of no concern to us because it is the gradient, in the end, that matters, and the gap can be filled in by continuity. Now we can suppose that we paint blades in angular wedges, delineating where each blade begins and ends. As in the animations above, by warping this image, we can see how the blades bend, and the direction perpendicular to the edges of the blades will be the apparent velocity of the “blade front”.

Define

$$\Phi(r,\theta)=\theta$$.

The value of this function determines the angle of a point, but also the difference in function values between two angles tells us how much time it takes for the propeller to turn by this angle (times some angular speed which here I assume to be unity). We can deduce the velocity of the propeller by recognizing that the direction of the velocity is in the direction of the gradient of the function, while its magnitude is the distance between points divided by the time, which is actually the reciprocal of the magnitude of the gradient (since the gradient is the change in $$\Phi$$=time per change in distance).

Now consider the composition of this function with the coordinate map

$$(r,\theta)\rightarrow(r,\theta-\frac{r}{s}\cos\theta)$$.

The purpose of this map captures the fact that the horizontal position of the pixel in question determines how much later the pixel is being recorded from the “expected” time. Later in time means we must sample from a further clockwise angle, which seems strange at first, but makes sense if you think about it.

So the warped function becomes

$$\Phi’=\theta-\frac{r}{s}\cos\theta$$,

The blade now looks warped, but we still perceive velocity as

$$\vec{\nabla}\Phi’=\frac{\partial}{\partial r}\left[\theta-\frac{r}{s}\cos\theta\right] \hat{r}+\frac{\partial}{\partial \theta}\left[\theta-\frac{r}{s}\cos\theta\right] \hat{\theta}=\frac{-\cos\theta}{s}\hat{r}+(\frac{1}{r}+\frac{\sin\theta}{s})\hat{\theta}$$.

Sort of. While the gradient points in the correct direction, as the blade moves faster, the magnitude of the gradient becomes smaller. This is what I was explaining before about reciprocating the magnitude of the vectors to get the correct velocity. First let us convert to cartesian coordinates:

$$\vec{\nabla}\Phi’=-\frac{x^2+ys+y^2}{s(x^2+y^2)}\hat{x}+\frac{x}{s^2+y^2}\hat{y}$$,

and then divide by the norm squared to account for this subtlety, giving

$$\boxed{\vec{v}(x,y)=\left\{\frac{-s(x^2+sy+y^2)}{x^2+(s+y)^2},\frac{s^2 x}{x^2+(s+y)^2}\right\}}$$.

Here is a visualization of the vector field for s=0.5:

Let’s do some analysis on this flow. Let us find the stationary points by setting the components equal to zero. The second component forces $$x=0$$, which forces $$y^2+sy=0\implies y=0 \mbox{ or } y=-s$$. This means $$y=0$$ remains the center of rotation, and $$y=-s$$ is the “critical point” that we had been discussing earlier. This is the point at which the blades seem to collide and tear. You can see from the plot that the point is a “saddle point”, which explains why along one axis the blades crash together, while on another they rip apart. This is not a surprise, as we already decided this is the point where the tangential velocity of the blades equals the velocity of the rolling shutter, so $$v=\omega r=\omega s \implies r=s$$, and clearly it has to be along $$x=0$$ below the x-axis. Another interesting insight is where the broken shards of propellor appear and disappear, on the edges of the disk the propellor traces out. By reverting to our polar coordinate representation, we can rephrase the question as asking “at what point is the velocity completely radial?” This is accomplished by setting the $$\theta$$ component to zero:

$$\left. 1+\frac{r}{s} \sin\theta\;\right|_{r=r_0}=0 \implies \boxed{\theta=-\sin^{-1}\frac{s}{r_0}}$$,

which is a cool result because it means that the blade entrance, exit, and critical points are collinear, on a horizontal line.

#### Using this information to find answers

Now back to the original question: how you can forensically determine information about a rapidly spinning blade by taking a photograph with a CMOS camera? For example:

• How many blades does the propellor actually have?
• At what rate is the propellor spinning?

First question: How many blades does the propellor actually have?

If the propellor is spinning slowly enough, then the warping is minimal, so the blades can be counted normally. However, when $$s$$ becomes less than the radius of the propellor, it is somewhat more difficult to understand what is going on. However, often this does not matter, because as long as the critical point is lower than the hub of the propellor, you can count the blades as they come out of the hub, which will give the right answer.

The problem arises when the critical point is within the hub. Here is a solution to that problem: count the upward-pointing blades, and subtract from that the number of downward-pointing blades. I’m using “upward” and downward loosely, as in some cases these blades may not literally be pointing in the direction I’m describing, but it’s the kind of thing you just have to get a feel for. This method works because the “upward-pointing” blades include true blades as well as fake blades. But fake blades, unlike real blades, extend downward, and therefore can be subtracted away. Here is an example using the “subtracted away” approach:

There are 9 blades on the top, and 4 on the bottom, giving (\9-4=5\), so five blades. Another way to see it is the red regions show the fake propellor blades that will be subtracted away, also indicating that there are five blades present on this propellor. This technique becomes much more useful when counting fast-spinning propellors. Aesthetically, this method is very similar to the Divergence Theorem, or Gauss’ Law in Electrostatics. Whatever goes out that does not come in is attributable to a source, which in this case is the collection of blades emanating from the hub of the propellor.

Second question: At what rate is the propellor spinning?

Suppose we are at the airport and we see a propellor and we are curious to its speed, but all we have is our CMOS camera. How can we determine the rotational speed of the propellor?

For the sake of argument, suppose the propellor spans across the entire width of the camera’s image sensor. First we determine the true number of blades using the method described above. Call this number $$n$$. Now what we will do is count the number of blades from the appearing point to the vanishing point around the top (direction of larger number of blades). Call this number $$N$$. Then $$N$$ is $$n$$ times larger than the number of times one particular blade passes by the rolling shutter. In this time, the shutter point has moved from the left side to the right side of the image, which means $$N/n$$ is one half rotation larger than the true number of rotations (if you count to the appearing and vanishing points, it is slightly more than $$\frac{1}{2}$$more, but in practice this difference is usually negligible. If you’re concerned, you can count blades across the entire horizontal diameter). Therefore,

$$\mbox{# of rotations}=\frac{N}{n}-\frac{1}{2}$$,

where “$$\mbox{# of rotations}$$” (abbreviated to $$\#_{rots}$$) represents the number of rotations that take place in the time the rolling shutter takes to sweep across the entire propellor region. This number can be related to $$s$$.

$$s=\frac{\small\mbox{rolling shutter velocity}}{\omega}=\frac{2r/\small\mbox{time}}{2\pi \;\#_{rots}/\small\mbox{time}}=\frac{r}{\pi \;\#_{rots}}$$.

### Weaving sounds to make braids

Vi Hart’s “Doodle Music” video is a beautiful combination of art, math and music, illustrating parallels between symmetries in curves and symmetries in sound:

I particularly enjoyed the braid melody at 2:35, so it made me want to discover a mathematical function governing the vibrations in the air that define a “musical braid”.

#### Looking at the braid

First, let’s investigate what Vi’s musical braid looks like. If we look at a section of the spectrogram of the melody, here is what we get:

Even with this visualization, it is not obvious where the braid is. But Vi’s voice is luckily not a pure sine tone, meaning that there are many harmonics visible. Vi also chose to quantize the braid by discretely changing the pitch of her voice to make the result sound more musical, sticking to western musical tones. A pure sine tone usually does not sound very pleasing, and graphically looks like a flat line in the spectrogram; it appears similar to a the spectrogram of a whistle. To mathematically reproduce Vi’s musical braid so that it appears in the spectrogram, we need three independent sine tones, whose frequency varies in accordance with the drawing she made with sharpies.

#### Making the first thread of the braid

To mathematically “draw” Vi’s braid, we need to determine how to construct each thread individually, and then add them together at the end after erasing the parts that pass behind other threads. Let’s say that the shape of each thread is a sine wave. Then we need to create a frequency modulated signal, that is, a sine wave that changes pitch in a sinusoidal manner. A pure tone at a frequency $$f$$ can be generated as $$y(t)=A \sin(2 \pi f t+\phi),$$ where $$t$$ is in seconds, and $$\phi$$ is the phase. In our case, we need the frequency itself to change as a function of time, in particular, we want our frequency to be $$f(t)=\bar{f}+\tilde{f}\sin(2\pi g t),$$

where

$$\bar{f}=\frac{f_\mbox{max}+f_\mbox{min}}{2},\;\tilde{f}=\frac{f_\mbox{max}-f_\mbox{min}}{2}$$

It may be tempting to plug this result for $$f(t)$$directly into our pure sine formula, but this doesn’t quite work. To see this, imagine our answer is $$y(t)=A \sin(a(t))$$, with $$a(t)$$ some function to be determined. Recognize that in order for our frequency modulated signal to be locally identical to a pure sine wave with some phase, we require that the argument of the pure sine, $$2 \pi f t+\phi$$, be the best approximation to the argument of our frequency modulated signal, that is, the tangent line. So we require that the slope of the tangent line ($$a’(t)$$) be equal to our desired frequency ($$f(t)$$), indicating that our undetermined function $$a(t)$$ is essentially just the indefinite integral of our desired frequency function $$f(t)$$:

$$y(t)=A \sin\left(2\pi \int f(t) \; dt+\phi\right).$$

Let us determine $$a(t)$$:

$$a(t)=2\pi \int \bar{f}+\tilde{f}\sin(2\pi g t) \; dt=2\pi\bar{f}t-\frac{\tilde{f}\cos(2 \pi g t)}{g},$$

so our desired function is

$$A \sin\left(2\pi\bar{f}t-\frac{\tilde{f}\cos(2 \pi g t)}{g}\right).$$

This gives an output spectrogram of:

Perfect!

#### Weaving the second and third threads of the braid

Now we need two more sine waves, each offset by a different amount. Since there are $$2 \pi$$ radians in a full cycle, and we have three waves that we want to be spread out evenly, $$\phi=\{0,\frac{2\pi}{3},\frac{4\pi}{3}\}$$.

By adding several of these warbly sine tones together (call them “metasines”), we can create Vi’s musical braid. To make it look like they are passing over and under each other, we have to increase and decrease their respective volumes at the appropriate moments to give us the sense of depth. When this is done, the spectrogram looks like this:

#### The outcome

Here is the result played as a sound:

Interesting, but not as beautiful as the original. My friend Britta said it reminded her of a fire alarm.

### Creating curves with straight lines

Above is a video I recently made in response to Vi Hart’s great doodling game video. You take a curve, put dots evenly spaced (or however you want) along the line, and connect dots some predefined number apart. You can do this with any curve you want, but some results are more interesting than others. In some of the shapes, I highlighted the limiting envelope curve that is generated by the shapes. Enjoy!

And here is part of the video in gif form:

### Playing with a Flowing Torus

A friend recently sent me a video that demonstrates a remarkable slinky-like object called a toroflux, designed by Jochen Valett:

It is a long ribbon of spring metal wrapped into a coil, except instead of coiling into a helix, as most springs do, this one coils through itself. It coils again and again, for the entire extent of the ribbon, where it is finally joined to the other end, creating a single loop of metal ribbon. Because the loop is passed through itself many times, the resulting shape is non-trivial in the knot-theoretic sense; it takes the form of a torus knot.

This spring behaves in an extraordinary way when manipulated. Because the spring is under tension, and is seeking the lowest energy state possible, when it is released, it prefers to open into a torus with the largest “minor radius” possible. That is, it becomes a horn torus, where the “hole” in the doughnut vanishes.

The force responsible for this then has a tendency to “grab” onto anything placed through the hole of the torus (like a stick), and if the object has enough friction, the toroflux will have good traction. The result is remarkable; the toroflux begins spinning, while simultaneously falling, creating the illusion of a silver bubble-like structure.

I was so excited by this that I had to purchase one for myself. If I had a ribbon of spring metal, I would have wanted to make my own, but unfortunately I couldn’t find anything that would suffice. Before it arrived, I made predictions about how such an object could work, and I have enjoyed playing with it. I would like to explain here how the toroflux works using an informal analogy, hopefully making it understandable.

#### Capturing the idea of “rolling” down

Let’s say we want to build a device that rolls down a vertical rope. When we think of rolling, the first thing that comes to mind is wheels. So we could accomplish the task by placing a number of vertical bicycle wheels radially in contact with the rope, each wheel connected to its neighbor via some framework. Here I have pictured two wheels for simplicity, but the principle could be generalized to many wheels. Provided that the device doesn’t slip off, and traction is maintained between the wheels and the rope, the assembly will fall, and the wheels will simultaneously turn as indicated by the blue arrows (relative to the falling frame).

This allows our apparatus to roll down straight. But what if we want the device to spin like the toroflux does? Well, just like when driving a car, you can guide a wheeled device in a certain direction by turning the wheels. In our case, we want the device to begin rotating. What would happen if we took these wheels and rotated the axis of each wheel some fixed angle about the radial direction? The adjacent diagram illustrates this with a top-down view of the wheel system, with the rope in cross-section. As the wheels “drive” down the rope, they have no choice but to make the whole assembly spin because of the way they are angled.

Now we have something that is much more similar to the toroflux. It not only rolls down a rope, but the whole system also rotates about the axis of the rope as it does so. The ratio of the downward velocity and the rotational velocity is determined by the angle of the wheels.

#### Doing away with the chassis

We now have a number of wheels held together by the support struts and also held tight to the rope with spring mechanisms to maintain traction. The support chassis is necessary for a simple reason: the wheels are not connected to one another. In the topological sense, the set of wheels is comprised of more than one connected component. We can rid ourselves of the chassis if we create a single wheel that locally (relative to the rope) looks identical to the wheels. That is, the rope should be unable to tell the difference between many tires touching it and a single, serpentine tire touching it and curving inward toward the rope in exactly the same way that the individual wheels did.

Here is a way to accomplish this. If you follow the curvature of a wheel, instead of curving around in a circle and reconnecting directly with itself, it must arc over toward the next wheel and join with it! This wheel will also do the same thing with its other neighbor, and this continues all the way around until we have only one spiraling wheel, all one piece. This does not interfere with the rolling of the wheels, because all the wheels spin in the same direction, so the “excess” tread from one wheel goes into the tread that is moving away on the neighboring wheel. Thus the physical result is essentially the same. (This forms a torus “knot” classified by {1,n}, signifying that in a single rotation around the rope, the coils spiral n times.) The above animation shows how the separate wheels are deformed and connected to each other to form a single coil-tire.

This is all fine and good, but we still require a great amount of tension in the spring to keep it pressed firmly enough on the rope to prevent slipping. As the device rotates faster, centrifugal force will pull the spring-tire apart, and it will begin to lose traction with the rope. We will see in the next section how to prevent this from happening.

#### Using centrifugal force to our advantage

Our device runs into some trouble when it starts spinning really fast. As the device spins, the coils pull apart and lose traction with the rope. We can put the coils under more tension, but there are practical limitations. There is a much more clever way to solve this problem, and it involves using centrifugal force against itself to achieve what we are looking for.

Instead of running the coil in the way I described earlier (as a {1,n} torus), we can loop the torus through itself, so that each coil wraps around the other side of the rope, so when the toroflux begins spinning rapidly, centrifugal force only pulls it tighter around the rope. In this way, we form a {n-1,n} knot, which is a true knot, so that upon orbiting the rope n-1 times, the coil winds n times. This knot resembles but is not actually equivalent to a single torus of circles of the Hopf fibration.

Hopefully this explanation makes clear how the toroflux works, and also helps illuminate the ingenuity and utter elegance of this invention. I also made a video to demonstrate it:

### A recycled rhombicosidodecahedron

My friend Cody drinks a lot of Red Juice. When bought from Costco, two 96 fluid ounce bottles of Red Juice come paired like this:

That red connector between the bottles creates a handle for easy transportation. Most people dispose of these connectors and consume the Red Juice with the help of friends. Cody manages to drink this quantity of juice in a few days and sets the connectors aside, initially out of laziness but soon building a collection of them.

One day Cody asked me what the coolest kind of polyhedron was that one could build with 121 edges. Well, the rhombicosidodecahedron can be built with 120 same-sized edges. I had no idea what Cody had in mind  I expected he had obtained some kind of polyhedral construction kit — but instead he responded with a photo of his large collection of Red Juice connectors. After seeing the photo, I was genuinely worried for Cody’s well-being and what his dentist might have to say. But my concern for Cody’s health was soon outweighed by my excitement to begin the construction of a new rhombicosidodecahedron made from these edges!

#### What is a rhombicosidodecahedron?

A rhombicosidodecahedron is made of triangular (20), square (30), and pentagonal (12) faces. This animated gif (from Wikipedia) demonstrates the construction of one. First imagine placing a small explosive charge at the center of an icosahedron made by gluing triangles together — when the charge explodes, the faces blow outward. Then freeze time at the moment the shared edge of two neighboring triangles separates to a distance equal to one side of these triangles. Now connect these edges up again to form squares joining the triangles. At the same time, you will create 12 pentagons coming from where the vertices of the triangles used to be. The resulting solid is a rhombicosidodecahedron, and it is therefore no coincidence that it has the same number of triangles as the icosahedron, the same number of pentagons as the dodecahedron (the icosahedron’s evil arch-enemy), and the same number of squares as the number of edges on either of these polyhedra.

#### How many edges do we need?

Let’s find the number of connectors required to build such a structure, with the connectors acting as edges in the design.

• 20 triangular faces (from icosahedron)
• 12 pentagonal faces (from dodecahedron)
• E squares, where E is the number of edges on either the dodecahedron or the icosahedron. Sometimes I forget this, but it can be obtained by Euler’s formula:

$$\chi=V-E+F=2,$$

where $$\chi$$ is the “Euler characteristic”, which is 2 for all convex polyhedra. This means that the number of edges for either the icosahedron or the dodecahedron is

$$E=12+20-2=30.$$

So both the dodecahedron and the icosahedron have 30 edges, so the rhombicosidodecahedron also has 30 squares. Then the number of edges on the rhombicosidodecahedron can be computed by adding the total number of edges belonging to each face:

$$12\times 5+20\times 3+30\times 4=240,$$

but we have actually counted the edges exactly twice, since each edge is counted from both of the neighboring faces. This tells us that the rhombicosidodecahedron has 120 edges. Another way to compute the number of faces without needing Euler’s formula at all is to notice that every edge is a neighbor to either a pentagon and a square or a triangle and a square. So right away, the number of edges must be equal to

$$12\times 5+20\times 3=120,$$

which gives the same answer. In order to have a collection of 120 connectors, Cody must have consumed 240 Red Juices, since each connector holds two bottles. This comes down to about 180 gallons of juice. Granted, he has been collecting for quite some time now.

An interesting property of the rhombicosidodecahedron is that each vertex connects exactly four edges. I’ll talk about this later.

#### How to build the rhombicosidodecahedron?

While discussing our plan of attack, Cody brought up a concern: because these connectors would be stacked at the circular part that holds the neck of the bottle, some Red Juice connectors would stack in asymmetrical ways. That is, a particular connector might be stacked third-out from the center on one side, but only the first-out on the other side. Aside from the poor aesthetics of angled connections, this would lead to asymmetries in the final product, as some connectors would be skewed and therefore not extending their true distance. A mathematical question comes to mind: is it possible to connect these in such a way that there isn’t any warping? Above is an illustration of a single vertex, showing which layer each connector occupies. If one of these connectors is on a different layer on a neighboring vertex, there will be warping.

My solution to this problem was to reduce it to another common mathematical problem: edge coloring. Since each vertex has exactly four edges radiating from it, we can ask if there is a way to color the edges of the rhombicosidodecahedron with exactly four colors in such a way that no two colors are adjacent. In this way, each of the four colors represents one of the four layers. It is tempting at this point to exclaim that it can certainly be done according to the four color theorem, but unfortunately we cannot apply that immediately here, because we are coloring edges and not vertices of a graph. We could also try to use Vizing’s Theorem, which states that the chromatic index of a graph is either $$\Delta$$ or $$\Delta+1$$, where $$\Delta$$ is the largest vertex degree of the graph. Unfortunately, this does not help us here, since our maximum vertex degree is already four, so we cannot say right away whether we can color our graph with only four edges.

I decided that since I would end up needing a constructive solution anyway, I might as well find one. I began with a planar projection of the rhombicosidodecahedron (as seen on the right), beginning from the center and working my way outward.

Occasionally, I would come to an edge where I simply could not give it any color; all of my four colors were already taken by neighboring edges. At this point, I would just decide on a color for the new edge, and fix whichever edge was now conflicting. After fixing this edge, there would be exactly one other edge with a problem. This created a cascading effect that was relatively managable because the number of areas did not branch off exponentially. I continued following the chain reaction, edge by edge, until the problem got pushed off to the frontier of the area on which I had been working, at which point there were no more problems remaining. It was then safe to continue. After a bit of tedious work, I was happy to find that the entire graph was properly colored, and no edges remained. I was left with this:

At this point, I couldn’t help but make a 3D model of this, so it would be easier to see how this wrapped onto the polyhedron:

#### The construction process

Finally Cody visited me and remembered to bring the Red Juice connectors. We purchased some cable ties to hold it all together.

#### Success!

A friend recently sent me an animated gif depicting a man dropping a stretched slinky in slow motion:

The first time you watch it, it’s hard to resist calling it fake. The slow motion footage clearly shows that the bottom of the slinky doesn’t move until the whole slinky collapses to the bottom. But common sense tells us that this is impossible; of course all parts of the slinky should fall downward under the influence of gravity. (For an extended version of this gif, you can also watch the source video by Veritasium on YouTube, which includes a brief explanation.) My friend was especially skeptical, so I wanted to analyze this problem with cool illustrations and animated gifs…and of course some MATH. If you want to cheat, you can scroll to the end of this post to see the solution and its visualization.

I decided to idealize the problem like this: the slinky is an ideal spring with mass distributed uniformly throughout. It is also a spring that can pass through itself. These assumptions make analyzing the problem easier.

#### Initial Shape of the Slinky

Before we can figure out how the slinky bounces around as time goes on, we first must figure out what the slinky looks like before it is released. Springy things, we know, always try to un-spring themselves (that is, they try to release stress to seek out a “most relaxed state”, or static equilibrium).

(Many things have this behavior. For example, consider water in a pool. Water molecules are trying to “relax” in the earth’s gravitational field — they all want to fall as low as possible  but they cannot all fall to the bottom of the pool, because they all take up some finite volume. If you make waves in the pool, the molecules shuffle about in an effort to try to minimize the total energy in the pool. It’s not until the pool becomes still that you can see that all of the water on the surface has reached a compromise: it becomes flat  equal opportunity for all molecules.)

In our case, we have gravity pulling down, but we also have the stretchiness of the spring playing a role. How can we write down the total energy in the spring due to both the springiness and also the force of gravity?

First, we need a way to keep track of different points on the slinky. Position from the bottom is no good, because the slinky stretches, and points that were once one inch from the bottom now might be two inches. We need a naming system that always assigns the same name to any particular atom on the slinky, so I name an atom by how much mass is below it. While the slinky can stretch around, the amount of mass below a certain point on the slinky remains fixed, so the name of the bottom of the slinky will be zero, while the name of the top will be $$M$$, where $$M$$ is the total mass of the spring. We also need to know where all of these points on the slinky are  how high off the ground they are. We will call the height of a given point (parametrized by $$m$$, the mass below the point) $$y(m)$$.This allows us to write down a formula for the potential energy due to gravity using an integral:

$$U_{gravity}=\int_0^M g y\;dm$$

How about the potential energy in the stretch of the spring? Let’s look at a small region of spring. We can get an idea of how “stretched” the spring is at this point by computing the derivative $$\frac{dy}{dm}$$. If the whole spring were stretched at this same stretch factor, then the length of such a spring would be $$\frac{dy}{dm} M$$. However, the whole spring is not stretched linearly like this, but we know that the small region we’re looking at looks identical to any small region of the same size on the uniformly stretched spring. This means that the amount of stretch energy in this region is equal to the amount of stretch energy in our entire uniformly stretched spring, multiplied by the percentage of region we’re actually looking at. Mathematically, this means if the energy in the uniform spring is $$\frac{1}{2} k(\frac{dy}{dm} M)^2$$, then we must multiply this by a factor $$\frac{dm}{M}$$ to extract the potential energy due to the small region alone. This amounts to

$$U_{spring}=\int_0^M \frac{1}{2} k y’^2 M\;dm.$$

All together, this becomes:

$$U_{total}=\int_0^M g y+\frac{M}{2} k y’^2\;dm.$$

We want to find a spring configuration that minimizes this energy. This amounts to solving the Euler-Lagrange equations

$$\frac{d}{dm}\left[\frac{\partial L}{\partial y’}\right]-\frac{\partial L}{\partial y}=0,$$

where $$L=g y+\frac{M}{2} k y’^2$$ is our potential energy functional. Take note that the primes here represent derivatives with respect to $$m$$, not with respect to $$x$$, which is unconventional.

We find the partial derivatives to be $$\frac{\partial L}{\partial y’}=k y’ M$$, and $$\frac{\partial L}{\partial y}=g$$. The resulting differential equation becomes $$k y” M=g$$, which integrates to

$$y(m)=\frac{g m^2}{2 k M}.$$

Great. Now we’ve found the initial configuration of the dangling spring. An interesting thing to notice here is that the length of the dangling slinky is exactly half that of a weightless spring (with the same spring constant) with all of its mass concentrated at the point at the bottom. I promised there would be some neat graphics, so on the right is what the spring looks like before dropping, with mathematical precision.

Now that we know what the spring looks like initially, let’s work out how it moves over time. Looking again at the resulting differential equation, and writing it in the suggestive form

$$k M y^{\prime\prime} -g=0,$$

we can conclude that the left hand side of the equation represents the accelerations of a particular point on our spring, and as they’re being set to zero, it’s no surprise that we were looking for the equilibrium condition. This allows us to extend our result to a dynamic one by replacing the zero with the acceleration

$$k M y^{\prime\prime}-g=\ddot{y},$$

where the double dot over the variable y represents two time derivatives. It’s clear that the first term on the left hand side represents accelerations due to internal tensions in the spring, and the second term represents the acceleration due to gravity. If we move our analysis into a freely-falling reference frame, we see that the g term vanishes, so we are left with

$$k M y^{\prime\prime}=\ddot{y},$$

which is the wave equation in one dimension, which might be more familiar in the form

$$\frac{\partial^2 u}{\partial t^2}=v^2 \frac{\partial^2 u}{\partial x^2},$$

where $$v$$ is the wave velocity. In our case our “velocity” is $$\sqrt{k M}$$, which does not have units of velocity in the standard sense. We want to figure out how the wave will propagate over time given the initial condition we found above.

#### Solving the Wave Equation

Using d’Alembert’s method for solving the wave equation, we can attempt to express the solution as a sum of two oppositely propagating waves:

$$y(m,t)=f(m-vt)+g(m+vt).$$

This wave must satisfy initial conditions, and once the spring is released, it must also satisfy certain boundary conditions on the ends of the spring. Once the spring is released, there cannot any longer be any tension on the edges of the spring. Thus, the stretching at the boundaries must go to zero, and hence $$\frac{dy}{dm}=0$$ at these boundaries. These are equivalent to saying that the wave has “loose” ends; when a wave hits these loose ends, it reflects back off of them unchanged. If the wave was instead held fixed at both ends, like a string on a piano, the wave bounces back inverted, in order to ensure that the string remains fixed at the ends. In the same way, when our wave reflects, it reflects unchanged to ensure that the derivative at the boundaries remains zero.

Secondly, there is also an initial velocity condition. At the moment the slinky is released, it is at rest. How can two waves travelling in opposite directions sum to a motionless wave? Simple: if at a given position one wave (say $$f(m)$$) is moving up (due to the fact that it’s propagating to the right), then the other wave ( $$g(m)$$) must be moving down at the exact same rate (due to the fact that it’s propagating to the left). Since both waves are travelling at the same speed, but in opposite directions, the only possible conclusion is that $$f(m)=g(m)$$. If you find this hard to believe, write it out with math and prove it that way. But the purpose of this whole post is to try to avoid math where possible, while still getting a correct answer. Since we know the form of the wave at time zero, we know that the shape of the two counter-moving waves must each be half the size of the total wave. So we conclude

$$f(m)=g(m)=\frac{1}{2}\frac{g m^2}{2 M k}.$$

We also can’t forget the time dependence. In particular, when the waves go along their way, the space they leave behind is replaced by a reflected version. An easier way for me to imagine this is that $$f$$ and $$g$$ are waves extending infinitely in both directions, generated by flip-floping one period of the above expression for $$f$$ and $$g$$. That is, periodically extend these functions to infinity in both directions, except every other period is mirrored. Now we can imagine these two waves countermoving and superimposing. To achieve this infinite mirror effect, we can use the modulo function, and the following cute trick: shift the parabolic solution over by M, modulo the argument of the function by 2M, and finally shift it back in the opposite direction by M. This will have the effect of looping the function in just the way we wanted. There’s one more remaining step: we need to move back into the non-freefall reference frame by subtracting a $$\frac{1}{2} g t^2$$. When the dust settles, the solution works out to be

$$\frac{g \left(\text{Mod}\left[x-\sqrt{k M}t+M,2M\right]-M\right)^2}{4 k M}+\frac{g \left(\text{Mod}\left[x+\sqrt{k M}t+M,2M\right]-M\right)^2}{4 k M}-\frac{1}{2}g t^2.$$

#### Appreciating (and Visualizing) the Solution

OK, so that’s not very pretty to look at, but the real question is what does the answer look like? Time for a cool animated gif.

On the left is an animation of what our ideal slinky looks like as it falls. The really fascinating thing is that the top of the spring actually passes through itself as it falls. I made one end of it a little narrower than the other so that it would be easier to see this passage.

The second interesting part: we can see very clearly in this animation that the bottom of the spring does in fact remain stationary until the wave reaches it. Further, the position of the ends of the spring are piecewise linear in time, that is, the velocities are constant during any one inversion cycle. Once the next inversion cycle begins, both the velocities change, but are again constant. If you convince yourself that this is true during the first phase, then you must also immediately believe it for any subsequent phase, because once the slinky comes back to its initial configuration, the process is the same except it is falling faster. Thus the speeds will be the same except with a velocity offset.

Perhaps the strangest thing is that this isn’t only true for the endpoints. Look closely at the first phase and you will see that all points on the slinky remain at rest until the wave reaches them from the top. So as strange as it sounds, the slinky never actually changes its shape as it falls, aside from when it undergoes the inversion between phases. The slinky will continue leapfrogging its way downward forever in this way, and aside from some abrupt changes in speed, any point on the slinky remains at a constant velocity as it falls. These abrupt changes in speed ensure that the center of mass of the slinky will continue to fall at the acceleration due to gravity.

Now knowing the answer, is it any easier to convince ourselves of it? I often joke around with a friend of mine about the fact that once you know the answer to a problem, the results seem obvious. In accordance with that principle, there are some ways to understand this phenomenon. If we look at the very bottom of the slinky before it is released, the force of tension in the spring must perfectly cancel the weight of the spring at this point. When the slinky is released, these forces are still in equilibrium, and will remain in equilibrium until the neighboring part of the spring begins to move.

You can also think of it this way: the bottom of the slinky does not begin falling until the wave reaches it. The wave in the slinky carries the information that the top has been released, and since this information travels at a finite speed, there is no way that the bottom of the slinky can know that the top has been released right away. It takes a finite amount of time for this message to propagate through the slinky, and it is not until the wave finally arrives at the bottom that it begins to fall. The bottom of the slinky is like an eager friend of a runner in a race living on the other side of the world in ancient times. Before he can start celebrating, he must wait for the message to get to him via a boat halfway around the world. This principle still holds for points higher up on the slinky, too. Any point on the slinky whatsoever will not begin falling until the wave reaches it. This can also be seen from the slow-motion footage shown in the animated gif!

#### "Extending" the Solution

As you can see, nowhere in my analysis have I assumed that the slinky is of a certain length. Therefore, this principle should work for any kind of slinky.To see evidence of this, watch the follow-up YouTube video of an even longer slinky. In this video, you can see that the top of the slinky is trying to push through itself! Since it can’t, it begins to tumble after a while. In this video, they also briefly mention the idea of considering the slinky in the absence of gravity, which is equivalent to moving into a freely falling frame as we did in the above derivation. This amounts to removing the $$\frac{-1}{2} g t^2$$ term. The solution ends up looking like this:

In the end, if you want to do this successfully with a much longer slinky, and show via experiment that the bottom still doesn’t move, then the radius of your slinky must increase proportionally to the length so that slight imperfections in the way it’s dropped, air currents, etc. do not affect the motion.