xxxxxxxxxx
45
const N = 100,
txt = 'Definitely not a grid';
let d = 0, R
function setup() {
createCanvas(1080, 1080);
textFont('sans-serif');
textAlign(CENTER);
noLoop()
fill(30);
R = Math.hypot(width, height) / 3;
}
function draw() {
background(250);
for (let i = 0; i < txt.length; i++) {
const r = R * Math.sqrt(Math.random()),
theta = Math.random() * TWO_PI;
let x = (width * 0.2) + (i/txt.length) * (width * 0.6),
y = height/2;
for (let n = 0; n < N; n++) {
textSize(12 + n/N * 255);
stroke(n/N*255);
const v = 300 * noise( d + (x/width) - 0.5, d + (y/height) - 0.5)
x += Math.cos(v) * R * 0.007;
y += Math.sin(v) * R * 0.007;
text(txt[i], x, y);
}
}
}
function mouseClicked() {
d++;
redraw()
}
function keyPressed(e) {
if (e.key === 'd' || e.key === 'D') {
save(txt + '-genuary18');
}
}