float t=1;
void setup() {
size(800, 800);
}
void draw() {
background(0);
noStroke();
fill(255);
translate(width/2, height/2);
for (int i = 0; i < 100; i++) {
float x = width/4 * sin(t*i*PI*2);
float y = height/4 * sin(t*i*PI*3);
rect(x,y,2,2);
}
t += 0.00001;
}

Hello,
I have this system of equations that cause the points to move like on a Lissajous curve. I’m trying to add a third dimension to it and be able to change the point of view of the camera to visualize what is happening.
I understand that I have to change rectangles to cubes and add a variable z, but I don’t know how to do it. I have tried something with Peasycam but I don’t know how to change the position of the cubes.
Any help or idea?
Thank you very much