int canvasWidth = window.innerWidth;
int canvasHeight = window.innerHeight;
int canvasMax = max(canvasHeight, canvasWidth);
int canvasMin = min(canvasHeight, canvasWidth);
int[] primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47];
size(canvasWidth, canvasHeight);
for (int j = 0.0; j < n; j++) {
int idx = j % primes.length;
int q = primes[primes.length - idx];
canvasWidth / n * (b ? n - j : j),
canvasHeight / n * (b ? j : n - j),
canvasMin / 2 / n * (b ? j : n - j),
(b ? -1 : 1) / (b ? p : q) * j,
phone(min(canvasWidth, canvasHeight) / 2, mouseX, mouseY, 0, 0, 0);
void liney(x, y, l, r, speed) {
int xi = (x + t * speed) % canvasWidth;
int yi = (y + t * speed) % canvasHeight;
int ri = (PI / 3.0) * (r * t * 0.01);
linePolar(xi, yi, l, ri);
void linePolar(x, y, l, a) {
line(-xa2 + x, -ya2 + y, xa2 + x, ya2 + y);
void phone(width, x, y, frameX, frameY, i) {
int height = 1.8 * width;
int innerWidth = width * 0.9;
int innerHeight = height * 0.8;
int innerX = innerWidth + x;
int innerY = innerHeight + y;
strokeWeight(width / 20);
rect(x, y, width, height, r);
rect(x, y, innerWidth, innerHeight, r * 0.2);
phone(width / 2, x, y, innerX, innerY, i + 1);