Java Myrioramas

 

A myriorama is a set of picture cards that can be arranged in a multitude of different orders to create various scenes, typically landscapes. Jean-Pierre Brès, a French children's writer, probably published the first version in the early 1820s, which he called a tableau polyoptique.

London-based artist John Heaviside Clark (aka "Waterloo" Clark) took up the idea, coining the myriorama name, and the publisher Samuel Leigh announced his "Myriorama: A Collection of Many Thousand Landscapes, Designed by Mr. Clark" in The Times on 17th April 1824. The set of 16 cards could be arranged to form various English landscapes (filled with Regency detail).

Clearly Leigh (or Clark) was no mathematician since the total number of possible scenes creatable with 16 cards is 16! (20,922,789,888,000) rather than "thousands".

[Myriorama cards]

In the standard history of the subject, Ralph Hyde called the myriorama the craze of the 1820s, not dissimilar to the Rubik's cube in the 1980s.

Leigh and Clark quickly released a second series in 1824, this time forming an Italian landscape from 24 cards (i.e. 620,448,401,733,239,439,360,000 permutations).

 

Myrioramas in Java

Myrio.jar automatically loads Leigh and Clark's English pictures, and randomly displays three:

[Myrio.java starts]

The user can press the left and right arrow keys to move through the scene, and the program loads new random images to extend the view:

[Myrio.java later]

It's also possible to start Myrio.jar with a different set of images by supplying their directory location as a command line argument. The image below shows Myrio loaded with Leigh and Clark's second series:

[Myrio in Italy]

Both sets were created from Wikimedia Commons pictures of the cards from the Bodelian Library in Oxford. More details are included in the readme files in the directories containing the images.

 

Modern Myrioramas

My tiny morsel of history about myrioramas may have given you the impressions that it's a craze that died out 200 years ago. That's far from true. For example, they make an appearance in Philip Pullman's "The Secret Commonwealth", the second novel in his "The Book of Dust" trilogy. Pullman also recommended them as a tool for inspiring writing in a BBC interview.

"Endless New York" by Mark Bischel is a set of 16 double-sided cards that create a panoramic New York night scene.

"Endless Journey" by Tom Gauld are 12 cards inspired by the works of Laurence Sterne.

The 20 cards in "The Endless Odyssey" by Sarah Young are based around themes from Greek myths.

The Magical Myrioramas series from Laurence King Publishing consists of three interesting packs:

 

Notes on the Implementation

The program consists of three classes: Myrio.java, MyrioPanel.java, and Tile.java. Myrio.java is a simple JFrame, and Tile.java stores a drawable image that can be moved left or right. The real 'meat' of the code is in MyrioPanel.java which treats a JPanel as a canvas on which to draw Tile objects and move them left or right when the user presses an arrow key.

The panel loads all the myriorama images as Tile objects stored in an array, but only uses five of them at any time. A usedTiles list stores the indicies of the array objects currently being employed. The list indicies are referred to by the names FAR_LEFT, LEFT, CENTER, RIGHT, and FAR_RIGHT.

[MyrioPanel Data Structs]

The trickiest aspect is updating the usedTiles list when the currently loaded sequence of tiles moves too far right or left. The figure below captures what happens in the "too far right" case.

[MyrioPanel Moving Right]

When the FAR_LEFT tile is about to move too far right, then a new Tile index is added to usedTiles as the new FAR_LEFT index value, and the old FAR_RIGHT index is dumped. The opposite occurs when the FAR_RIGHT tile is too far left.


 

Download


Dr. Andrew Davison
E-mail: ad@fivedots.coe.psu.ac.th
Back to my home page