ta-ra-ra-fourier
November 13, 2014 7:58 AM   Subscribe

Fourier synthesis and analysis on a mechanical, analog computer. Part 1. Part 2. Part 3. Part 4.
posted by DU (29 comments total) 69 users marked this as a favorite
 
I just watched the pixar Numberphile video. Then come here and see this.

13 year old Math Nerd Doug would loooove the future.
posted by DigDoug at 8:07 AM on November 13, 2014 [1 favorite]


Some EDM producer is trying to figure out how to make music with this right now. You can't get more analog than this.
posted by empath at 8:18 AM on November 13, 2014


Wow, this is great! Thanks DU.
posted by So You're Saying These Are Pants? at 8:26 AM on November 13, 2014 [1 favorite]


A hand crank. Pshaw. Let's see what this baby can do hooked up to a 420hp Rolls Royce Allison turbine at 22,000rpm!
posted by Slap*Happy at 8:47 AM on November 13, 2014 [3 favorites]


Let's see what this baby can do hooked up to a 420hp Rolls Royce Allison turbine at 22,000rpm!

You're going to need an extra few sheets of paper.
posted by DigDoug at 9:09 AM on November 13, 2014 [2 favorites]




Excellent.
posted by benito.strauss at 9:59 AM on November 13, 2014


This is fantastic. Thank you, DU and kliuless.
posted by I Havent Killed Anybody Since 1984 at 10:14 AM on November 13, 2014


hot as fuck
posted by Foci for Analysis at 10:48 AM on November 13, 2014


This is my favorite thing to learn about! I don't feel so alone anymore. All hail Lord Kelvin!
posted by Captain Chesapeake at 11:36 AM on November 13, 2014


Ok that was cool. And that BetterExplained site kliuless linked will be absolutely fucking invaluable to my budding 13yr math/science geek
posted by Chrischris at 1:20 PM on November 13, 2014


excellent, simple post.
posted by djseafood at 3:08 PM on November 13, 2014


Couldn't be that hard to build one...in LEGO even.
posted by johnnydummkopf at 3:18 PM on November 13, 2014 [1 favorite]


That bit where you draw the square wave on the rocker arms and the coefficients come out... That must be actual occult magic.
posted by Devonian at 4:42 PM on November 13, 2014 [2 favorites]


Yeah, that bit kinda stunned me as well. I've only just recently learned how to calculate/use FFTs, so I didn't quite get that part. Is it an "implementation" where the fft/ifft are symmetric?

Actually...it isn't technically an FFT. Is it some neat-o convolution thing?
posted by DU at 5:07 PM on November 13, 2014


Yep, that went by a bit quick and I was left grasping a bit. But the FT and the IFT are "almost" symmetric. If you look at Eq. 1 and Eq. 2 in this section of the Wikipedia article, where

Xk are the Fourier co-efficients, set by the amplitude bars, and
xk are the (heights of the) points on the output curve,

you can see that the procedure for going

from {Xk} -> to {xk}

is almost the same as the one for going

from {xk} -> to {Xk}.

You can summarize the relationship with the first equation here, where the section name, "Expressing the inverse DFT in terms of the DFT", kind of says it all.

The videos run a bit opposite from the way this is usually presented. He first assumes we know a bunch of co-efficients, use them to set the amplitude bars, and then generate the curve, which is Synthesis. Most descriptions start with assuming you have a set of values and give you a formula for computing the co-efficients, i.e. Analysis.

BTW, DU, the first "F" in "FFT" is just "Fast", and just refers to one particular (type) of algorithm for computing FTs, which I'm guessing you already know. I don't think anybody ever uses any other algorithms these days, so "FFT" has probably become the default name for any Fourier transform. If you've done like I did, and coded up an FFT/IFFT from a book, go back and look at your InverseFFT code. I'll bet it does something like
IFFT( array_of_ints x) {
      tweak_array( x )

      FFT( x )

      slightly_different_tweak( x )
}

i.e. you'll have used the FourierTransform to calculate its inverse.
posted by benito.strauss at 6:00 PM on November 13, 2014


I did know what FFT meant. I meant this wasn't that because it isn't doing the Fast algorithm, it's doing more of a parallel convolution thing with those twenty sinusoids all at once.

I think there are some formulations where the fft vs ifft actually is identical, because it's a 1/sqrt(N) or whatever in front of both, instead of 1/N in front of one and 1 in front of the other. But I'm not really sure how the sample size would work there.

I need to struggle with fourier more before I can really say much.

