วันอังคารที่ 2 กันยายน พ.ศ. 2557

Lab2 : spoon & fork


void setup() {
size(400, 400);
background(255,229,204);

fill(160, 160, 160);
noStroke();
draw_fork(120,155,15,80,5);
draw_spoon(220,155,40,60);
}
void draw_fork(int originalFork_x,int originalFork_y,int originalFork_width,int originalFork_height,int originalFork_radius){
rect( originalFork_x, originalFork_y, originalFork_width-5, originalFork_height+5, originalFork_radius) ; //part of fork1
rect( originalFork_x-20, originalFork_y-55, originalFork_width-5, originalFork_height-30,originalFork_radius) ; //part of fork2
rect( originalFork_x-5, originalFork_y-55, originalFork_width-5, originalFork_height-30,originalFork_radius) ; //part of fork3
rect( originalFork_x+10, originalFork_y-55, originalFork_width-5, originalFork_height-30,originalFork_radius) ; //part of fork4
rect( originalFork_x+25, originalFork_y-55, originalFork_width-5, originalFork_height-30,originalFork_radius) ; //part of fork5
rect( originalFork_x-20, originalFork_y-10, originalFork_width+40, originalFork_height-55,originalFork_radius) ; //part of fork6
}
 void draw_spoon(int originalSpoon_x,int originalSpoon_y,int originalSpoon_width,int originalSpoon_height){
 rect( originalSpoon_x, originalSpoon_y, originalSpoon_width-30, originalSpoon_height+25,5) ; //part of spoon1
ellipse( originalSpoon_x+5, originalSpoon_y-20, originalSpoon_width+10, originalSpoon_height+15) ; //part of spoon2
fill( 126, 126, 126);
ellipse( originalSpoon_x+5, originalSpoon_y-20, originalSpoon_width,originalSpoon_height) ; //part of spoon3
}

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

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