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.

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.

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.$$

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!

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.

Quite some time ago, I came across a riddle, and I’d like to share a variant of it with you:

*100 prisoners are incarcerated in a very peculiar jail. The jail has a single room with a light controlled by a switch that is initially off. The prisoners are each told that they will be taken one at a time into this room, and will be allowed to flip the switch if they so desire. They will then be taken back to their room, and another prisoner will be brought to the room, given the same privilege, etc. While there is no specific reasoning whatsoever to the order in which the prisoners are sent to the room, there is only one known fact: the order doesn’t forbid any prisoner from entering the room after some time. That is, if the order were to continue indefinitely, no prisoner would enter the room for his or her last time (this happens almost surely anyway). If any one prisoner at any time correctly claims that every prisoner has been to the room at least once (by shouting “DONE!”), then all the prisoners are set free. If he or she is wrong, they all are killed. Before the prisoners begin to be led into the room, they are allotted a single planning session in order to discuss a strategy. Is there a certain escape strategy for the prisoners?*

If you like riddles, think about this one for a while before reading ahead. Keep in mind that the exact time of unanimous entry need not be known, but when a prisoner shouts “DONE!” each prisoner must have visited the room at least once, 100% of the time, always. If you get bored with this one, try to solve the problem assuming you do not know the initial condition of the switch.

In light of my last post, I began thinking about other shapes I could 3D print using Shapeways. Since my last piece was somewhat flat, I decided to go for a more volumetric structure this time, and I was especially taken by the idea of a shape that links with itself. But I wanted to achieve this with a model made of one piece instead of a chain with jangling disconnected pieces — to create a seemingly impossible object with one contiguous ladder-like structure.

How might I create something like this? I was surfing YouTube one day and I came across this puppy:

This is the kind of structure I would like to make. Other people have also made linked mobius torus structures with varying materials:

I would like mine to be based on this shape but look more interesting. Like most problems I try to solve in mathematics, trying to make something more interesting usually is the same as trying to *generalize* it. When I try to generalize (say the concept of an equilateral triangle), I look for the following criteria:

- Is there a
*quantity*inherent to the situation at hand that can be increased? (The triangle has three sides, but what would shapes look like with more than three sides?) - Is there a
*constraint*being imposed that we can remove to allow more interesting behavior? (What would it look like if each side need not be the same length?) - Is there a
*context*that the object is inherently using in its existence that can be modified? (The triangle is flat, but what if we allowed the triangle to live on a curved surface like a sphere?)

I began my design by constructing the basic shape with Mathematica. This consisted of a essentially toroidal shape given by the following parameterization:

However, I wanted the cross-section to be hexagonal, so this would mean I would need my parameter v to be discrete; I would need six samples in a full 2π rotation. On the other hand, my parameter u would also need to be discrete; I wanted to have 22 individual links joining across the piece. I wrote a little Mathematica program that would take my parameterization and would in turn write a “.txt” file to my hard drive. By changing the extension of this file to “.obj”, I obtained a three dimensional toroidal shape with a hexagonal crossection. However, this wasn’t exactly what I wanted. I needed to add a twist to the whole thing, akin to how one would add a twist in a mobius strip. However, since the crossection is hexagonal, we apply a 60˚ rotation as opposed to a 180˚ rotation. This corresponds to each side of the hexagonal structure meeting with its neighbor when the two ends of the strip meet. The next step was to open the result up in TopMod to see what it all looked like.

Notice the wrinkle in the face loop close to the front! This is understandable; I began with a torus, and performed a twist on the vertices appropriately to create the rotation. But if you start with a standard belt of paper, you can’t expect to twist it without breaking and end up with a mobius strip! Consequently, all of that twisting had to “pile up” somewhere, and this is exactly where I will cut each wrinkled edge, and reapply the edges appropriately. This creates a perfectly and evenly twisted mobius torus. The changes in this procedure are shown with semi-transparent regions; look closely and you’ll see the wrinkles vanish!

Now that we have a perfect mobius twist base, I used TopMod’s wireframe modelling mode to create a wireframe:

Then I deleted the crossbeams and put in my own crossbeams, which went diagonally across instead of around the perimeter to create a sort of linking effect. I decided that the most natural way to do this would be to rotate the crossbeams cyclically as shown in the figure. First, I would place a beam between corners 1 and 4, then from 2 to 5, then from 3 to 6. At this point I would repeat, laying down another beam from 1 to 4.

Once I was through with that business, I decided that it didn’t look quite organic enough, so I wrote a separate Mathematica program that would take an arbitrary 3D model and warp it according to a mathematical function. I wanted my shape to look less like a standard torus and more like a melted one (Dali style). Without getting too technical, this involved taking the model, projecting every vertex down to the torus’s “base circle” (the closest point on the circle going around the torus) then warping this base circle, carrying all of the projections with it, and then exploding the vertices back outward again via a rotated basis to account for the rotation that had taken place in the warping map. The result of all of this mess was good enough for me to render using Blender, a free, open source 3D content creation suite:

After finally having a result that I liked (on my first try I realized that my first model had an error with the cyclic pattern of bridges), I couldn’t contain myself, so I immediately uploaded my model to Shapeways to have it printed in “Winter Red Strong and Flexible,” and a couple weeks later my model arrived via UPS!

Here is a video of my model spinning to reveal the geometry more clearly. The trick is that there is a fine fishing line being used to hold up the model from the ceiling.

