Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int step=2;
- void setup() {
- size(800, 450);
- colorMode(HSB,360,100,100);
- createStuff();
- }
- void draw() {
- }
- void keyPressed() {
- save(random(123)+".jpg");
- }
- void mouseReleased() {
- createStuff();
- }
- void createStuff() {
- float sx = random(10000);
- float sy = random(10000);
- float xOff = sx;
- for (int x=0; x<width; x+=step) {
- float yOff = sy;
- for (int y=0; y<height; y+=step) {
- int col = (int) map(noise(xOff, yOff), 0, 1, 0,360);
- fill(col,90,90);
- noStroke();
- rect(x, y, step, step);
- yOff += 0.005;
- }
- xOff += 0.005;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement