首页 > 代码库 > 【processing】小代码5

【processing】小代码5

3D

void setup(){  size(500,500,P3D);}void draw(){  background(0);  lights();  noStroke();  translate(250,400,-500);  rotateY(PI/6);  box(500,100,500);  translate(0,150,0);  box(500,100,500);  translate(0,-400,100);  sphere(200);}

---------------------------------------------------------------

void setup(){  size(500,500,P3D);}void draw(){  background(0);  lights();  noStroke();  translate(250,400,-500);  rotateY(PI/6);  box(500,100,500);  translate(0,150,0);  box(500,100,500);  translate(0,-400,100);  sphere(200);}

整个阵列沿Y轴旋转运动

-----------------------------------------------------------------------------

【processing】小代码5