Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Python flavored example
- # from "Generative Art" p xxiii
- # doug goodwin
- xstart = random(10)
- ynoise = random(10)
- def setup():
- size(1000, 1000, P3D)
- background(150)
- stroke(0, 50)
- fill(255, 200)
- translate(width/2, height/2, 0)
- frameRate(1)
- def drawPoint(x, y, noiseFactor):
- pushMatrix()
- translate( (x * noiseFactor * 4), (y * noiseFactor * 4), -y)
- edgeSize = noiseFactor * 26
- ellipse(0, 0, edgeSize, edgeSize)
- popMatrix()
- def draw():
- global ynoise
- background(150)
- translate(width/2, height/2, 0)
- for y in range( -(height/8), (height/8), 3 ):
- ynoise = ynoise + 0.02
- xnoise = xstart
- for x in range( -(width/8), (width/8), 3):
- xnoise += 0.02
- drawPoint(x, y, noise(xnoise, ynoise))
Add Comment
Please, Sign In to add comment