This is an introduction to producing generative art using the Processing language. I had a brief fiddle around with Processing a while ago, and produced a little app for playing around with the superformula; I read this book to see how Processing is used for art. Processing was invented to be an “easy” language for artists to learn. In its original form, it is based on a stripped down version of Java. I discovered with a bit of Googling that there is also a Python Mode available, which I find preferable.
The book has an introduction to generative art, and introduction to Processing (Java Mode), and three example sections on its use for art: emergent swarming behaviour, cellular automata, and fractals. There are lots of good examples to copy and modify, and also lots of pictures of somewhat more sophisticated examples of generative art.
There is a lot of emphasis on adding noise and randomness to break away from perfection: [p51] There is a certain joylessness in perfect accuracy. Now, fractals are one area that can provide exquisite detail, but are they too accurate? I decided to take his advice, and add some randomness to the well-known Mandelbrot set: instead of a regular grid, I samples the space at random, and plotted a random-sized dot of the appropriate colour:
def setup(): size(1200, 800) noStroke() background(250) def draw(): cre,cim = random(-2.4,1.3),random(-1.6,1.6) x,y = 0,0 n = 0 while x*x + y*y < 4 and n < 8 : n += 1 x,y = x*x - y*y + cre, 2*x*y + cim fill((n+2)*41 %256, (256-n*101) % 256, n*71 %256) r = random(2,15) circle(cre*height/4+width/2,cim*height/4+height/2,r)
Note for publishers: don’t typeset your books in a minuscule typeface, grey text on white, with paper so thin that the text shows through, if you want anyone over the age of 25 to read it comfortably. I frankly skimmed in places. Nevertheless, this book should provide a good introduction to Processing for artists, providing basic skill that can then be incrementally upgraded as time goes by.