Making GIFs with Processing and GIMP

Use the saveFrame function in Processing to save frames, for example like this :

saveFrame("frame###.png");

Then import the frames as layers in GIMP, and export as .gif and as animation. You can choose the delay between frames there. There must be a more automated way to make gifs but this works and I’m fine with it.