xxxxxxxxxx
35
//insanely easy and kinda cool. cant be difficult to do this with like an svg or other linework, however:
// performance is shit (obviously)
// its always drawn from the center
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
let res = 5;
let nr = 1.25;
let arr = [];
let disp = width;
for(let i=0;i<width;i+=res){
arr.push([]);
for(let j=0;j<width;j+=res){
let nv = noise(i/width * nr,j/height * nr,millis()*0.0003) - 0.5;
point(i + (width/2 - i) *nv*2, j + (width/2 - j) *nv*2);
// arr[int(i/res)].push({x:i + (i-width/2) *nv *2, y: j + (j-width/2) *nv*2});
// arr[int(i/res)].push({x:i + disp *nv - disp/2, y: j + disp *nv - disp/2});
}
}
// for(let i=0;i<arr.length-1;i++){
// for(let j=0;j<arr[i].length-1;j++){
// line(arr[i][j].x, arr[i][j].y, arr[i+1][j].x, arr[i+1][j].y);
// line(arr[i][j].x, arr[i][j].y, arr[i][j+1].x, arr[i][j+1].y);
// }
// }
}