Compose Your Piece

Your generative program works. Now make it yours, with one deliberate design decision. In generative art the artist still decides everything that matters; you just author the rules instead of drawing each line.

Pick One of Four

A funny thing about art: constraints make it better. An intentional limit produces a more cohesive piece than unconstrained randomness. Choose one (picking the "least boring" one is a perfectly good method):

  1. Restrict the shape vocabulary. Constrain sides to a single value, so the whole piece is only triangles, or only hexagons.
  2. Tighten the palette. Reduce PALETTE to 2–3 cohesive colours: monochromatic, a warm/cool split, or complementary.
  3. Define a composition zone. Restrict shapes to the top half, a circle, or a diagonal band by bounding the x, y ranges accordingly.
  4. Add a second layer. After the main loop, a second loop with a different rule: larger shapes only, one bold colour, or outline-only.

Work in the ACTIVITY 6 section of 4-compose.py. Same file as before, no new file.

The Workflow

One change, one run. Adjust, run, look, repeat. When a run looks right, lock it with a seed (random.seed(...) at the top) so it renders identically every time.

"Finished" means the canvas is on screen and you're happy with it. It does not mean every line of code is polished. Nobody at the gallery walk reads your code; they look at your art.

Stuck for Ideas?

Now you can open example/showcase.py and run it. Click or press Space to cycle through four pieces:

  • Rainbow Mandala — overlapping polygon outlines woven into concentric rings
  • Maurer Rose — one parametric curve, 361 lines, a floral lattice
  • Spirograph — several curves layered in different hue bands
  • Sunflower Spiral — 1,500 florets on a phyllotaxis spiral

Don't copy one. Adopt one idea from one: a second pass, a radial layout, a restricted hue band.

Take It Home

Two ways to keep your piece:

  • The seed. Your .py file plus its seed is the artwork. Anyone with Python can regenerate it exactly, which I find rather wonderful: the whole painting fits in a text file.

  • An image file. Uncomment the last line of 4-compose.py:

    screen.getcanvas().postscript(file="my_art.eps")

    The .eps file opens in Preview or Inkscape, and from there exports to PNG.

Your Exhibit Label

Before the gallery walk: write on a sticky note the one constraint you applied, and what it did to the look. Place it in front of your laptop, run your program one final time, and leave the canvas open. Whatever's on screen is your final piece.