この記事を書いた人

クリエイティブコーダー / アーティスト
- 楽しんでもらえたり、ありがとうと言ってもらえるような「人の役に立つ、機能するアート」を探究しています
- 36歳(文系)から独学で挑戦し、1年8ヶ月目までに公募6つに挑戦し、3つで選ばれる
- 1年9ヶ月目に、虎ノ門ヒルズ ステーションタワー49階 スカイガーデン&プールのために制作した作品が展示される
目次
作品の画像とコード

PImage img;
void setup() {
size(800, 600);
img = loadImage("7, Window, Slovenia, Ljubljana.jpg");
img.loadPixels();
int leftTopIndex = 0;
int rightTopIndex = img.width - 1;
int leftBottomIndex = img.width * (img.height - 1);
int rightBottomIndex = img.width * img.height - 1;
color leftTopColor = img.pixels[leftTopIndex];
color rightTopColor = img.pixels[rightTopIndex];
color leftBottomColor = img.pixels[leftBottomIndex];
color rightBottomColor = img.pixels[rightBottomIndex];
color middleColorTop = lerpColor(leftTopColor, rightTopColor, 0.5);
color middleColorBottom = lerpColor(leftBottomColor, rightBottomColor, 0.5);
color middleColor = lerpColor(middleColorTop, middleColorBottom, 0.5);
tint(255, 127);
image(img, 0, 0, width, height);
fill(leftTopColor);
ellipse(width / 4, height / 4, 100, 100);
fill(rightTopColor);
ellipse(3 * width / 4, height / 4, 100, 100);
fill(leftBottomColor);
ellipse(width / 4, 3 * height / 4, 100, 100);
fill(rightBottomColor);
ellipse(3 * width / 4, 3 * height / 4, 100, 100);
fill(middleColor);
ellipse(width / 2, height / 2, 100, 100);
}
void draw() {
}作った感想
ピクセルの読み込み方の知識が深まった作品。
ワタタクそれでは今日もレッツワクワクコーディング。
