A few weekes ago while at Brooklyn Beta, I was lucky enough to sit next to Scott Kellum during lunch. He mentioned how recently he had been interested in the idea of making fractals using nested CSS shapes with sizes defined by ems.
I was excited to play with the idea, and so I began working with the golden ratio (1.618033988…). (after 4 years of architecture school, it still has a soft spot in my heart.)
Getting the basic shape was easy enough, though I needed to do some tweaking with the positioning to keep the rectangles radiating from the center.
click to toggle css visibility
click to toggle html visibility
Then I began work to create the ubiquitous golden spiral. however, after a bit, I realized my css was flawed (see below). nothing aligned quite right.
click to toggle css visibility
click to toggle html visibility (same old, just some more classes)
After getting lost in the possibilities and hacking away at the CSS, I realized the answer was simple (as is the case with most problems of this type). I was using even border-radii when the arcs in a golden spiral are actually lopsided. whoops.
click to toggle css visibility
click to toggle html visibility (only the classes really change)
One step closer to global domination! Then next step was some basic interactivity. Scroll up and down on the beginning of the spiral below to grow and shrink it.
It’s pretty basic, but it’s a start. I’m interested in exploring what else can be done in this same vein.