90+ squares
2014. 08. 24.

Inspired by 90 Squares by Trokia.

» launch 90+-squares

w      = $(window).width()
h      = $(window).height()
rad    = 0
jitter = 0.1
len    = _.min([w, h]) / 2 / sqrt(2) * (1 - jitter * 2)
rand   = -> random(- jitter, jitter)

setup = ->
  size       w, h
  frameRate  60
  background 255
  stroke     0, 10
  noFill()

draw = ->
  pushMatrix()
  translate w / 2 + rand() * jitter, h / 2 + rand() * jitter
  rotate(rad)
  scale(1 + rand())
  rect(- len, - len, 2 * len, 2 * len)
  popMatrix()
  rad += random(1)
» capture | close