Files
UoL/CM2030 Graphics Programming/Topic 6/6.3.3 3DNoise/sketch.js
2021-06-27 00:37:17 -05:00

24 lines
428 B
JavaScript

function setup() {
createCanvas(200, 200);
background(0);
rectMode(CENTER);
}
function draw() {
background(0);
noiseDetail(10);
noisyGrid();
}
function noisyGrid(){
for (var x=0; x<width; x+=1){
for (var y=0; y<height; y+=1){
var n = noise(x/100, y/100, frameCount/50);
var c = map(n, 0, 1, 0, 255);
stroke(c)
point(x, y);
}
}
}