Skip to content

Instantly share code, notes, and snippets.

@mizchi
Created March 12, 2014 17:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mizchi/9511664 to your computer and use it in GitHub Desktop.
Save mizchi/9511664 to your computer and use it in GitHub Desktop.
setup: ->
size 640, 480, P3D
background 150
stroke 0, 50
fill 255, 200
xstart = random(10)
ynoise = random(10)
translate width/2,height/2, 0
y = - (height/8)
while y <= height/8
y+=3
ynoise += 0.02
xnoise = xstart
x = -(width/8)
while x <= width/8
x+=3
xnoise += 0.02
@drawPoint(x, y, noise(xnoise, ynoise))
drawPoint: (x,y, noiseFactor)->
console.log 'called'
pushMatrix()
translate(x*noiseFactor * 4, y * noiseFactor * 4, -y)
edgeSize= noiseFactor * 26
ellipse(0,0,edgeSize, edgeSize)
popMatrix()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment