void setup(){ size(800,600); background(255,255,255); strokeWeight(2); } color cc; int count; void flower(){ count++; if(count%10==0)cc=color(random(255),random(255),random(255)); fill(cc); for(int i=0;i<36;i++){ rotate( PI/18); ellipse(100,0,120,20); } } int k; void draw(){ k++; background(255,255,255); translate(400,300); rotate(PI/60*k); translate(100,0); flower(); }
5.2
void setup(){ size(800,600); background(128,128,255); strokeWeight(2); } color cc; int count; void flower(){ count++; if(count%20==0)cc=color(random(255),random(255),random(255)); fill(cc); for(int i=0;i<36;i++){ rotate( PI/18); ellipse(100,0,120,20); } fill(200,0,100); ellipse(0,0,70,70); } void clock(){ strokeWeight(10); ellipse(400,300,500,500); line(400,300,400+cos(k/100)*200, 300+sin(k/100)*200); line(400,300,400+cos(k/6000)*200, 300+sin(k/6000)*200); line(400,300,400+cos(k/72000)*150, 300+sin(k/72000)*150); strokeWeight(2); } float x=100,y=100; float k=0; void draw(){ k++; background(128,128,255); clock(); pushMatrix(); translate(x,y); rotate(PI/120*k); translate(sin(k/20)*100,sin(k/10)*50); scale(0.5); flower(); x=x*0.95 + mouseX*0.05; y=y*0.95 + mouseY*0.05; popMatrix(); }
5.3
以前網路上的一個小遊戲,騎單車將人撞飛,飛得越遠分數越高。
畫面會進行簡化,也可能會稍微改動規則
沒有留言:
張貼留言