week 6

by Mario Ibrahim
  • Show Code
/** @peep sketch */
 
/*
What insprired me to create this piece of art?
I wanted to create something creative colourful and something everyone can relate to. 
The differnet colours and placement of the vibrant cirlces creates a sense of movement
and energy. The different filters allow for different meanings to each artwork. By using
the random function to generate different size, colour and thicker/thinner circles
which are placed randomly each design is uniquely made. 
*/
 
size(400,400);
background(0);
noFill();
int z = (int)random(5); // Randomise the variable z (0-4) at the start of the program for later use.
 //println(z); testing if the z value would change
 
 /*initially x and y start at 10 then increase by 20 until it goes above 1000. 
 This generates the smaller cirlces around the page. */
 for (int x = 10; x < 1000; x +=20) {
    for (int y = 10; y < 1000 ; y += 20) {
      strokeWeight(1);
      stroke(random(255),random(255),random(255)); //Makes the stroke colour random.
      float r1 = random(10,20); //r1 is randomised between 10-20, determing the width and the height of the ellipse.
      ellipse(random(x),y,r1,r1);
  noFill(); 
  }
 
  fill(0);
 
  /*makes the center black so you can 
  visibly see the symbol within the center */
  ellipse(200,200, 50,50);
 
  /*initially a random number is chosen for a between 50-80.
  a is then is increases by 1 each time until it reaches
  a random number between 200-500 making it a different size each time run.
  This generate the larger circles in the center*/
  for (float a = random(50, 80); a < random(200, 500); a += 1) {
  strokeWeight(random(5));
  stroke(random(255),random(255),random(255));
  ellipse(200, 200, a, a);
}
 
/*This creates the symbol within the middle of the page*/
fill(0);
strokeWeight(4);
triangle(180, 200, 200, 180, 220, 200);
triangle(180, 200, 200, 220, 220, 200);
line(185, 185, 215,215);
line(215, 185, 185,185);
line(185, 215, 215,215);
 }
 
 /*From the start of the program a random z number is chosen between 0-4
 depending on what value it is the corresponding filter will apply
 NOTE if z=0 no filters will be applied*/
 if (z==1){
 filter(DILATE);
 }
 if (z==2){
 filter(POSTERIZE, 2);
 }
 if (z==3){
 filter(THRESHOLD);
 }
 if (z==4){
 filter(ERODE);
 }

Comments

Nobody has said anything yet.