日常の進捗

主に自分のための,行為とその習慣化の記録

ノイズとランダム

コード

noise / 15 lines of code

fullScreen();
noiseSeed(100);
noFill();
beginShape();
for (float x = 0; x <= width; x += width/30) {
  float y = map(noise(x*0.001),0,1,0,height);
  vertex(x, y);
}
endShape();
fill(0, 0, 100);
for (float x = 0; x <= width; x += width/30) {
  float y = map(noise(x*0.001),0,1,0,height);
  ellipse(x, y, width/30, width/30);
}

random / 15 lines of code

fullScreen();
randomSeed(100);
noFill();
beginShape();
for (float x = 0; x <= width; x += width/30) {
  float y = random(0, height);
  vertex(x, y);
}
endShape();
randomSeed(100);
fill(0, 0, 0);
for (float x = 0; x <= width; x += width/30) {
  float y = random(0, height);
  ellipse(x, y, width/30, width/30);
}