Showing posts tagged gif

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:

Explaining an astonishing slinky

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

Slinky Drop

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.

How the Slinky Wiggles

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.

The mice problem: more on curves of pursuit

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!

Sudo make me a pseudosphere

You may have seen it before: a magician spreads out a deck of cards on a table into a long row. He tilts the endmost card upward, and the neighboring cards rise accordingly, resting on the adjacent card. The next thing you know there is a beautiful shape, an array of cards coming to a sharp point which can be moved back and forth with the magician’s finger.

britta

This is a tractrix. It’s actually the same shape as the curve that you get when you drag a pole along a line in the ground. You can imagine this by imagining each card in the spread as a pole at a different instant in time. The pole is being dragged by the lower side of the card, and the upper side is the side being dragged, as shown in this animation.

To make things more interesting, what would the cross-section of these cards look like when rotated about a horizontal axis? Each card would rotate to become a cone, so we would be left with a collection of nested cones that together form the surface of revolution of the tractrix.

This surface is called the pseudosphere, and it is a classic example of constant negative curvature (saddle-shaped curvature). What is cool is that we have built a surface with negative curvature out of many cones, which are intrinsically flat in the sense that they could be built from flat waffles to make waffle cones. This presents itself as a wonderful way to build a pseudosphere from paper: cut out a bunch of identical circles from paper, and roll them up into variously sloped cones, and then stack them from most shallow to steepest.

I calculated the optimum sizes of paper circles and cut them up and created a lovely model of this. It looks like a dunce cap with a very sharp point at the top. In reality, it goes infinitely far up, but I didn’t have enough time to build it that far. I did, however, have enough paper to build the infinite version, because it turns out that the surface area of the pseudosphere is finite despite its infinite extent, which is kind of cool.

The pseudosphere is a series of stacked cones, each with slightly differing slopes. The thing that I found particularly interesting about this model is that the cones have the interesting property that they can all be cut from equally sized disks of paper.

The following video is what this Pseudosphere model looks like in all its glory.