2010年9月14日 星期二

hw01

原圖















小畫家

















程式碼























程式碼
size(600,449);
background(228,228,228);
strokeWeight(3);
fill(142,11,17);
rect(82,44,12,12);
strokeWeight(3);
fill(47,30,117);
rect(145,73,48,13);
strokeWeight(3);
fill(142,11,17);
rect(145,86,48,13);
stroke(230,230,230);
strokeWeight(4);
fill(51,0,51);
rect(118,136,10,20);
stroke(230,230,230);
strokeWeight(4);
fill(51,0,51);
rect(128,136,10,20);
stroke(0,0,0);
strokeWeight(3);
fill(142,11,17);
rect(212,103,25,24);
stroke(230,230,230);
strokeWeight(3);
fill(47,30,117);
rect(58,238,10,10);
stroke(230,230,230);
strokeWeight(3);
fill(47,30,117);
rect(69,238,10,11);
stroke(230,230,230);
strokeWeight(3);
fill(47,30,117);
rect(80,238,10,11);
stroke(11,52,98);
rect(124,268,185,8);
stroke(0,0,0);
strokeWeight(3);
rect(124,271,3,71);
stroke(142,11,17);
strokeWeight(3);
rect(111,352,30,1);
stroke(0,0,0);
strokeWeight(3);
fill(0,0,0);
rect(306,271,3,71);
stroke(142,11,17);
strokeWeight(3);
rect(276,352,53,1);
stroke(142,11,17);
fill(142,11,17);
rect(225,152,62,13);
stroke(142,11,17);
rect(225,154,1,148);
stroke(142,11,17);
rect(286,152,1,148);
stroke(0,0,0);
rect(210,302,27,1);
stroke(0,0,0);
rect(275,302,16,1);
stroke(51,0,51);
fill(51,0,51);
rect(264,217,33,5);
stroke(51,0,51);
rect(264,217,1,169);
stroke(51,0,51);
rect(296,217,1,169);
stroke(0,0,0);
rect(256,403,17,1);
stroke(0,0,0);
rect(288,403,17,1);


stroke(0,0,0);
strokeWeight(3);
fill(11,52,98);
ellipse(480,75,90,90);
fill(11,52,98);
rect(428,185,60,1);
stroke(0,0,0);
fill(51,0,51);
triangle(329,137,360,194,389,139);
stroke(0,0,0);
triangle(329,137,359,176,389,139);
noStroke();
fill(228,228,228);
triangle(329,135,359,176,390,135);
stroke(0,0,0);
fill(51,0,51);
triangle(332,98,360,143,391,97);
stroke(0,0,0);
triangle(332,98,361,121,391,97);
noStroke();
fill(228,228,228);
triangle(331,95,361,121,391,95);


fill(0,0,0);
bezier(406,233,410,287,514,287,516,232);

noStroke();
fill(228,228,228);
ellipse(461,236,104,65);
fill(51,0,51);
rect(416,380,90,6);
stroke(0,0,0);
strokeWeight(3);
fill(47,30,117);
ellipse(460,178,32,35);
stroke(0,0,0);
strokeWeight(3);
fill(51,0,51);
triangle(445,186,474,186,464,206);
stroke(142,11,17);
fill(142,11,17);
triangle(461,356,441,214,483,214);
fill(192,192,192);
quad(441,214,444,236,480,236,483,214);
noStroke();
fill(49,73,106);
quad(450,268,456,307,467,307,473,268);
fill(192,192,192);
bezier(450,268,449,274,473,274,474,268);











心得感想:
這次學到了rect,triangle,ellipse,quad的應用
還要運用相加相減把圖形畫出來,一開始完
全不知道怎麼操作這個程式,後來就慢慢從
processing的pdf檔去尋找資料,圖就一個個
的畫出來,畫完之後真的是超開心的。

沒有留言:

張貼留言