XaoS is a fast interactive real-time fractal zoomer/morpher, written by Jan Hubička and Thomas Marsh in 1996.
For about two decades it has been further developed by a group of contributors. Recently,
two Google Summer of Code projects (see a
2020
article and a
2023
announcement) added new features to the program.
In this short post two items are introduced, added to XaoS during the last days. First, the web version of XaoS is available at
xaos.app. This is a short URL, it is hopefully easy to remember and use.
Second, direct commands to XaoS can be added to this URL by extending it with a
? and putting
the commands in parentheses. Example:
xaos.app?(formula 'mandel3)(maxiter 10)
– this immediately shows the cubic Mandelbrot set and sets the maximal iteration to 10.
It is important here to point to the documentation of the accepted commands. Basically, these are the same commands
that are used in the XaoS input files (
*.xpf). They are simple text files. A large collection of them is available in
the source code of XaoS (see the
examples folder),
but they are also included in the
binary releases for all platforms.
Here is one example, one of Jan's first artworks, the file
edge.xpf.
It consists of the following commands:
- The first three lines are comments, they begin with ; – they can be ignored now.
- (initstate) resets all settings. Since we start the program without any special settings, this can be skipped, too.
- (filter 'edge2 #t) enables the second edge detection algorithm. This is important for us.
- (palette 1 863910123 0) sets the palette based on a random number seed. This is important for the needed effect.
- (formula 'newton) sets the Newton fractal to be displayed. Very important.
- (outcoloring 1) sets the outside coloring mode to 1. It has little effect in this example, so we can skip this.
- (view 0 0 2.5 2.5) sets the bounding box for the view, but this is the default, so we can skip this, too.
So we can use the URL
xaos.app/?(filter 'edge2 #t)(palette 1 863910123 0)(formula 'newton)
to quickly create the expected artwork.
Why can this be useful? For textbooks or tutorials on fractals this can give a simple way to point
to a zoomable version of the fractal.