Vertigo III

Part of the Vertigo series

l alpha

In Vertigo III the effect of an infinite staircase is created by drawing a sequence of squares of decreasing size, with a small rotation in each iteration.

For the next reactangle to fit into the previous one, I calculated the size l from the previous rectangle L according to the rotation angle as follows:

A larger α generates less detailed image:

α Result α Result
0.89 s alpha 0.10 m alpha
0.06 l alpha 0.03 l alpha

I use the same formula in code, but I can simply reasign the new value to the same variable:

  rect(0, 0, s, s );
  s = s / (sin(a) + cos(a));

To make the drawing “pop” and give a 3D illusion, the color of the rectangles are alternated with modulus function.

  if(frameCount % 2 == 0)
    fill(mainColor);
  else fill(0);

OpenProcessing

Available here.