xxxxxxxxxx
void setup() {
size(1280, 640, P3D);
frameRate(30);
smooth(8);
}
void draw() {
background(255,192,203);
pushMatrix();
noStroke();
translate(width*0.47, height*0.46, 20);
scale(0.75);
rotateZ(PI*0.25);
rotateY(frameCount*0.01);
int q=1;
for (float i=-3*PI; i<3*PI; i+=PI/24) {
q++;
pushMatrix();
translate(250*cos(i), 120*i, 250*sin(i));
fill(0);
sphere(40);
popMatrix();
if (q%4==0) {
pushMatrix();
stroke(0, 11, 24);
translate(125*cos(i), 120*i, 125*sin(i));
rotateY(-i);
fill(226+i*20, 29+i*14, 129+i*-57);
box(250, 40, 40);
popMatrix();
pushMatrix();
translate(-125*cos(i), 120*i, -125*sin(i));
rotateY(-i);
fill(255-226+i*20, 255-29+i*14, 255-129+i*-57);
box(250, 40, 40);
popMatrix();
noStroke();
}
pushMatrix();
translate(-250*cos(i), 120*i, -250*sin(i));
fill(12, 24, 36);
sphere(40);
popMatrix();
}
popMatrix();
pushMatrix();
fill(88, 89, 90);
noStroke();
translate(width*1.09, height*0.67, -360);
scale(0.50);
rotateX(-0.03);
rotateY(frameCount*0.02);
rotateZ(-3.05);
for (float i=-6*PI; i<10*PI; i+=PI/7) {
q++;
pushMatrix();
translate(250*cos(i), 120*i, 250*sin(i));
fill(24, 44, 63);
sphere(40);
popMatrix();
stroke(24, 44, 63);
pushMatrix();
translate(125*cos(i), 120*i, 125*sin(i));
rotateY(-1.0*i);
fill(226+i*20, 29+i*19, 129+i*-57);
box(250, 40, 40);
popMatrix();
pushMatrix();
translate(-125*cos(i), 120*i, -125*sin(i));
rotateY(-1.0*i);
fill(255-178+i*20, 255-17+i*21, 255-129+i*-7);
box(250, 40, 40);
popMatrix();
noStroke();
pushMatrix();
translate(-250*cos(i), 120*i, -250*sin(i));
fill(24, 44, 63);
sphere(40);
popMatrix();
}
popMatrix();
stroke(128, 128, 128, 0.48);
pushMatrix();
translate(width*0.58, height*0.50, -352);
int xmin=1147;
int ymin=672;
for (int i=-xmin; i<xmin; i+=40) line(i, -ymin, i, ymin);
for (int i=-ymin; i<ymin; i+=40) line(-xmin, i, xmin, i);
popMatrix();
}