int a,b;
void setup(){
size(600,600);
frameRate(100000000);
}
void draw(){
a=300;
b=200;
ellipse(mouseX+300-a,mouseY+200-b, 200, 200);
fill(255,255,255);
rect(mouseX+200-a,mouseY+ 200-b, 200, 100);
ellipse(mouseX+260-a,mouseY+ 150-b, 20, 20);
ellipse(mouseX+340-a,mouseY+ 150-b, 20, 20);
fill(165,202,57);
rect(mouseX+200-a, mouseY+210-b, 200, 150);
ellipse(mouseX+225-a, mouseY+360-b, 50, 50);
ellipse(mouseX+375-a,mouseY+360-b, 50, 50);
rect(mouseX+220-a, mouseY+355-b, 150, 30);
ellipse(mouseX+345-a,mouseY+440-b, 50, 50);
ellipse(mouseX+255-a,mouseY+440-b, 50, 50);
rect(mouseX+230-a, mouseY+380-b, 50, 60);
rect(mouseX+320-a, mouseY+380-b, 50, 60);
ellipse(mouseX+435-a,mouseY+320-b, 50, 50);
ellipse(mouseX+435-a,mouseY+230-b, 50, 50);
ellipse(mouseX+165-a,mouseY+320-b, 50, 50);
ellipse(mouseX+165-a,mouseY+230-b, 50, 50);
rect(mouseX+140-a,mouseY+230-b, 50, 90);
rect(mouseX+410-a,mouseY+230-b, 50, 90);
}
2.小追大
float a,b;
float x=100,y=100;
void setup(){
size(600,600);
frameRate(5);
}
void draw(){
a=300;
b=200;
pushMatrix();
ellipse(mouseX+300-a,mouseY+200-b, 200, 200);
fill(200,0,255);
rect(mouseX+200-a,mouseY+ 200-b, 200, 100);
ellipse(mouseX+260-a,mouseY+ 150-b, 20, 20);
fill(165,202,57);
rect(mouseX+200-a, mouseY+210-b, 200, 150);
ellipse(mouseX+225-a, mouseY+360-b, 50, 50);
ellipse(mouseX+375-a,mouseY+360-b, 50, 50);
rect(mouseX+220-a, mouseY+355-b, 150, 30);
ellipse(mouseX+345-a,mouseY+440-b, 50, 50);
ellipse(mouseX+255-a,mouseY+440-b, 50, 50);
rect(mouseX+230-a, mouseY+380-b, 50, 60);
rect(mouseX+320-a, mouseY+380-b, 50, 60);
ellipse(mouseX+435-a,mouseY+320-b, 50, 50);
ellipse(mouseX+435-a,mouseY+230-b, 50, 50);
ellipse(mouseX+165-a,mouseY+320-b, 50, 50);
ellipse(mouseX+165-a,mouseY+230-b, 50, 50);
rect(mouseX+140-a,mouseY+230-b, 50, 90);
rect(mouseX+410-a,mouseY+230-b, 50, 90);
popMatrix();
pushMatrix();
scale(0.5);
ellipse(x+300-a,y+200-b, 200, 200);
fill(255,255,255);
rect(x+200-a,y+ 200-b, 200, 100);
ellipse(x+260-a,y+ 150-b, 20, 20);
ellipse(x+340-a,y+ 150-b, 20, 20);
fill(165,202,57);
rect(x+200-a, y+210-b, 200, 150);
ellipse(x+225-a,y+360-b, 50, 50);
ellipse(x+375-a,y+360-b, 50, 50);
rect(x+220-a,y+355-b, 150, 30);
ellipse(x+345-a,y+440-b, 50, 50);
ellipse(x+255-a,y+440-b, 50, 50);
rect(x+230-a,y+380-b, 50, 60);
rect(x+320-a,y+380-b, 50, 60);
ellipse(x+435-a,y+320-b, 50, 50);
ellipse(x+435-a,y+230-b, 50, 50);
ellipse(x+165-a,y+320-b, 50, 50);
ellipse(x+165-a,y+230-b, 50, 50);
rect(x+140-a,y+230-b, 50, 90);
rect(x+410-a,y+230-b, 50, 90);
x=x*0.9 + mouseX*0.1;
y=y*0.9 + mouseY*0.1;
popMatrix();
}
3.今天的課很實用
92
回覆刪除