円のループ
/** * loop of circles * * @author aa_debdeb * @date 2016/12/23 */ int NUM = 24; void setup(){ size(640, 640); noStroke(); } void draw(){ background(0, 0, 30); translate(width / 2, height / 2); for(int i = 0; i < NUM; i++){ float angle = i * TWO_PI / NUM; float v = pow(abs(sin(angle / 2 + frameCount * 0.03)), 4); float r = map(v, 0, 1, 10, 20); fill(lerpColor(color(255, 0, 191), color(191, 255, 0), v)); ellipse((150 + r) * cos(angle), (150 + r) * sin(angle), r * 2, r * 2); } }