For a while I have been considering making 3D printed objects with interesting patterns and shapes, especially after seeing the work of Nervous System, which produces jewelry and other useful items modeled with algorithms (including reaction-diffusion):

My friend Britta and I were thinking about ideas for what I should make, and consequently what service I should use. We decided on Shapeways, a personalized fabrication service capable of printing 3D parts. They charge according to amount of material, so it made sense to produce something very small and light. Britta commissioned a reaction-diffusion necklace, inspired by the necklace shown above. Since I already had some working Mathematica code for generating reaction-diffusion systems, I modified the parameters slightly to create worm-like shapes that would interlock as much as possible, as the necklace would have to be made from a single connected component so it would not fall apart.

I was determined to produce this necklace in the most unusual and perverse way possible. I used Mathematica, Photoshop, and Blender to produce a 3D model of a small, flat object suitable for wearing. Here is an image of the resulting pattern:

Invariably, the result was not made of only one piece, so I broke the image into connected components using Photoshop’s paintbucket tool:

I chose the one that was both the most interesting and also of the best dimensions. I leave it as an exercise for the reader to determine which component I chose. After isolating this component in Photoshop, I saved the image as a black and white JPEG and imported it back into Mathematica, where I wrote a small program to use the darkness of each pixel to determine by how much to extrude the 3D object at that point.

My first attempts generated objects that were much too large or small, but finally after much labor, I managed to come up with something that was not rejected by Shapeways. I came up with this one, 3.3 inches wide and eligible for printing:

Very vermicular. Britta and I chose the material called "White, Strong, & Flexible" since its price, strength, robustness and appearance sounded good for a practical first-try object.

I ordered it from Shapeways (along with two more copies so that we reached the $25 minimum), but a couple weeks later I received an email saying that the model could not be printed because some elements were too thin. Frustrating! I emailed a Shapeways representative, and we figured out that some of the “neighboring” tubes had thin membranes connecting them when they got too close to one another — these were thinner than the machine’s tolerance.

I fixed my model, resubmitted it, and we waited two more weeks. And one very exciting day, I received a small box containing the objects and gave one to Britta. She bought some waxed white cord and tied a couple knots to make the necklace:

Success! Some of my friends have been complaining that it is a bit too flat compared to the possibilities of 3D printing, so I am determined to continue my 3D modeling adventure. I already ordered the Shapeways materials sample kit which will allow me to explore what kinds of materials are available for printing, as well as giving me something to play with until I decide what to make next.

You can think of a magnetic field as a collection of invisible fibers that fill space. These fibers are produced and deformed by magnets, and these invisible lines represent how other magnets placed inside the lines will experience forces from the magnets that originally produced these fields. The forces can be modeled with simple vector calculus because the magnets can be treated as dipoles.

I have 216 small spherical metal balls containing rare earth magnets, called "buckyballs" in stores. I decided to look at some of the simplest modular structures that can be formed with the buckyballs:

Here is my visualization of the “fibers” of the smallest triangle formable:

The two by two square formed with four buckyballs:

The triangle used to build a buckyball “icosahedron” or ball-shaped object:

And the hexagon module used to build a snowflake:

Other people also enjoy making complex shapes with buckyball magnets, such as these examples:

There are a lot more on Flickr.

This drawing is titled "Drawn Entirely With Straight Lines", and it has some interesting geometric properties. I’ll explain how it works.

First, we can mentally break the hexagon shape into smaller modules:

Each equilateral triangle region is identical, and they are reflections of each other. If you placed this hexagon inside of a kaleidoscope, this pattern would repeat infinitely in all directions.

The imaginary curves that are visible in the picture are closely related to the mice problem, which is a special kind of pursuit problem (like what we saw in my tractrix post). The mice problem goes like this: *Three mice are initially sitting at the corners of an equilateral triangle. All at once, each of the mice begin crawling with equal speed directly toward the mouse on their right. What is the path of each mouse?*

This is an animation of the path of the rodents (not made by me):

Suppose that the rats periodically and simultaneously leave droppings to mark their path. Again, each triple of simultaneous droppings forms an equilateral triangle. What would this look like? I used Mathematica’s Graphics function to illustrate it:

In this animation, the rodents leave droppings more frequently as their collision becomes more imminent (perhaps in eager anticipation of their meeting). The rodents always form an equilateral triangle, which means that the path that they take is also symmetrical — it is a simultaneous rotation and scaling (shrinking) of the triangles. Here is another animation of this effect:

It is precisely the rotation/scale symmetry that allows this gif to loop seamlessly.

But why do the lines curve like that? The angle between the direction a rat is aimed relative to the center of the triangle remains fixed throughout, and the resulting kind of curve is a logarithmic spiral. If you really use your imagination, as a regular screw can sink into wood, a screw with this logarithmic shape could be theoretically used to enlarge/scale something.

Anyway, here is a quick sketch with pencil and paper I made using the mouse algorithm with step size remaining constant (constant dropping rate):

I also did a similar diagram in Mathematica, again with the triangles more dense toward the center to emphasize the symmetry. That is, if each triangle were rotated and scaled the right amount, it would look identical, except with either an extra or a missing outer triangle.

There is a sculpture in San Francisco that looks like a three-dimensional icosahedral illustration of the mice problem (it’s called *Icosaspirale,* by Charles Perry). This time, each triangular module hides a similar scale/rotation symmetry, except now in three dimensions, with the center of dilation not lying on the plane of the largest triangle, but instead somewhere between the center of the triangle and the center of the icosahedron. It is really remarkable what kind of astounding visual effects can be generated by imposing various symmetries!