The Mathematica Journal
Download This Issue
Feature Articles
Graphics Gallery
Tricks of the Trade
In and Out
The Mathematica Programmer
New Products
New Publications
News Bulletins
Editor's Pick
Write Us
About the Journal
Staff and Contributors
Back Issues

Ulysses: Sand As Medium

Volume 7, Issue 3

Jean-Pierre Hébert

Download the article as a Mathematica notebook

Sand animations:
As Time Goes By  (2.9 MB)
Carpe Diem  (2.8 MB)
Well Tempered  (4.9 MB)

Alfred Gray's Ellipse with tangent lines and two stonesThe pictures included in this Graphics Gallery are an introduction to the relief drawings traced in the sand by Ulysses, an installation which I built and displayed at the Siggraph'99 Art Gallery. Ulysses renders mathematically inspired designs by use of a computer driven magnet rolling a ball through a sand table. 

Description of the Installation

Ulysses is mostly meant as a live installation, and is certainly at its best when one can see its progress on the sand. The included illustrations are only photographic stills of the sand tracings. They can only capture part of the aesthetics of the project: what is missing is the surprise, the expectations, the feelings elicited by the motion, the activity of the ball, the plasticity of the sand, the exacting development of the tracing.

Two stones with radial lines Ulysses is built on a light wooden frame supporting a flat plate holding the sand. Underneath, a mechanical table carrying a magnet is set in motion by two daisy-chained, brushless servo motors connected to the computer by a serial cable. The Animatics "Smart" motors have their own command language and interpreter. A driver translates the tracings geometry into motor instructions, polls the motors' feedback, controls communications and provides a graphical user interface. I wrote it in Tcl/Tk and it runs off an SGI O2, the same computer that I use to develop my Mathematica designs on.

A digital camera is connected to the computer to survey the sand on demand and can be set to interact with the process. As the ball moves through the sand from the magnet pull, it rolls and does not slide. Its speed fluctuates as periodically the sand is first compressed and then gives in, freeing the ball to jump ahead. The velocity may be set to average from .5 to 5 cm/s.

Alfred Gray's Ellipse with normal lines, modifiedThe problems of servo motors with very low speed, i.e., movements parallel to the axis, are solved at the driver level. Scaling is also involved. An interesting difficulty, not solved yet, is to correct at the path level the flexibility of the magnetic bind which causes the ball to cut corners. David Bothman helped with engineering pointers and useful conversations.

Rendering of Sin[x+y+Sin[x]+Sin[y]], warpedFollowing the progress of a tracing for a full performance, or now and then observing a tracing from different angles, and coming back for the surprise of a new design makes the Ulysses experience. One can interact by direct sketching, wandering through mazes, playing with algorithms, choosing patterns from a library, placing rocks, setting lights. Photographing for The Mathematica Journal, I chose patterns from my collection saved on disk and let Ulysses render them in the sand in a couple of hours or less.

The wildest functions can be fascinating, but the simplest lead to very quiet and beautiful effects, with rendering bringing diversity and subtlety. With the bas-relief effects of sand, a function as simple as Sin[x+y+Sin[x]+Sin[y]] produces wonders.


From conception to a sand trace, the process is as follows:

