Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
/*************************************************************************************************** /* Erik Kastner - moving color field with perlin noise /* inspired by: http://www.flickr.com/photos/digitaltribes/2282828255/in/pool-564856@N20 /* (but totally different /***************************************************************************************************/ color[] colors; void setup() { size(400,400,P3D); background(0); frameRate(10); colors = new color[3]; colors[0] = color(185,18,27); colors[1] = color(246,228,151); colors[2] = color(189,141,70); } void draw() { background(0); noStroke(); for (int y=0; y<14; y++) { for (int x=0; x<14; x++) { int colorIndex = floor(noise(x-frameCount,y)*3); int xPos = x*width/14+15; int yPos = y*height/14+15; fill(colors[colorIndex], random(100,150)); ellipse(xPos, yPos, width/14, height/14); fill(colors[colorIndex], random(150,190)); ellipse(xPos, yPos, width/14-10, height/14-10); fill(colors[colorIndex], random(210,240)); ellipse(xPos, yPos, width/14-20, height/14-20); } } }
From the Design Piracy series on my blog: