// noise() (パーリンノイズ)の引数2つの場合のテスト // マウスカーソルのx,y座標でノイズの形を変える float noiseScale=0.02; void setup() { size(512, 512); } void draw() { // background(0); for (int x=0; x < width; x++) { float px = (mouseX + x) * noiseScale; float py = mouseY * noiseScale; float noiseVal = noise(px, py); stroke(noiseVal * 255); line(x, mouseY + noiseVal * 80, x, height); } }