We've all seen those little plastic Zen rock gardens and we've probably all either given one out as a present or received one.But these trinkets have life-sized counterparts around the world, particularly in Japan and wherever Zen Buddhism is sold, er, practiced.

If you haven't had the opportunity to see one of these gardens, or their little trinket counterparts, they are basically dry and usually rectangular gardens with only sand or small grained rocks. You won't find tomatoes or zucchini grown in these things, just big rocks. The placement of the rocks is critical and very on purpose. Upkeep of the garden is usually limited to the straight and careful raking of the sand into a delicately straight pattern. The straight path of the rake should maneuver around the rocks to juxtapose with the rest of the garden.

A good formation of the rocks should attract many hours of meditating viewers.

By far the most famous of these gardens are the Ryoanji gardens amongst the Ryoanji temple in Kyoto, Japan. The most famous individual rock garden there is "The Dry garden of Ryoanji Temple," that was built in the 1480s and actually has a designated platform for meditation. This garden features the Karesansui, or dry landscape style. There are fifteen rocks of various sizes arranged in five distinguishable clumps around the garden. One peculiar aspect of the garden is that no matter where you stand, you can only see fourteen of the rocks. They say you have to imagine the fifteenth with your mind's eye.

Here's the basic shape of the garden with rock clumps ('o,' '0,' or 'O' depending on size of the clump and 'X' is the recommended viewing location).

------------------------------
| 0 |
| o 0 | | O | | O | | | ------------------------------
              X

For centuries, this particular garden has mesmerized onlookers, yet it has remained unchanged and is only raked for upkeep. Although no specific person is officially credited with it's design, many claim the famous monochrome artist Soami (1480?-1525) as the designer.

Although many attribute the captivation of this particular garden to the mystical elements of Zen Buddhism, a recent application of medial-axis transformation has opened the way to a neurological explanation for why the human mind fancies this garden and it's rocks so much. Medial-axis transformation is essentially the mathematical process that extracts the skeleton or simplest representation of a polygon. The medial-axis transformation of a polygon always comes out to be a tree, since the result is a connection of straight lines with simple connections. But the result usually does not look like a branching tree but instead a simple representation of the original data.

When Gert Van Tonder of Kyoto University performed medial-axis transformation on a basic map of the rock garden (using also the recommended viewing platform build by the original artist as one of the nodes), they found the result to be your typical branching tree. Since the human brain subconsciously picks up on this shape because of shape-sensitive neurons that spend all day firing when they pick up on essential visual shapes (lines, circles, squares, and supposedly simple branching shapes).

Repetitively staring at this same shape can be quite spiritual, if you misunderstand the mechanics of it. Either way, it's still pretty darn spiffy.