前言
普普藝術(Pop Art),是一個探討通俗文化與藝術之間關聯的藝術運動。普普藝術試圖推翻抽象表現藝術並轉向符號,商標等具象的大眾文化主題(普普藝術,wikipeida)。
普普藝術可以是諷刺貪婪、可以是反應時事,甚至可以是追求時尚。只要通俗,即使一小部份人的認定,也能成為普普。而近日較為常見"火紅"的普普或類普普藝術家有 Andy Warhol(台灣翻作安迪沃荷), 草間彌生, 甚至筆者認為的村上 隆。
類 PopArt 產生器
這個程式的緣起,乃是去年十月左右筆者修鄭月秀老師的數位藝術課程,某一周課程內容提到普普藝術,而這程式即為該周作業之一。
大致上程式的操作是這樣的:
1. 先在 data\ 資料夾下放入兩張照片或圖片為創作素材,建議有去背為佳(範例中為:csb.jpg 和 m19.jpg,如圖2.)
2. 執行程式
3. 透過滑鼠游標的位置分別會產生相對應的結果,橫軸表示閥值 (Threshold,色階化程度的指標) ,綜軸表示兩種色階的顏色上得差異性(如圖3. )
4. 調整至自己想要的圖案後,單擊滑鼠 (Click),即可將當下所見成果存檔成 temp.tif
(圖2. data 資料夾下的照片素材)
圖3. 移動滑鼠游標之綜軸後 Threshold 變化
程式碼
當初只花一小時多去構思加上撰寫,程式是土法煉鋼寫得很亂,所以要修改的人可能需要花點時間消化了^^
以 Processing 0135 version 撰寫
// default value of Threshold.
int threshold = 130;
float colorthresh = 1.0;
// Load an image from the data folder
PImage dest,dest_,dest1, dest2, dest3, dest4;
PImage dest5,dest6, dest7, dest8, dest9;
void setup()
{
size(600, 600);
colorMode(RGB, 256);
frameRate(2);
drawPop();
}
void drawPop()
{
dest = loadImage("m19.jpg");
dest_ = loadImage("csb.jpg");
dest1 = loadImage("m19.jpg");
dest2 = loadImage("m19.jpg");
dest3 = loadImage("m19.jpg");
dest4 = loadImage("m19.jpg");
dest5 = loadImage("m19.jpg");
dest6 = loadImage("m19.jpg");
dest7 = loadImage("m19.jpg");
dest8 = loadImage("m19.jpg");
dest9 = loadImage("m19.jpg");
// Draw the screen
image(dest, width, height, 200, 200);
float bit;
// Image Binarization
for (int i=0; i<200; i++) {
for (int j=0; j<200; j++) {
bit = brightness(dest.get(i, j));
if (bit > threshold){
dest1.set(i, j, color(255/colorthresh, 242/colorthresh, 0/colorthresh));
dest3.set(i, j, color(0/colorthresh, 173/colorthresh, 242/colorthresh));
dest5.set(i, j, color(102/colorthresh, 45/colorthresh, 145/colorthresh));
dest7.set(i, j, color(202/colorthresh, 0/colorthresh, 165/colorthresh));
dest9.set(i, j, color(185/colorthresh, 192/colorthresh, 30/colorthresh));
}
else {
dest9.set(i, j, color(30, 178, 23));
dest7.set(i, j, color(247, 148, 29));
dest5.set(i, j, color(255, 242, 0));
dest3.set(i, j, color(236, 0, 140));
dest1.set(i, j, color(237, 28, 36));
}
}
}
for (int i=0; i<200; i++) {
for (int j=0; j<200; j++) {
bit = brightness(dest_.get(i, j));
if (bit > threshold){
dest2.set(i, j, color(40/colorthresh, 198/colorthresh, 63/colorthresh));
dest4.set(i, j, color(255/colorthresh, 80/colorthresh, 0/colorthresh));
dest6.set(i, j, color(255/colorthresh, 255/colorthresh, 200/colorthresh));
dest8.set(i, j, color(235/colorthresh, 0/colorthresh, 140/colorthresh));
}
else {
dest8.set(i, j, color(0, 0, 0));
dest6.set(i, j, color(100, 100, 55));
dest4.set(i, j, color(255, 255, 0));
dest2.set(i, j, color(255, 123, 14));
}
}
}
image(dest1, 0, 0, 200, 200);
image(dest2, 0, 200, 200, 200);
image(dest3, 0, 400, 200, 200);
image(dest4, 200, 0, 200, 200);
image(dest5, 200, 200, 200, 200);
image(dest6, 200, 400, 200, 200);
image(dest7, 400, 0, 200, 200);
image(dest8, 400, 200, 200, 200);
image(dest9, 400, 400, 200, 200);
stroke(255);
line(width/3, 0, width/3, height);
line(0, height/3, width, height/3);
line(width/3*2, 0, width/3*2, height);
line(0, height/3*2, width, height/3*2);
}
void draw()
{
threshold = int(mouseX/600.0*255);
colorthresh = (mouseY/300.0);
println(threshold);
drawPop();
}
void mousePressed()
{
save("temp.tif");
println("Picture Saved.");
}

=全國唯一房間佈置分享平台 CaraQ奶糖城= CaraQ公主選拔正式開跑囉~ 只要 "年滿16歲之中華國民國民" 都有資格參賽! 9/9日以前報名都還來得及喔. 歡迎你來熱情參予票選 ~ 在遊戲中投一票等於網站五票的效力喔! 快來選出你心目中的公主吧! http://princess.evt.caraq.com/Home/Index/ID 比賽獎金: 1. 決賽冠軍 10,0000台幣+CaraQ限量T*1+CaraQ幣5000 2. 決賽亞軍 50,000台幣+CaraQ限量T*1+CaraQ幣5000 3. 決賽季軍 20,000台幣+CaraQ限量T*1+CaraQ幣5000 4. 決賽人氣獎 5,000台幣+CaraQ限量T*1+CaraQ幣1000 5. 決賽才藝獎 5,000台幣+CaraQ限量T*1+CaraQ幣1000 6. 網路人氣獎 10,000台幣+CaraQ限量T*1+CaraQ幣1000 7. 報名參加獎 Q糖1000 8. 網路投票票數超過1000票 CaraQ幣100(只送一次) 9. 網路初賽前五十名 CaraQ限量娃娃*1 10. 投票抽獎 CaraQ幣100 & 限量T 等等(還有其他合作廠商獎項) CARAQ公主選拔賽官網公告 http://up.caraq.com/event/princess/
可惜我不是公主