sun-0
2012. 04. 19.

I was thinking about creating the Sun, but ended up with these silly blobs.

» launch sun-0

setup = ->
  size      $(window).width(), $(window).height(), P3D
  frameRate 30
  colorMode RGB, 1.0
  noStroke()

draw = ->
  background 1

  lights()
  lightFalloff(0.8, 0, 0)

  fill 1, 1, 0
  translate width() * 0.5, height() * 0.5
  rotateY frameCount() * 0.1
  rotateX frameCount() * 0.1

  for i in [0...20]
    pushMatrix()
    translate(
      600 * noise(i * 1, frameCount() * 0.01) - 300,
      600 * noise(i * 2, frameCount() * 0.011) - 300,
      600 * noise(i * 3, frameCount() * 0.013) - 300
    )
    sphere 100 + 30 * noise(i * frameCount() * 0.011)
    popMatrix()
  null
» capture | close