(來點日常抱怨...什麼時候才能回學校上課嗚嗚嗚)
今天教的使用processing
畫圖很方便,簡單的幾句程式碼完成你所要的圖
size(600,600);//(1) 畫布大小
background(#30A4D8);//背景色
//(2) 顏色: 背景色、畫的顏色
rect(100,100, 400,400);//(3)方塊
ellipse(200,300, 30,30);//圓
先畫一隻企鵝
size(600,600);//(1) 大小
background(#30A4D8);//(2)背景色
stroke(204,102,0);//(5)筆觸色
strokeWeight(5);//線條粗細
rect(100,100, 400,400);//(3)方塊
ellipse(200,300, 30,30);//(4)圓
ellipse(400,300, 30,30);
ellipse(300,400, 200,100);
line(200,400, 400,400);
再來做嘴巴鼓起來的的企鵝
size(600,600);
background(128);
fill(255);//臉
noStroke();
rect(100,100,400,400);
stroke(51);
strokeWeight(5);//雙眼的長和寬
ellipse(200,300, 30,30);
ellipse(400,300, 30,30);
noStroke();
fill(#CC6600);//嘴巴
ellipse(300,400,200,100);
stroke(255);//嘴巴的線
line(200,400, 400,400);
沒有留言:
張貼留言