float r = 0;
float x = 0;
float y = 0;
float c = 0;
float d = 0;
float e = 0;
float f = 0;
float g = 0;
//if r reaches y axis then Stop;
//if r reaches x axis then Stop;
//if r reaches z axis then Stop;
void setup(){
size(600,600, P3D);
fill(#A8D3F5);
smooth();
}
void draw(){
float x = width / 2 + cos(r) * 200;
float y = height /2 + sin (r) * 200;
r = r + 0.1;
if(r > TWO_PI) {
loop();
}
background(HSB);
ellipse(random(width), random(height),3, 3);
translate(mouseX, mouseY, map(noise(r), 0, 1, -400, 300));
fill(255);
box(50);
r = r + 0.01;
r = r + 0.01;
rotateX(x);
fill(#F24B31);
box(50);
x = x + 0.01;
x = x + 0.01;
rotateX(y);
fill(#F24B31);
box(50);
y = y + 0.01;
y = y + 0.01;
rotateZ(y);
fill(#4735F0);
box(50);
c = c + 0.01;
c = c + 0.01;
rotateY(r);
fill(#35E8F0);
box(50);
g = g + 0.01;
translate(mouseX, mouseY, map(noise(x), 0, 1, -400, 300));
rotateX(r);
fill(#EBF568);
box(50);
f = f + 0.02;
rotateX(r);
fill(#F29531);
box(50);
c = c + 0.02;
rotateY(r);
fill(#C93DD1);
box(50);
d = d + 0.02;
r = r;
box(50);
r = r + 0.01;
r = r + 0.01;
rotateX(x);
fill(#F24B31);
box(50);
}