foo.net

Blake Jones' projects and writings


Fifty Ways to Draw a Circle

Earlier this year I was looking around for project ideas that could use multiple different parts of my mind. I’ve been working on a generative art project for a while now, and it’s at a point of some stuckness – I can think of a few directions I could take it in, but they’re all pretty big projects of their own and they might not show results for a while. So I was excited when I happened across this blog post titled Seventy-Five Ways to Draw a Circle.

The goal of the exercise is to come up with several different ways of drawing a circle, or more to the point, a circle-like image. I’m using the same constraints described in that post:

First, I decided to forego the use of color as I wanted to focus on variety in forms instead. I also find that using color variations to get out of a rut makes me feel like I’m cheating.

Second, every version should be implemented as an independent, re-usable function conforming to the following declaration:

  void circle(float x, float y, float r) {
    /* Draw a circle with center at (x, y) and radius r */
  }

This way, I can easily reuse them later for other works.

As the third and final constraint, each version had to have some generative/procedural component to it. That is, each time the function is called, a new variant should be generated.

I stopped reading that post after getting as far as that description, because I wanted to avoid anchoring myself on any of the specific ideas there. But the exercise seemed like just the thing for me. It forced me to keep going back to the well of ideas even after I felt convinced that the well must have run dry, and I kept proving myself wrong. Once I’d done the hard work of generating the idea, I got to practice using my aesthetic sense to tell me when it felt done, and I knew I could rely on my programming and math skills to turn the idea into an image. Each individual circle could be pretty quick, so I got to see incremental progress all the time. And I could decide to stop whenever I wanted; for me, fifty circles seemed like a good number.

So, without further ado, here are the results. There’s one image for each style of circle, showing four examples of that style. Clicking on any image will give an enlarged version with more detail. All of the source code is available on Github.