With the advent of v7.0 of Xppaut, it is now possible to dynamically create graphics and export the results to image files during a batch run or using the command line interface. In this tutorial we will show how to use Snifflib's Xppaut interface to publish a flipbook style animation to the web. For the purposes of this demonstration we'll be using a Groovy script, but you can use similar syntax in your own JAVA or MATLAB programs (Note: To review these various approaches see Basic Usage).
To get started, be sure you have Groovy installed on your system and that you have placed a copy of the lastest Snifflib library (.jar) into your ~/.groovy/lib folder. Then, open groovyConsole and enter the following commands.
View the resulting animation here. (Note: May appear slowly in some browsers.)
In the above code, the line
extracmds = new String("-silent -quiet 1 -mkplot -plotfmt svg -ncdraw 1 -dfdraw 3");
tells Xppaut to export graphics and that the exported file format should be SVG. (Note: The other currently supported option is ps which produces postscript.) Nullclines will also be automatically determined (if possible) and a direction field representation generated. The possible options for dfdraw and their meanings are
The number (density) of the direction field can be controlled by setting the dfgrid @-option in lecar.ode file or, more permanently, in your .xpprc file.