I put the book on my wishlist and I'm hoping it explains the math a little more in depth. (I could also read the PDF, but that would be peeking at my xmas present early.)
posted by DU at 6:07 PM on November 13, 2014


Neato! Many thanks for this!
posted by carter at 7:15 PM on November 13, 2014


Beautiful!
posted by Confess, Fletch at 7:34 PM on November 13, 2014


There is a subtle null zone in the middle of each of those swing arms, due to the fact that the center position doesn't actually go up or down as much (due to cosine errors)... which helps make the machine insensitive to small errors near zero in the coefficients...

I strongly suspect this is intentional, and a brilliant hack!
posted by MikeWarot at 9:12 PM on November 13, 2014 [2 favorites]


I just discussed the fft with an EE buddy here and we did some examples. Basically, for the functions Bill demonstrates here (real and even), fft(fft(x)) ~= ifft(fft(x)) * a constant. So that's why the analysis and the synthesis work the same way. Presumably anybody using the machine would know when to twiddle the numbers to make them work right.

As for the pen holder: Yes. I didn't think much of that either. The details of how to face the pen seem pretty irrelevant to any of the historical mechanics or underlying mathematics.

There is an actual history there for what they would have used. Steam engines had a way to attach some mechanics to the piston and a pressure gauge to chart a PV diagram. It could draw this on a flat board or a rotating cylinder with graph paper attached or whatever. They got pretty fancy, but I think they all used pencils.

Undoubtedly this used the same thing and Bill really only used a marker because it shows up on camera better. HOWEVER, Bill also uses the pauses to mark the cosine amplitudes during analysis, which a pencil wouldn't do. So maybe the original users would have had to do that a different way. Since the machine is marketed as an analyzer, presumably this would have been pretty high quality, relative to the rest of the machine. Like, I don't think the procedure would be "crank the handle two times and then estimate how high the pencil is." There must have been some way to measure that, similar to the rocker-setting stick.

I wonder if more parts are missing...
posted by DU at 6:29 AM on November 14, 2014


Just realized that if you use graph paper in the analyzer, the amplitudes become easier to measure AND you can build your "* a constant" into the calibration of the paper.
posted by DU at 6:37 AM on November 14, 2014


Yankee invention! Reminds me of those insightful Wikipedia visualizations such as Pi, and Circle Cos Sin, Pendulum, etc.
posted by xtian at 6:42 AM on November 14, 2014 [1 favorite]


Basically, for the functions Bill demonstrates here (real and even), fft(fft(x)) ~= ifft(fft(x)) * a constant.

I jammed two ideas together here. They are exactly equal if you use the constant.
posted by DU at 6:42 AM on November 14, 2014


Favoriting because of the post title. Part of me says that to RTFA might ruin the glory of the title.
posted by eriko at 7:04 AM on November 14, 2014


Just got mail back from Bill about missing parts. He seems to have misunderstood much of what I wrote, but the channel was clear enough that he confirmed my graph paper idea.

The title is nothing. You should definitely watch the videos.
posted by DU at 7:14 AM on November 14, 2014


I'm sure the felt tip pen was used to make video-friendly thick lines, and I also guess that they had a relatively high level of friction, which lead to a stick-slip that flattened out the peaks.

In junior high we had these weather recorders that drew a line on a rotating drum with a piece of graph paper, kind of like the way seismographs work, but with temperature instead of a jiggle detector. They drew with a very fine tipped stylus backed by a little reservoir of liquid ink. I've got to assume the original used something similar. Though I also seem to recall seeing a device where soot was deposited on to paper, and a recoding stylus scratched away its graph.
posted by benito.strauss at 8:02 AM on November 14, 2014


"All of nature is series and pivot." - Charles, not Jean-Baptiste Joseph, Fourier.
posted by 0rison at 5:04 PM on November 14, 2014


> Steam engines had a way to attach some mechanics to the piston and a pressure gauge to chart a PV diagram

Some diesels even had that: a spectacularly slow marine single-cylinder engine at Strathclyde plotted a perfect PV diagram on a little brass cylinder, and after some fiddling with a strip of paper, a pencil and a polar planimeter, you'd have the power output. All within about 800 revolutions of real time, too.

The original likely used pencil crayon stubs or those horrid scratchy ink-reservoir recorder pens. Candle-black on glass definitely could be an option: fragile, messy, but very low friction and easy to photo-reproduce with a lith film.
posted by scruss at 6:12 AM on November 15, 2014 [1 favorite]


« Older Dunkin’ and the Doughnut King   |   From the glamorous to the romantic to the unusual. Newer »


This thread has been archived and is closed to new comments