float myNoise = 0.0; //ノイズの初期値 float start = 0.0; //noiseのスタート地点 float step = 0.01; //ステップの数値が少ないと変化が滑らかになる void setup() { size(400, 400); } void draw() { background(20,20,90); stroke(20,180,220); myNoise = start; //noiseをスタート地点で初期化 translate(width/2, height/2); //座標軸を真ん中にする for (float x = 0; x <360; x=x+0.5) { // xの値が360以下の間、xは0.5ずつ増える。 float length = noise(myNoise) * 300;//線の長さ line(length*cos(radians(x/2)), length*sin(radians(x)), 0, 0); //中心から線を描く myNoise += step; //ノイズの値を更新 } } void mousePressed() { start = random(200); //noiseのスタート位置を変える }