上課後介紹了老師有參與的計畫網站

再來在Moodle上下載sketch
先設定出畫布加背景顏色
size(600,400);
background(#F024C1);
size(600,400);
background(#F024C1);
再來試著做出老師畫面中的圖案
一開始講到筆觸的顏色
stroke();
填滿顏
fill();
自己嘗試出來的如下
size(600,600);
background(#F068D0);
rect(100,100,400,400);
strokeWeight(7);
ellipse(200,300,30,30);
ellipse(400,300,30,30);
fill(#FCED61);
stroke(#FFFFFF);
ellipse(300,400,200,100);
line(200,400,400,400);
將程式碼改成函式
讓圖片可以進行互動
void setup(){
size(600,600);
}
void draw(){
background(128);
fill(255);
noStroke();
rect(100,100,400,400);
stroke(128);
strokeWeight(5);
ellipse(mouseX,mouseY,30,30);
ellipse(400,300,30,30);
noStroke();
fill(#CC6600);
ellipse(300,400,200,100);
stroke(255);
line(200,400,400,400);
}
沒有留言:
張貼留言