一.下載軟體並進行解壓縮
二.
1.打開軟體並調整字體大小與字型
2.
程式碼:
size(600,600);///背景大小
background(#11D37D);///背景顏色
rect(100,100,400,400);///長方形
ellipse(200,300,30,30);///橢圓
3.
程式碼:
size(600,600);
background(#11D37D);
stroke(204,102,0);///顏色 ,背景色 ,畫的顏色
rect(100,100,400,400);
rect(100,100,400,400);
ellipse(200,300,30,30);
ellipse(400,300,30,30);
rect(200,350,200,100);
ellipse(300,400,200,100);
4.
程式碼:
size(600,600);
background(#00F512);
stroke(204,102,0);///筆觸顏色
背景色、畫的顏色
strokeWeight(5);///筆的大小
rect(100,100,400,400);
ellipse(200,300,30,30);
ellipse(400,300,30,30);
ellipse(300,400,200,100);
line(200,400,400,400);
5.畫出呆企鵝
程式碼:
size(600,600);
background(128);
fill(255);
noStroke();///臉
rect(100,100,400,400);
stroke(128);
strokeWeight(5);///雙眼
ellipse(200,300,30,30);
ellipse(400,300,30,30);
noStroke();
fill(#CC5600);///嘴巴
ellipse(300,400,200,100);
stroke(255);
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(#CC5600);
ellipse(300,400,200,100);
stroke(255);
line(200,400 ,400,400);
}
沒有留言:
張貼留言