“You’re sayin’, Sy, no matter what kind of wave we got, we can break it down by amplitude, frequency and phase?”

“Right, Vinnie. Your ears do that automatically. They grab your attention for the high-amplitude loud sounds and the high-frequency screechy ones. Goes back to when we had to worry about predators, I suppose.”

“I know about music instruments and that, but does it work for other kinds of waves?”

“It works for waves in general. You can match nearly any shape with the right combination of sine waves. There’s a few limitations. The shape has to be single-valued — no zig-zags — and it has to be continuous — no stopping over here and starting over there..”

“Ha! Challenge for you then. Use waves to draw a camel. Better yet– make it a two-humped camel.”

“A Bactrian camel, eh? OK, there’s pizza riding on this, you understand. <*keys clicking*> All right, image search for Bactrian camel … there’s a good one … scan for its upper profile … got that … tack on some zeroes fore and aft … dump that into my Fourier analysis engine … pull the coefficients … plot out the transform — wait, just for grins, plot it out in stages on top of the original … here you are, Vinnie, you owe me pizza.”

“OK, what it it?”

“Your Bactrian camel.”

“Yeah, I can see that, but what’s with the red line and the numbers?”

“OK, the red line is the sum of a certain number of sine waves with different frequencies but they all start and end at the same places. The number says how many waves were used in the sum. See how the ‘*1*‘ line is just a single peak, ‘*3*‘ is more complicated and so on? But I can’t just add sine waves together — that’d give the same curve no matter what data I use. Like in a church choir. The director doesn’t want everyone to sing at top volume all the time. Some passages he wants to bring out the alto voices so he hushes the men and sopranos, darker passages he may want the bases and baritones to dominate. Each section has to come in with its own amplitude.”

“So you give each sine wave an amplitude before you add ’em together. Makes sense, but how do you know what amplitudes to give out?”

“That gets into equations, which I know you don’t like. In practice these days you get all the amplitudes in one run of the Fast Fourier Transform algorithm, but it’s easier to think of it as the stepwise process that they used before the late 1960s. You start with the lowest-frequency sine wave that fits between the start- and end-points of your data.”

“Longest wavelength to match the data length, gotcha.”

“Mm-hm. So you put in that wave with an amplitude near the average value of your data in the middle art of the range. That’s picture number 1.”

“Step 2 is to throw in the next shorter wavelength that fits, right? Half the wavelength, with an amplitude to match the differences between your data and wave 1. And then you keep going.”

“You got the idea. Early physicists and their grad students used up an awful lot of pencils, paper and calculator time following exactly that strategy. Painful. The FFT programs freed them up to do real thinking.”

“So you get a better and better approximation from adding more and more waves. What stopped you from getting it perfect?”

“Two things — first, you can’t use more waves than about half the number of data points. Second, you see the funny business at his nose? Those come from edges and sudden sharp changes, which Fourier doesn’t handle well. That’s why edges look flakey in JPEG images that were saved in high-compression mode.”

“Wait, what does JPEG have to do with this?”

“JPEG and most other kinds of compressed digital image, you can bet that Fourier-type transforms were in play. Transforms are crucial in spectroscopy, astronomy, weather prediction, MP3 music recordings –“

Suddenly Vinnie’s wearing a big grin. “I got a great idea! While that Klingon ship’s clamped in our tractor beam, we can add frequencies that’d make them vibrate to *Brahms’ Lullaby*.”

“Bad idea. They’d send back Klingon Opera.”

~~ Rich Olcott