วันอาทิตย์ที่ 30 สิงหาคม พ.ศ. 2558

Lab 2 - Movie MouseMove

int colour = 0;

void setup(){
size(1000,700);
}

void draw() {
// BMW
background(colour);
fill(0);
stroke(100);
strokeWeight(10);
ellipse(250,250,400,400);

fill(255);
stroke(100);
strokeWeight(5);
ellipse(250,250,250,250);

fill(#2E9AFE);
stroke(100);
arc(250,250,250,250,0,PI/2);
arc(250,250,250,250,PI,TWO_PI-PI/2);

line(125,250,375,250);
line(250,125,250,375);


// Benz
fill(0);
stroke(255);
strokeWeight(15);
ellipse(700,250,400,400);

fill(255);
stroke(255);
strokeWeight(15);
triangle(700,50,690,250,710,250);
triangle(540,370,690,250,700,270);
triangle(860,370,690,260,710,250);

//text
fill(#FFC903);
textSize(50);
text("THE TRANSPORTER",250,650);

//Console
println("This Project is German Car Brands");
println("Left is Bavarian Motor Works");
println("Right is Mercedes Benz");
}
void mouseMoved() {
  colour = colour + 5;
  if (colour > 255) {
    colour = 0;
  }
}

ไม่มีความคิดเห็น:

แสดงความคิดเห็น