Generative Art with Haskell
In getting ready for RC, I’ve resurrected and old
generative art repo which sets up a stack project
for the artwork described in the post by Benjamin Kovach. I had some trouble building it, despite the fact
that all the standard code for stack
was in the repo.
I had forgotten that the C library Cairo had to be installed
separately, and that one had to have created the directory
images/example_sketch
. If these are not done in advance,
you will get difficult-to-understand (for me) errors when
you do stack build
or stack run
. The moral of the story:
always document the setup process in the README! That
info is there now.
If you clone the repository and follow the directions, you should produce an image like the ones below. Note how one can change the character of the work by change the parameters. Version 1 uses the original parameters in Kovach’s code. The parameters in version 2 were arrived at by experimentation with both color and the size of the squares. I also used a color picker. The plan is to use this as a starting point and study piece for producing something original and quite different. But I first have to understand how images are generated using Haskell.
Version 2
Version 1