My friend Will posted a cool animation today:
It got me thinking about the lab we do with vibrating strings and I learned a couple of cool things.
First of all, his animation didn’t seem like what the lab looks like if you slowly increase the frequency of the driving speaker (which is tied to one end of the string). Will’s animation looked more like that end was a free end, so he and I had a nice twitter conversation about it. I finally got what he was doing when he posted
So I sent him a link to some stuff I’ve done in the past, but thought I’d try to make an animation where the speaker slowly increases its frequency. First I had to think about the mathematical function for the speaker that would represent a sinusoidal motion that speeds up. Here’s where my work in grad school with all kinds of temperal/fourier transform functions came in handy. It turns out that the instantaneous frequency for any function that can be written Sin/Cos/Exp[i … is given by the time derivative of the argument of the trig function. So, if I wanted a function that linearly increased the frequency, I just need to integrate my goal and I’d have the argument to feed into the code. So, here’s the code with some annotation
You can see that for the moment the code has no friction (because the effective is zero. That was my first thought to make this animation, but here’s the somewhat disappointing results
That’s when I realized that I needed to add some friction so that the energy stored in the earlier modes would be dissipated by the time the next mode comes around. That’s how I got this animation:
Of course, both suffer from a sampling problem, but you get the gist. I think it looks a lot like the lab, so that’s cool.
Thoughts? Here’s some starters for you:
- This is cool! What is the Mathematica command to make the animation?
- This is dumb. The strings in my lab don’t look like that at all. Instead . . .
- This is cool! Can you do the same boundary conditions as Will?
- This is dumb. The jerkyness of the animated gifs really bothers me. Couldn’t you just upload, I don’t know, the 3MB file with better temporal resolution? (ok fine, see below)