Alfred Gray's Curve whose curvature is s J0(s)

  • The piece foreseen must be thought as one line: the ball can backtrack but not levitate off the sand... yet. The inspiration for it can come from all the walks of life, art or mathematics (see illustration captions).

  • The geometry of the line is first coded in Mathematica, to produce a set of coordinates. Packages by Alfred Gray, Tom Wickham-Jones, Roman Maeder and others were useful, as were some of the published Mathematica literature and code. These were also an inspiration to develop a full library of personal geometric extensions over the years, allowing me now to compose designs rapidly and with a reasonable amount of effort.

  • Mathematica is a convenient design language for dialogued geometric compositions. My mind works well in the context of interpreter shells, scripting, and visual feedback. As the sand tracings are concerned, the standard visualization tools need to be complemented by imagination and practice: the sand is a very different and variable medium, not controllable through PostScript alone.

  • The driver is fed coordinate lists from disk. These in turn are either produced directly, or by a filter which strips Mathematica Graphics data structures from extraneous information.

    Aegean Pentagons with one stone
  • Things have to be planned with the perspective of lights and shadows, a whole area for which I have no software (although I have used Larry Gritz's Blue Moon Rendering Tools on RenderMan output produced by Geomview, installed as Graphics default resource).

  • There are interactive situations where one first places stones on the sand in the spirit of the stone gardens. The camera image of the sand is first interpreted to find where the stones are. The original line geometry is then altered to leave room for the stones and have the ball slalom safely around them.

  • Interestingly, the motors can be driven from position data, but also from speed or acceleration. This opens possibilities for many non-intuitive explorations with Integrate and D.


Alfred Gray's Modified Clothoid with curvature s+Sin[s] I have a taste for quietness and beauty, for simplicity and depth, for rich effects of lights and matters enjoyable from a wide range of distances and angles. I find that mathematics can create the motifs, the compositions and the multiple depths of texture that allow these criteria to be met. I find also that helped by natural elements like sand, water, light, shadow, wood, and stone, our eyes and brain can be stimulated and satisfied to the extent of their capacity, without the dryness and the bandwidth constraints of the digital world closing in on us.

Hence my interest in blending mathematics and natural elements in my work. Nature contributes to the work as it multiplies the effects of the simple instructions provided to the ball for its movement. Better and faster than any computer, Nature can figure out how to show the 10^10 grains of silica on Ulysses. Knowing all about gravity, soil mechanics, and light propagation, Nature applies them in real time, with a shadow here, a twinkle there.

Alfred Gray's Curve whose curvature is s J0(s)Someone once asked why these mathematical patterns imposed on natural materials have such sympathy with shapes and surfaces that occur naturally. I guess I am lucky, or Nature read about Ilya Prigogine and Benoit Mandelbrot. Seriously, in a simple regular pattern devoid of human noise, Nature can express itself beautifully. It has a sympathy with mathematics.

A selection of works by other artists illustrates this interaction of mathematics and natural elements in art:

  • Mauro Annunziato: Chaos Revenge (Siggraph'99 Art Gallery): organic depth and diversity.

  • Carl Cheng: Friendship Acrobatic Troupe (SF Exploratorium): water and air bubbles.

  • Helaman Ferguson: Costa's Surface and Four Canoes: from transient snow to billion year old granite.

  • Haruo Ishi: Hyperscratch 9.0 (Siggraph'99 Art Gallery): sounds from chimes and light.

  • Yuki Sugihara: Water Display (Siggraph'99 Emerging Technologies): water veil.


Alfred Gray's Curve whose curvature is s J0(s)I was inspired to work in "digital sand" by the traditional Japanese Zen gardens (Ryoanji, Daitokuji, Ryosokuin, Daisenin, etc.), Tibetan mandalas, Navajo paintings and by more recent work by Andy Goldsworthy and Michael Heizer, all who have found their expression in sand.

My interest in using computers for art is twofold. First, they answer my mathematical inquiries, free my imagination, and express and evolve my designs. Second, they set devices into motion in the physical world, which create or animate objects and images that are my work. The latter extends my skills and thus empowered my mind can ask what my hands alone could not do.

Aegean Pentagons with one stoneAlthough a computer is involved in the creative process, this work is nothing but a tribute to and a continuation of thousands of years of drawing, geometry, and fine arts by civilizations past. In fact, computer as a tool fades entirely behind the aesthetic and spiritual concerns that art as mathematics builds upon.


  • "Concerning the Spiritual in Art" by Vassily Kandinsky (1912)

  • "The Mathematical Approach in Contemporary Art" by Max Bill (1949)
    (review "Werk" Nr.3, 1949, Winthertur) (available at

  • "Zen and the Fine Arts" by Shin'Ichi Hisimatsu (Kodansha, 1971)

  • "The Ocean in the Sand - Japan: From Landscape To Garden" by Mark Holborn (Shambhala, 1978)

  • "Designing the Earth - The Human Impulse to Shape Nature" by David Bourdon (Abrams, 1995)

About the author

Jean-Pierre Hébert studied engineering in Paris and is an independent
artist living in Santa Barbara, California. His interests range from
works on paper to mixed media and installations. His gallery on the
web is located at He can be reached at

Contents copyright 1999 © The Mathematica Journal and Jean-Pierre Hébert