xxxxxxxxxx
// Adapted from work by yonatan https://www.dwitter.net/d/10757
// for(i=c.width=99;i--;)for(j=58;j--;x.fillRect(i,j,1,1))k=(50-i)/(z=j-27),x.fillStyle=R(q=z>0?S(j*j+k-t*7)*C(j**3-k*3+t)*z/2+60-j:j+9,q*=4,q)
t = f = 0;
function setup() {
createCanvas(800, 500);
background(0);
noStroke();
}
function draw() {
push();
scale(8);
t += 0.02;
for (i = 99; i--; ) {
for (j = 60; j--; ) {
k = (50 - i) / (z = j - 27);
q = z > 0 ? (sin(j * j + k - 7 * t) * cos(j ** 3 - 3 * k + t) * z) / 2 + 60 - j : j + 9;
fill(2 * q, 2 * q, 7 * q);
square(i, j, 1);
}
}
pop();
for (x = 780; x--; ) {
circle(x, (sin(x) * 1e3-t) % 222, x % 3);
}
}