float t;
void setup(){
//size(720,404, P3D);
fullScreen(P3D);
t=0;
textSize(32);
}
void draw(){
background(20);
noFill();
stroke(#74F599);
lights();
pushMatrix();
translate(width/2, height/2, 200 * sin(t));
rotateY(t);
rotateX(PI/6);
sphere(300);
fill(#74F599);
textMode(CENTER);
text(str(second()*19840921),0,0,0);
popMatrix();
String time_now = str(year()) + " - " + str(month()) + " - " + str(day()) + " - " + str(hour()) +" : " + str(minute()) +" : " + str(second());
text(time_now,100,150,0);
text("Frame count: " + str(frameCount),100,200,0);
t = (t + 0.01) % TWO_PI;
}
void mouseClicked(){

本文是Processing 3D编程的初探,通过实例介绍如何使用Processing创建简单的3D作品,适合初学者了解3D绘图的基础概念和技术。

9438

被折叠的 条评论
为什么被折叠?



