void setup()
{
size(600,600);
}
void draw()
{
fill(255,0,0); //outside rad
triangle(20, 265, 150, 30, 280, 265);
fill(255,255,255); //inside white
triangle(40, 250, 150, 55, 260, 250);
fill(0,0,0); //black
ellipse(150,145,35,110);
fill(0,0,0); //black
ellipse(150,227,35,35);
fill(0,255,0);
ellipse(mouseX,mouseY,100,100);
}
1.2
2.1速限數字會隨著滑鼠跑
void setup(){
size(600,600);
//frameRate(1);
}
float x=100,y=100;
void draw(){
background(0,138,0);
fill(255,0,0);
ellipse(mouseX,mouseY,200,200);
fill(255,255,255);
ellipse(mouseX,mouseY,180,180);
fill(0,0,0);
ellipse(x-30,y-30,60,60);
fill(255,255,255);
ellipse(x-30,y-30,45,45);
fill(0,0,0);
ellipse(x-30,y+25,65,65);
fill(255,255,255);
ellipse(x-30,y+25,50,50);
fill(0,0,0);
ellipse(x+35,y-5,65,110);
fill(255,255,255);
ellipse(x+35,y-5,55,90);
//fill(0,0,0);
//ellipse(x,y-20,30,80);
x=x*0.9 + mouseX*0.1;
y=y*0.9 + mouseY*0.1;
}
2.2圖
88
回覆刪除