この記事を書いた人

上達の研究家 / アーティスト
「才能」ではなく「発見」で描く。文系・36歳からの上達ハック。
- ゼロから独学でクリエイティブコーディングに挑戦し、以下の実績を達成
- 開始1年8ヶ月目までに公募6つに挑戦し、3つ入選(勝率50%)
- 開始1年9ヶ月目に、虎ノ門ヒルズ49階、地上250mのインフィニティプールへ作品提供・展示
- 【上達の秘密】
- 起源の物語:未経験から虎ノ門ヒルズ展示までの全記録(Genesis)
- 思考の技術:「上達」をシステム化する、モレスキン6冊の運用設計図
- ※虎ノ門ヒルズでの実績を出した「思考」と「経験」を、再現可能な形に体系化
目次
作品の画像とコード

アニメーション。
Ball[] balls = new Ball[300];
color[] colors = {#606c38, #283618, #fefae0, #dda15e, #bc6c25};
void setup() {
size(600, 600);
smooth();
noStroke();
frameRate(30);
for (int i = 0; i < 300; i++) {
balls[i] = new Ball(random(5, 10), width / 2, i * (height / 300), colors[i % colors.length], i * 0.1);
}
}
void draw() {
background(#fefae0); // 背景色を変更
for (int i = 0; i < 300; i++) {
balls[i].update();
}
}
class Ball {
float radi, posx, posy, angle;
color clr;
Ball (float r, float x, float y, color c, float a) {
radi = r;
posx = x;
posy = y;
clr = c;
angle = a;
}
void update() {
posx = width / 2 + cos(angle) * 200; // 水平方向の移動
posy = angle * 10 % height; // 垂直方向の移動をカバー
angle += 0.2;
fill(clr);
ellipse(posx, posy, radi * 2, radi * 2);
}
}作った感想
約1週間ぶりくらいにに作成した作品。
また作品づくりをやっていこう。
ワタタクそれでは今日もレッツワクワクコーディング。

