level 3
zzzlsg☜
楼主
【求改球体颜色与背景!】急急急
void setup(){
size(600, 600, P3D);
}
void draw(){
background(2389);
translate(width/2, height/2);
rotateX(-PI/12);
rotateY(map(mouseX, mouseY, width, -PI, PI));
noStroke();
spotLight(0,255, 255, 80, 20, 40, -1, 0, 0, PI/2, 2);
translate(0, 20, 0);
sphere(40);
pushMatrix();
translate(0, 0, 200);
sphere(30);
popMatrix();
pushMatrix();
translate(0, 0, -200);
sphere(20);
popMatrix();
pushMatrix();
translate(200, 0, 0);
sphere(10);
popMatrix();
pushMatrix();
translate(-200, 0, 0);
sphere(40);
popMatrix();
}
2017年06月22日 22点06分
1
void setup(){
size(600, 600, P3D);
}
void draw(){
background(2389);
translate(width/2, height/2);
rotateX(-PI/12);
rotateY(map(mouseX, mouseY, width, -PI, PI));
noStroke();
spotLight(0,255, 255, 80, 20, 40, -1, 0, 0, PI/2, 2);
translate(0, 20, 0);
sphere(40);
pushMatrix();
translate(0, 0, 200);
sphere(30);
popMatrix();
pushMatrix();
translate(0, 0, -200);
sphere(20);
popMatrix();
pushMatrix();
translate(200, 0, 0);
sphere(10);
popMatrix();
pushMatrix();
translate(-200, 0, 0);
sphere(40);
popMatrix();
}