ricitation 7


 

float x = 0;
float y = 0;

void setup() {
  size(800, 800);
  background(0);
}

void draw() {
  for (int i = 130; i<width; i+=250) {
    for (int j = 100; j<height; j+=250) {
      //fill (255, 0, 0);
      pushMatrix();
      translate(i, j);
      drawFlower();
      popMatrix();
    }
  }
}

void drawFlower() {
  
  //for(int i = 0; i<x.length; i+=50) {
  //flower(x[i], y[i]);
  noStroke();
  fill(#EA95DF);
    //fill(#C99FFA);
  ellipse(0, 0, 50, 100); // pink petal

  pushMatrix();
  fill(#F3F5A6);
    // fill(#C99FFA);
  //translate(width/2+30,height/2);
  translate(60, 15);
  rotate(PI/0.3);
  ellipse(0, 0, 50, 100); // yellow petal
  popMatrix();

  pushMatrix();
  fill(#7F90BC);
   // fill(#C99FFA);
  translate(-60, 15);
  rotate(-PI/0.3);
  //ellipse(100, 0, s, 100); // blue petal
  ellipse(0, 0, 50, 100);
  popMatrix();
  
   fill(#7EC92F);//steam
  rect(-5,50,10,100);
  
    pushMatrix();
  fill(#7EC92F);
 translate(-25,100);
  rotate(-PI/0.3);
  ellipse(0,0,25,50);
 popMatrix();
 
     pushMatrix();
       fill(#7EC92F);
       translate(25,100);
       rotate(PI/0.3);
         ellipse(0,0,25,50);
      popMatrix();

}

Part1



void setup() {
  size(800, 800);
  background(#F0BFE4);
}

void draw() {
for(int i=0;i<width;i+=150){
    for (int j=0;j<height;j+=100){
      drawA(i, j, 10, color(#BFE5F0));
    }
  }
}

if 

void drawA(float u, float v, float s, color c) {
  stroke(0);
  fill(c);
  triangle(u, v, u-14, v+10, u+20, v+10);
 
 fill(#C9ACF0);
 square(u-7,v+10,20);
 
 fill(250);
 square(u-2,v+13,10);
 line(u-2,v+18,u+8,v+18);
 line(u+3,v+13,u+3,v+22);
}

Part2

int n = 20;
float[] x = new float[n];
float[] y = new float[n];
float[] stepX = new float[n];
color[] c = new color[n];
//int[] angle = new int[n];
void setup() {
  size(800, 800);
  background(#FAD9EF);
  for (int i=0; i< n; i++) {
    x[i] = random(width);
    y[i] = random(height);
    //stepX[i] = random(-6, 6);
    c[i] = color(random(255), random(255), random(255));   
    //  if (stepX[i]>0) {
    //  angle[i]=-1;
   // } else {
    //  angle[i]=1;
   // }
  }
}

void draw() {
  background(#FAD9EF);

  for (int i=0; i< n; i++) {
    pushMatrix();
    translate(x[i], y[i]);
   // scale(angle[i], 1);
    drawA(0, 0, 4, c[i]);
    popMatrix();
    x[i]= x[i]+stepX[i];
    if (x[i]<0 || x[i]>width) {
      stepX[i] = -stepX[i];
     // angle[i]=-angle[i];
    }
  }
}


void drawA (float x, float y, float s, color c){
  stroke(0);
  fill(c);
  triangle(x, y, x-14, y+10, x+20, y+10);
 
 fill(c);
 square(x-7,y+10,20);
 
 fill(250);
 square(x-2,y+13,10);
 line(x-2,y+18,x+8,y+18);
 line(x+3,y+13,x+3,y+22);
}

 

 

 

int n = 20;
float[] x = new float[n];
float[] y = new float[n];
float[] stepX = new float[n];
color[] c = new color[n];
int[] angle = new int[n];
void setup() {
  size(800, 800);
  background(#FAD9EF);
  for (int i=0; i< n; i++) {
    x[i] = random(width);
    y[i] = random(height);
    stepX[i] = random(-6, 6);
    c[i] = color(random(255), random(255), random(255));   
      if (stepX[i]>0) {
      angle[i]=-1;
    } else {
      angle[i]=1;
    }
  }
}

void draw() {
  background(#FAD9EF);

  for (int i=0; i< n; i++) {
    pushMatrix();
    translate(x[i], y[i]);
    scale(angle[i], 1);
    drawA(0, 0, 4, c[i]);
    popMatrix();
    x[i]= x[i]+stepX[i];
    if (x[i]<0 || x[i]>width) {
      stepX[i] = -stepX[i];
      angle[i]=-angle[i];
    }
  }
}


void drawA (float x, float y, float s, color c){
  stroke(0);
  fill(c);
  triangle(x, y, x-14, y+10, x+20, y+10);
 
 fill(c);
 square(x-7,y+10,20);
 
 fill(250);
 square(x-2,y+13,10);
 line(x-2,y+18,x+8,y+18);
 line(x+3,y+13,x+3,y+22);
}

  • Q1: In the reading “Art, Interaction and Engagement” by Ernest Edmonds, he identifies four situations in an interactive artwork: ‘Static’, ‘Dynamic-Passive’, ‘Dynamic-Interactive’ and ‘Dynamic-Interactive(Varying)’. From the exercise you did today which situations do you identify in every part you executed? Explain.
  • I think the first part is static. And the second part is dynamic-passive. In the first part, the images are frozen. In the second part, the houses are moving and bouncing. But both of them can’t interact with viewers.

 

  • Q2: What is the benefit of using arrays? How might you use arrays in a potential project?
  • It can create many different random factors without using a long time. So it can simplify the work. I can change the color, size, number, position by using arrays.

Leave a Reply

Your email address will not be published. Required fields are marked *