Thinking by Doing

Albert Chang's thinking

[每日code] 錄製影片

leave a comment »

import processing.video.*;
MovieMaker mm;

int i = 0;
void setup(){
background(0);
size(500,500);
mm = new MovieMaker(this, width, height, “DEMO.mov”,
30, MovieMaker.JPEG,MovieMaker.BEST); //錄製設定
smooth();
stroke(255,120);
}

void draw(){
translate(250,250);
frameRate(100);
println(frameCount);
strokeWeight(i/2);
rotate(PI/12 * i * 2);
delay(10);
line(0+i*i,0+i*i,55,0);
i++;
mm.addFrame(); // 錄製影片
}

void keyPressed() {
if (key == ‘ ‘) {
mm.finish(); // 停止錄製
}
}

作者為albertchang17

四月 12, 2010 於 10:53 下午

張貼於doing

標籤

發表迴響

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

連結到 %s

Follow

Get every new post delivered to your Inbox.