void setup() {
size(400, 400);
background(255);
int X[] = {160,300,100};
int Y[] = {280,100,120};
for(int i=0;i<Y.length;i++){
drawTurtle(X[i], Y[i], 40, 20, 3);
}
}
void drawTurtle(int X, int Y, int Width, int Height,int Radius) {
fill(255, 255, 153);
ellipse(X, Y, Width, Height); //leg
fill(255, 255, 153);
rect(X+90, Y-30, Width-20, Height-10, Radius); //tail
fill(0, 153, 0);
ellipse(X+30, Y-30, Width+100, Height+60); //body
fill(153, 153, 0);
rect(X+5, Y-60, Width-20, Height, Radius+7); //shell
rect(X+30,Y-60,Width-20,Height,Radius+7); //shell
rect(X+55,Y-60,Width-20,Height,Radius+7); //shell
fill(255, 255, 153);
noStroke();
ellipse(X-40, Y-50, Width+30, Height+60); //face
ellipse(X-50,Y-30,Width+20,Height+20); //face
stroke(2);
line(X-70, Y-30, X-60, Y-30); //mouse
fill(0);
ellipse(X-60, Y-60, Width-25, Height-5); //eye
fill(255);
ellipse(X-65, Y-63, Width-35, Height-15); //eye
fill(255, 255, 153);
ellipse(X+20, Y, Width, Height); //leg
ellipse(X+70,Y,Width,Height); //leg
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น