2020年4月16日 星期四

神情大變的小精靈

void setup(){
size(300,200);

}

int angle=45;
void draw(){
  background(114,67,85);

  //circle(100,100,100);
  //elispse(100,100,100,100);

  angle = (frameCount*2)%120;//frameCount==>6(times/sec)
  if(angle>60)
  {
    fill(HSB);//colourful
    color(frameCount%255,255,255);
    fill(frameCount%255,255,255);
    angle=120-angle;

  }
  arc(100,100,100,100,radians(angle+360),radians(360-angle+360),PIE);//45'=>360-45
}

沒有留言:

張貼留言