作業一 利用processing畫出一條直線 line()
畫一條(0,0)到(100,100)的直線
line(0,0,100,100);

畫出四邊形 rect()
rect(10,10,50,50);

改變視窗大小 size() →一定要寫在第一行
size(600,400);

完成簡易小畫家
void setup(){
if(key=='1') {strokeWeight(10); stroke(#F583AF);}
if(key=='2') {strokeWeight(3); stroke(#5CF0D3);}
size(600,400);
}
void draw(){
line(mouseX,mouseY,pmouseX,pmouseY)
}

改變筆觸顏色和大小 stroke() & strokeWeight()
if(key=='1') {strokeWeight(10); stroke(#F583AF);}
if(key=='2') {strokeWeight(3); stroke(#5CF0D3);}

作業二 利用網站 https://www.openprocessing.org/ 欣賞作品

欣賞其中一個作品Lines
-透過滑鼠可以產生互動,進而改變線條方向,
雖然看久會有點暈,但是相當有趣的一個作品



沒有留言:
張貼留言