curveVertex02
float radius = 100; int centx = width/2; int centy = height/2; void setup() { size(500, 500); colorMode(HSB, 360, 100, 100, 100); background(0, 0, 100); noFill(); frameRate(24); smooth(); } void draw() { noStroke(); fill(0, 0, 100, 10); rect(0, 0, width, height); float r = sin(frameCount)*20; translate(width/2, height/2); rotate(r); float x, y; float noiseval = random(10); float radVariance, thisRadius, rad; for (int i =0; i < 100; i += 1) { beginShape(); for (float ang = 0; ang <= 360; ang += 1) { noiseval += 0.05; radVariance = 30*customNoise(noiseval); thisRadius = radius + radVariance; rad = radians(ang); x = centx + random(-10, 10) + (thisRadius * cos(rad)); y = centy + random(-10, 10) + (thisRadius * sin(rad)); stroke(360, 0, 0); strokeWeight(0.3); curveVertex(x, y); } endShape(); } radius += 10; if ( radius > 300){ radius = 100; } } float customNoise(float value) { float retValue = pow(sin(value), 3); return retValue; }
curveVertex01の改良.線画にした.発表の準備が煮詰まって,Processingの練習に手を出している.自分としてはfor
文を追加できて,しっかりと動いたところが収穫.しかし,発表準備がヤバイ.