Sandpiles Java App

As a 2009 Google Summer of Code project, Bryan Head created a sandpile application for displaying and analyzing the Abelian Sandpile Model on finite directed multigraphs. His mentor was Reed College professor David Perkinson and the mentoring institution was Portland State University. The two images above are snapshots of the program in action. The first is a 2D rendering (with heights encoded by color) and the second is a (projection of a) 3D rendering of a sandpile.

Download links
linux 64bit, linux 32bit,
MacOSX, MacOSX ppc,
Windows 64bit, Windows 32bit.

Download instructions: To download the latest version of the program click on one of the links above. (Alternatively, go to the program's github repository and hit the download button.) After unzipping or untarring, change into the directory matching your system and double-click on SandpilesApp.jar or issue the command java -jar SandpilesApp.jar. Linux users may need to add the current directory to the library path for java: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:., including the trailing period. (One could also add the full path to the SandpilesApp.jar directory.).

Features
  • Graph options: grids and honeycombs with various boundary conditions are built-in; access to arbitrary graphs via a built-in graph editor or a Sage interface (see below).
  • Built-in sandpile configurations: identity, maximal stable configuration, all-ones configuration, minimal burning configuration, random.
  • Operations on configurations: add sand by clicking, add random sand, find the inverse, find the equivalent recurrent configuration, add sandpiles, etc.
  • 2D and 3D visualizations. Visualize by height, by total number of firings, or by stability.
  • Fast! OpenGL for fast rendering; fast parallel update algorithm; takes advantage of graph adjacency structure to decrease memory footprint and increase performance.
  • Interfaces with the mathematical software Sage (see below).

Getting started
After starting SandpilesApp.java as described above, try the following:
  • Click on the Make Grid tab.
  • Click in the display window (black square) to place the grid. (You can click-and-drag the grid.)
  • Click on the Config Manager tab.
  • Click on Max Stable and click the Add button to add 3 grains of sand to each vertex of the grid.
  • Click on Ones Everywhere and Add so that there are now 4 grains of sand on each vertex. Hence, every vertex is unstable.
  • Click on Run to start the stabilization process.
  • To see the sandpile in 3 dimensions, click on the Visual Options tab (you may need to scroll the tabs by clicking on an arrow if the tabs are not all displayed at once). Then click the 3d button. (The first time the button is pressed, there is a delay while a triangulation is calculated.) I would suggest setting Color Smoothing to 0 and Height Scalar to 6. You can grab and reorient the sandpile to change the viewpoint. Note: to create new graphs, make sure you are in 2d mode.

Sage
The application can interface with the mathematical software Sage. To use this feature, download SandPyle-Remote. Read the file for documentation. After starting Sage, get started with sage: %runfile SandpileRemote.py
(You may need to give the full path to 'SandpileRemote.py'.) Within the Sandpiles application, hit the "Server" button and press 'yes'. The Sandpile application will inform you of the connection. Then, from Sage, create an instance of the SandileRemote class and connect to the program: sage: srem = SandpileRemote() sage: srem.connect()
At this point, typing srem., including the period, and hitting TAB will list the names of the available methods.