xxxxxxxxxx
60
let vaporwave = [
// (220, 220, 220),
"#ff71ce33", //66",
"#01cdfe33", //66",
"#05ffa133", //66",
"#b967ff33", //66",
"#fffb9633", //66",
];
let pts_t;
let scale = 20;
function setup() {
createCanvas(800, 800);
background(20);
pts_t = [];
for (let i = 0; i < vaporwave.length; i++) {
pts_t.push(random(0,TWO_PI));//i * random(1, 13));
}
}
function draw() {
// if (frameCount % 100 == 0) background(color(20,20,20,20))
translate(width / 2, height / 2);
for (let i = 0; i < pts_t.length; i++) {
let t = pts_t[i];
// let y = height/2 + 55 * cos(x) + 0.5 * tan(0.5/x);
for (let _scale = 0.1; _scale < scale; _scale += 0.25) {
let x = _scale * (16 * sin(t) * sin(t) * sin(t));
let y =
random(-5, 5) +
-_scale * (13 * cos(t) - 5 * cos(2 * t) - 2 * cos(3 * t) - cos(4 * t));
let c = color(random([20,random(vaporwave)]));
c.setAlpha(20);
stroke(vaporwave[i]);
fill(c);
let r = random();
if (r < 0.99) point(x, y);
// else if (r < 0.8) line(0, 0, x, y);
else {
rectMode(CENTER);
square(x, y, random(1, 5));
}
}
pts_t[i] += random(0.01, 0.5);
// if (x > width-1) x = 0;
// pts_x[i] = x;
}
// background(220);
}
function keyPressed() {
if (key == "s") saveGif("heart.gif", 30);
}