A blog for fans of Bananagrams, word games, puzzles, and amazing things

Saturday, August 6, 2011

The Bananagrammer Equation

A warning to regular readers: This post is not about games nor about words. It is about math and bananas.

Recently the "Batman Equation" has been memetically propagating around the Internet.

The equation represents the outline of the Batman logo. It is apparently the work of a user on Reddit.

I liked it enough to try to make my own. There are a few tricks to this process. First break the shape up into curves that you can easily write equations for, of the form f(x,y)=0.
Then, to make the curves stop at the desired end points, add in terms like the ones you see under the square roots. They evaluate to either 1 or -1, depending upon the grid position; when this value is negative, the square root is no longer real, and the plotting program will not plot anything. Finally, multiply all the equations together, and you get one big long equation:

(This is a cleaned-up and slightly approximated version of the equation I used for plotting.)

The final plot looks like this:

If I stay there can be no party. I must be out there in the night, staying vigilant. Wherever a party needs to be saved, I'm there. Wherever there are words that need anagramming, I'm there. But sometimes I'm not because I'm out there in the night staying vigilant, watching, lurking, running, jumping, hurdling, sleeping. No, I can't sleep. You sleep. I'm awake. I don't sleep. I don't blink. Am I a bird? No. I'm a banana. I am Bananagrammer. Or am I? Yes, I am Bananagrammer. [applies chapstick]

It is remarkable how well a single ellipse traces out the outer edge of a banana silhouette. I checked a couple of other bananas, and they also have this property. I finally went to a grocery store and sifted through all their bananas to find the least elliptical one I could:

From the red sample points along the edge, I found that even this banana was almost well-approximated by an ellipse.

It is the first three data points that make this an exception to Bananagrammer's First Law of Bananas:
The outer edge of the longitudinal section of a banana follows an elliptical path, with the banana's stem being roughly on the end of the ellipse's long axis.

The question to ask at this point is, "Why are bananas shaped the way they are?". The simple answer is that when a bunch of bananas start growing on a tree, they are initially pointing more down than up. As they become larger, they curve up toward the sun. A banana's exact shape will therefore depend on where it is with respect to its neighbors.

A full explanation of why bananas are so elliptical will require more investigation. People who want to give me research grants are welcome to do so. Actually, everybody is welcome to do so. To everyone else, tune in next week. Same Banana-time, same Banana-channel!