Chocked with interactive photos, animations, song and text, "The Elements: A Visual Exploration" for the iPad has been hailed as the future of digital books.

But to understand the future, sometimes it helps to look at the past. Though the app itself took six weeks to develop, its genesis began eight years ago. This is the story of how a wooden conference table in Champaign, Ill., turned into a iPad phenomenon.

As with many great ideas, this one was purely accidental, according to Theodore Gray, the co-writer of "The Elements." Three unrelated things happened to Gray in 2002.

One, he was momentarily confused while reading "Uncle Tungsten" by Oliver Sacks. In the book, Sacks said he liked to visit the periodic table in the Kensington Science Museum. Gray thought it was an actual table, but soon realized it wasn't. Two, his start-up company needed a conference table, and he was loathe to spend thousands on "one of those expensive ugly ones from the office supply catalogs." Three, he had just purchased for $50 a used industrial engraving machine.

Gray proceeded to spend countless hours creating a conference table that would be a physical embodiment of the periodic table. It's actually a collection of more than 100 carved wooden boxes, each representing an element. Over the years, he collected samples of the elements to tuck inside the boxes. You can read an extensive account here.

Then came the photos. Gray started snapping pictures of the samples and posting them online. BBC documentary filmmaker Max Whitby joined him in the project, and, later Nick Mann. Together, they took about a million photos -- so many that they wore out several professional cameras in the process. The images are posted on a website, PeriodicTable.com.

This website turned into a coffee table book in October, "The Elements: A Visual Exploration of Every Atom Known in the Universe," published by Black Dog & Leventhal.

In January, when Apple announced its iPad, it took Gray all of "30 seconds" to think about whether he should drop everything he was doing to turn his table-cum-book into an iPad book. Six weeks later, Gray, Whitby and Mann had a digital version of the book as an interactive romp through 118 chemical elements, from hydrogen to lawrencium. The book lets readers use their finger to rotate the images of each element for a complete 360-degree view and browse through breezy descriptions and assorted trivia.

It dazzled iPad owners, including actor and patron saint of geeks Stephen Fry, who tweeted that it was the "Best App of all." Gray said he's sold more than 20,000 copies of the book for the iPad, not a bad number given that there are only 500,000 of the devices in the market.

The entire journey, from wooden table to iPad book, occurred as a hobby for Gray, whose day job is software developer and co-founder of Wolfram Research. He also writes a column for Popular Science called "Gray Matter."

When asked whether he considered "The Elements" a website, an app or a book, Gray said, "It's something you read. It has a beginning and an end. It has all these things that are satisfying about books. But at the same time, it's not limited by the concept of paper."

Whatever you call it, Gray believes the project provides a blueprint for other digital books. Two weeks ago, he, Whitby and scientist Stephen Wolfram founded TouchPress, a digital book publisher dedicated to "living books that define the future of publishing."

-- Alex Pham

Follow my random thoughts on games, gear and technology on Twitter @AlexPham.

Photos: Screen shot from the iPad book "The Elements: A Visual Exploration" (top), and Gray's handmade conference table (lower right). Credit: Theodore Gray.

