This post is a continuation of this one, where we computed our first example with xlab. We are going to save an experiment in a .xlab file and reopen it.

1. Make your own example

Open access to X and run an XLab container with a mounted shared/ directory.

Compute the Enneper example:

xlab --compute --gui=gtk xlab/experiments/minimal/enneper.xlab

Let’s modify this surface. Select the node “ComplexVectorFunction1”, access Controls on the left panel and change the Text from {z,1} to{z^3,1}. Press Enter. Most of the nodes should turn red. Right click on the SurfaceWriter node and select Compute. Look at the surface: we need a finer domain. Select the SimpleTriGrid node and change the CountMultiplier from 1 to 5. Press Enter, some nodes should turn red. Right click on the SurfaceWriter node and select Compute. Look at the surface: it’s much better.

2. Export your data

If you exit the container now, you will lose the work you’ve just done. So right click in the background of the node panel and select Write. Save your work in the shared directory “/shared/my-surface.xlab”. Exit the container, close access to X, and take a look at the file shared/my-surface.xlab: it is basically json, so you can also modify it from a text editor.

3. Re-open your data

To read your data, open access to X, run an XLab container and compute your example:

xlab --compute --gui=gtk shared/my-surface.xlab

You can now read the contents of the examples section (to come).