2016年9月26日 星期一

Week 04 許紘毓 太鼓達人

void setup(){
  size(600,600);
  frameRate(60);
}
void draw(){
  background(255);
  for(int x=0;x<=11;x++){
    for(int y=0;y<=11;y++){
      float t=(frameCount/6.0+x+y)*0.7189;
      fill(0,0,0,0);
      ellipse(x*51.5+5,y*51.5+5,45,45);
      ellipse(x*51.5+30.5,y*51.5+5,45,45);
      ellipse(x*51.5+5,y*51.5+30.5,45,45);
      ellipse(x*51.5+30.5,y*51.5+30.5,45,45);
       fill(0);
      ellipse(x*51.5+5+22.5*cos(t),y*51.5+5+22.5*sin(t),5,5);
      ellipse(x*51.5+30.5+22.5*cos(t),y*51.5+5+22.5*sin(t),5,5);
      ellipse(x*51.5+5+22.5*cos(t),y*51.5+30.5+22.5*sin(t),5,5);
      ellipse(x*51.5+30.5+22.5*cos(t),y*51.5+30.5+22.5*sin(t),5,5);
    }
  }
}
void keyPressed()
{
if(key==' ')frameRate(1);
}
import processing.sound.*;
SoundFile file;
void setup()
{
  size(500,500);
  file= new SoundFile(this,"PPAP.mp3");
  file.play();

}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
import processing.sound.*;
import processing.video.*;
SoundFile file;
Movie movie;
void setup()
{
  size(500,500);
  //file= new SoundFile(this,"PPAP.mp3");
  //file.play();
movie = new Movie(this,"PPAP.mp4");
movie.play();
}
void draw()
{
image(movie,0,0,800,450);
}
void movieEvent(Movie m)
{m.read();}

沒有留言:

張貼留言