Glimpsing Infinity

The inspiration for this came to me while surfing Reddit and I immediately got down to figure out how to construct it in Processing.

The first step was to build the circular pattern at the heart of the piece. I came across a Processing code sample which explained the concept of rotating shapes. I chose to use squares (rects) which had just a stroke (no fill).

The second step was to figure out how to make the color spectrum happen. It would be quite difficult to wrangle with the RGB color system to make this happen, at least for me. Instead, I saved myself countless hours by switching to the HSB color system. This made it easy for me to use it within the central for loop.

To sum this up, the algorithm uses a for loop to draw squares from the center outward. Each square drawn is rotated by a certain angle and the squares keep getting bigger are they spread outward. As this is happening, the stroke color shifts from the red to the violet in the color spectrum. We end up getting this complex looking pattern which is the result of the superposition of all the squares that are being drawn to the canvas.

I can’t seem to find the source code of this on my computer 🙁 I am quite sure that I have kept it and not thrown it away. I will keep looking for it and update the post when I find it.

Comments are closed.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