Iteration

wallpaper thing

I wish I could say something really interesting about how this project evolved into what it is, but really what it comes down to is that I have very little programming experience and as such this was born out of me trying things and keeping them if I liked how they looked, and deleting them if I didn’t. It was more of an exercise into “let’s see if this generates something cool” instead of a “let’s actively set out with a plan to make something” kind of a project.

It’s pretty though. And I’m actually relatively proud of myself because this is the first time I’ve ever successfully programmed something and had it turn out a) functioning properly and b) nice.

edit: forgot the code oops here

 

//copyright 2014 natroze
//electronic media studio: interactivity

size(1080,720);
background(242,230,173);
noStroke();

//larger squares
for(int y = 5; y < =height; y+=60) {
  for(int x = 5; x <= width; x +=60) {
    float t2 = random(70,140);
    float t1 = map(y,0,height, t2,0);
    fill(138,217,245, t1);
    rect(x,y, 50,50);
  }
}
//smaller squares
for(int y = 15; y <=height; y+=60) {
  for(int x = 15; x <= width; x +=60) {
    float squareRed = map(y,0,height, 80,200);
    float squareGreen = map(y,0,height, 190,220);
    float t2 = random(20,90);
    float t1 = map(y,0,height, t2,0);
    fill(squareRed,squareGreen,245, t1);
    rect(x,y, 30,30);
  }
}
//circles
for (int y = 0; y<=height; y+=60) {
  for (int x = 0; x<=width; x+=60){
    float circleRed = map(x,0,width, 255,130); 
    float circleGreen = random(135,185); 
    float r1 = map(y,0,height, 10,60);
    float t3 = random(60,130);
    fill(circleRed,circleGreen,223, t3);
    ellipse(x,y, r1,r1);
  }
}

//offset circles
for (int y = 0; y<=height; y+=30) {
  for (int x = 0; x<=width; x+=30){
    float circleRed = map(x,0,width, 255,130); 
    float circleGreen = random(135,185); 
    float r1 = map(y,0,height, 10,30);
    float t5 = random(10,30);
    float t4 = map(y,0,height, 0,t5);
    fill(circleRed,circleGreen,223, t4);
    ellipse(x,y, r1,r1);
  }
}

Comments are closed.