Hi! I created a new project! The Lissajous tables! Difficulty: 1000/10
int cx = 300, cy = 300,scl=60,a=10,b=10;
void setup() {
size(600,600);
}
void draw() {
background(0);
stroke(255);
for(int i = 1; i < a+1; i++) {
for(int j = 1; j < b+1; j++) {
for(int k = 0; k < 1000; k++) {
float a = TWO_PI/1000;
float x = scl/2 * cos(a*k*i), y = scl/2 * sin(a*k*j);
point(x+(i-0.5)*scl,y+(j-0.5)*scl);
}
}
}
}
or a shorter version:
size(600, 600);
for (int i = 1; i < 11; i++) for (int j = 1; j < 11; j++) for (int k = 0; k < 1000; k++) {
point(30 * cos(TWO_PI/1000*k*i)+(i-0.5)*60, 60/2 * sin(TWO_PI/1000*k*j)+(j-0.5)*60);
}
or a bit longer version
int scl = 60, a = 10, b = 10;
size(600, 600);
background(0);
stroke(255);
for (int i = 1; i < a+1; i++) for (int j = 1; j < b+1; j++) for (int k = 0; k < 1000; k++) {
point(scl/2 * cos(TWO_PI/1000*k*i)+(i-0.5)*scl, scl/2 * sin(TWO_PI/1000*k*j)+(j-0.5)*scl);
}