When I decided to get back into generative art four years after I had explored generative art and Processing in graduate school, I could feel I was rusty as a programmer.
Thankfully I had worked for several years as a Support Engineer since at a web mapping startup where I had troubleshooted other people's random code in languages I had never used. This experience had vastly improved my abilities as a programmer since grad school, and I found it much easier to revisit and expand upon a Processing program I had written in graduate school that created spirograph-ish forms.
I have spent the better part of a year adding new functions to the program and expanding upon it to create some cool spirograph-ish art (you can purchase prints here.)
However, a creative stumbling block was still before me. Namely, that I wanted to create new programs to explore new-to-me generative art concepts, but my programming skills were still rusty enough on important concepts that I felt blocked in my ability to make new generative art.
Break It Down into Something Simpler
The key thing I learned as a Support Engineer is the importance of breaking things down into smaller, simpler problems. In my mind, I wanted to immediately start creating flow field art for a project I envisioned making. But making flow field art is actually complicated especially given I hadn't programmed in a while and would need to learn some key concepts I had never learned during my coursework in graduate school, or any schooling really (um, hello physics!)
10 Print Algorithm
To get over this stumbling block and begin to program new art, I decided I needed to start with something much simpler. It was time to create a pretty pattern generating program for pen plotted postcards using the 10 print algorithm! These postcards are included with every spirograph sticker order.
Sometimes the best approach to a creative block is to work on a project purely for fun with little expectations for creating something amazing or show-worthy. I needed some new patterns for postcards to go out with my sticker orders, and if I could write a simple program that could draw some pretty patterns, awesome! And if not, that was fine too.
Here's one of my more popular stickers, my Star of David spiro design in sticker form!
What is the 10 Print Algorithm?
10 print is a single line of code written in BASIC that produces wonderful maze like patterns. To try and sum up the algorithm - it draws rows of alternating line slashes on the screen that are randomly placed at an even distance from each other. As the rows advance down the screen, the alternating slashes line up randomly row by row creating a maze-like pattern.
Drawing 10 Print Patterns
To make a program of pretty 10 print patterns, I started by watching a Coding Train video on the 10 print algorithm. I then took the Processing code provided by Dan Shiffman and played around with drawing arcs instead of lines and changing the probability of when those arcs would be drawn. Once I understood this very simple program, it was time to add some cool shapes to draw instead of lines and arcs!
Object Oriented Programming
To reduce redundancy in code, it can be easier at times to store an algorithm you are calling over and over again as a separate piece of code called a "class." In the case of my shapes algorithm, I wanted to draw different kinds of shapes, but it would be tedious to rewrite the shapes formula with new variables over and over again within my main program. It is much easier to write a separate class that stores my shape formula like a template that I could then call upon whenever I needed to draw new shapes!
Each new shape is declared as an object in the main program, which means you can access and change the object's stored variables, but also call different functions on that object if you want! If you are new to object oriented programming, check out Dan Shiffman's tutorials on the subject!
The Final Postcards
Let's not forget the main goal in the end, which was pretty pen plotted postcards! Above you can see a sampling of the postcards I generated with my program, drawn using CMYK markers. These postcards will go out with future sticker orders!
I will continue to add more complexity to this program over time, and anticipate turning these into generative prints in the future.
All Generative Art, All the Time
But what if you want to learn more?! Check out these additional blog posts:
- How to Watercolor Paint with a Robotic Drawing Machine
- Should You Buy an Axidraw Pen Plotter?
- Applying Visual Design Principles to Generative Art: Part 1
- The Art of Programming Math: Code Art Principles Part 2
- 10 Print Postcards Drawn with a Pen Plotter
- Pet Portrait Art: Experimenting with the SquiggleCam App
- How to Generative Art
- CMYK: Process Color Experiments and my Axidraw
- Favorite Pens for Axidraw, Plus How to Make Multiple Color Plots!
- How to Draw Generative Art with an Axidraw Pen Plotter
Dirt Alley Design was founded just off a dirt alley in San Francisco in December of 2016 by artist Michelle Chandra. Inspired by the beauty of street grids, Michelle invented maze maps in which she transforms street grids into mazes. In 2019, she began a new project - generative spirograph prints created with code and drawn with a pen plotter. Follow her on Instagram and Twitter @dirtalleydesign where she posts new spirograph designs daily