{ End Bracket }

Turning the Pages with WPF

Tim Sneath

The Great Library of Alexandria was founded in 300 B.C.E. with the grand objective of collecting the world's knowledge in one place; at its height, the library contained nearly 750,000 scrolls. In the modern world, the British Library contains one of the foremost collections; among its twenty million books and manuscripts are some of the rarest works in existence. It holds the Diamond Sutra, the oldest printed book; Mercator's first atlas of Europe; the Lindisfarne Gospels; Leonardo da Vinci's personal notebook; the Magna Carta; and the Codex Sinaiticus, one of the two earliest Christian Bibles. Such unique items must, of course, be treated with the utmost care. If they are on public display at all, they are well protected behind glass, and direct interaction is limited to a handful of individuals.

Happily, these works are now being digitized for the first time in order to reach a broad audience. Even better, the digitized versions are being turned into a rich interactive experience that adds curatorial content and brings the books to life. In collaboration with a UK-based software developer, the British Library developed a Windows®-based application called Turning the Pages that offers a virtual facsimile in three-dimensional space of a growing number of the library's most precious items (see www.bl.uk/onlinegallery/ttp/ttpbooks.html). Using this application, you can open a book on your desktop and turn each page almost as if you held the book in your hands.

Digitizing these works presented some interesting challenges. Due to the books' fragility and value, each page needed to be scanned using a specialized offset camera that could capture an image without any risk of damage to the item. A curator was then filmed physically turning the pages of each document to create a reference for the virtual model; as you might expect, a heavy vellum page from an eighteenth-century book does not move in the same way as a paper page from the seventeenth century. Such attention to detail is central to creating an experience that feels authentic.

  (Click the image for a larger view)

One feature in Turning the Pages that always generates a reaction is the specular materials used to bring out the gold leaf on the many illuminations that decorate the pages of works like the Sherborne Missal, a fifteenth-century prayer book. As the page is turned, suddenly the light will catch part of the illustration such that it takes on a brilliant radiance.

Turning the Pages is implemented using the 3D class libraries in Windows Presentation Foundation, which in turn are an abstraction of DirectX®. Each page is represented as a geometry mesh, onto which one or more image materials are applied. Images are stored using the HD Photo format for high quality at a given compression rate; for those books that require specularity, a second image is also used for each page that contains a monochrome mask so that only the areas of the page illuminated in gold leaf are reflective. Lastly, frame-based callbacks manually deform the geometry model to create the page-turning effect on a mouse click.

As an evangelist for client platform technologies, I love to see people building great user experiences. The Web has proved a powerful influence in software development: it democratizes the content creation process, it provides new ways for companies to monetize their software, and it provides a friction-free distribution model that allows for minor updates to be made without redistributing an entire application.

But to achieve those advantages, we have been prepared to sacrifice the ability to take full advantage of the tremendous latent power that is available in every personal computer. We need a set of tools more powerful than HTML and CSS so that we can build applications that aren't constrained by lowest common denominator limitations and so that developers and designers can collaborate to deliver user interfaces that are better representations of the environments they model. Applications like Turning the Pages, delivered over the Web but taking advantage of WPF for display rendering, are interesting as an example of how these two worlds are colliding. Over the next few years, I believe we will see huge transformations in the software we use as developers figure out how to offer richer Internet-based interactive applications.

Tim Sneath is the Group Manager for the Silverlight and WPF Technical Evangelism team at Microsoft. His mission is to see developers create stunning applications built on the Microsoft platform and to persuade his mother that computers aren't out to get her.