Tuesday, November 2, 2010

Alternate Dimensions

If you are my friend, which these days is defined by whether or not we are "Facebook Friends," then you may have seen this suspicious photo on my "wall" or "muro" if your Facebook is in Spanish like mine.
Here I mention a supposed "Discrete Fourier Transform." If you don't know what a Fourier Transform (FT) is, the most important thing to know is that it's pronounced For-yay. The second most important thing to know is that it's cool and gets all sorts of engineers and scientists excited. If you read my note way back when about shadows and projections, then you saw how nerdy I got about them. Well if you think projections are exciting then you'll think FTs are even more exciting...because, well, they are a kind of projection.

A shadow is a position projection. If you look at your shadow, it gives a half way decent description of the position your body is in. You can at least tell that you're standing. It may be missing some information, but it takes the real position of your body and projects it onto a horizontal plane.

A Fourier Transform is a frequency projection. It takes something with lots of frequencies and projects them onto reciprocal space. This tells you how much of each frequency is in the signal.

If you speak into a microphone, then your voice most likely has several frequencies in it. Try saying "Red Rum" in the same way that creepy kid in The Shining says it. His scratchy voice has lots of frequencies in it. Some low pitches and some high pitches. If you're singing (assuming you're a half-way decent singer), then the majority of the frequencies are sitting at whatever pitch you're singing. If you sing an A, then you could take the FT of your voice and it would tell you that there is a strong signal at a frequency of 440Hz. Unless your voice sounds a lot like a tuning fork, then it will have some other frequencies in it. Mostly random vibrations caused by your throat and mouth and lungs and who knows what else. Hopefully this explains what a FT is well enough.

The reason I get excited about Fourier Transforms (and other transforms) is that it's like exploring a new dimension! I mentioned that a FT projects a signal into Reciprocal Space. Reciprocal space is another set of dimensions where you can walk around, but instead of walking from position to position, you walk from frequency to frequency.

Now, your voice is a one dimensional signal. It just oscillates the paper in the microphone back and forth, so basically between -1 and 1 on a number line. The reciprocal space of a microphone vibrating is just a line. If your friend was singing into the microphone and you were walking around it's reciprocal space you would see it get really bright at whatever frequency she was singing at. All the frequencies would just fall along one line.

Now, if you took a picture of your pet cat, like the stray that my friends at the Den adopted for a day (hopefully she's gone by now), you would have a 2 dimensional signal. Pretend you were feeling artistic and made the photo gray-scale. You could look around the picture and see that some locations are brighter than others. Even though this signal is a picture, you can still think of it as a signal with lots of frequencies. Instead of the vibration of air, the image's frequencies are determined by how the brightness changes as you go across the picture. So if you have a 2 dimensional signal like an image, then you can take a FT of it and it would give you a 2 D reciprocal space that describes the frequencies in your signal.

Well, I was feeling particularly adventurous and did that with that picture of that cat at the top. There's a very pretty gray-scale photo of the cat followed by a painfully boring image that is it's FT in reciprocal space. That's right, ladies and gentlemen, that second picture is what a cat looks like in reciprocal space. I imagine it's pretty hard to tell the difference between a cat and a dog in reciprocal space.

You may say, Holy cow that's boring, but how on earth could you get back to normal space after getting transformed into reciprocal space? All you have to do is have someone take an Inverse Fourier Tranform and you're back in normal space. If you look at the top you see that the Inverse FT photo looks a lot like a possessed cat. The only reason the colors are inverted is because Mathematica wasn't consistent in its conventions. If it did the IFT correctly, it would have returned a normal looking picture of a cat. So you now know how to travel to this ultra-boring reciprocal space and then return back to normal space when we're talking about 1D or 2D. I just think it's pretty crazy that the cat turns into something as boring as that middle picture and it still has the same information that it originally had. P.S. the reason why there's no loss of information in this projection is that a FT takes an infinite number of projections and puts them together.

3D Fourier transforms are also possible. It's just like 1D and 2D only everything isn't infinitely narrow or infinitely flat. One very interesting application of 3D Fourier Transforms is X-ray diffraction, which can be used to shoot x-rays at a grain of salt and verify that it is indeed salt without even having to taste it. Most people in the world would just taste it to find out that it's salt, but engineers and scientists like to make things more difficult than they need to be. So they shoot x-rays at it to figure out its crystal structure. Just like sound and images, you take take a FT of a crystal lattice and it gives you a 3D reciprocal space that also looks like a crystal lattice, just a different structure. If you shoot x-rays at a crystal, then the x-rays diffract off the crystal and spread out in their frequencies. Depending on the crystal structure, different frequencies of x-rays will diffract to different locations. When you detect different frequencies of x-rays at different locations, you're basically measuring something very similar to the crystal lattice's Fourier transform and you're looking at it in reciprocal space. Then if you take the IFT of this diffraction then you can figure out that salt has a crystal structure of face-centered-cubic. (Molecules forming the corners of a bunch of cubes with an extra molecule at the center of each cube face).

You may think this was incredibly boring, but this is basically why engineers and scientists think that Fourier Transforms are so great...Travelling to alternate dimensions.


  1. Hey Man how's it going? your theory sounds really interesting. Why do they use 440 hz for A instead of 422, which was used by mozart. Found this crazy info online. what are your thoughts on this? do the frequencies really have an effect on consciousness?


  2. Thanks. I don't know for sure why 440Hz was chosen. It's a completely arbitrary choice though. Somebody probably just chose a random pitch, measured its frequency, then rounded it off to the nearest easy-to-remember number. It's arbitrary because you could choose whatever frequency you wanted for A and as long as you scaled the frequencies of the other notes appropriately, nobody (except the crazies) would know the difference. The only thing that really matters is relative pitch.

    I'm all for making a musical revolution and switching back to 422. Mozart was a genius and he wrote many of his songs when he was ridiculously young. He probably has a reason he chose 422.

  3. Frosthelm,
    Sorry, I prematurely responded to your comment before even reading the abstract of that article. I'd believe it if certain frequencies have an effect on your mood. I've heard that you can play really really low notes in a movie theater to make everyone feel just a little bit nauseous. I only read the abstract, but I'd guess it has something to do with resonant frequencies of different organs. And it makes sense because we all like sitting in a rocking chair, rocking at 0.5Hz, but rocking at a faster pace is going to feel different and depending on the amplitude and frequency it may or may not feel good.

    It would be a very interesting, yet very difficult study (in my opinion) to see how acoustics affect people.