//import processing.opengl.*; // Rotate 3D // by REAS // Rotating simultaneously in the X and Y axis. // Transformation functions such as rotate() are additive. // Successively calling rotate(1.0) and rotate(2.0) // is equivalent to calling rotate(3.0). // Updated 21 August 2002 float a = 22; double phi=0.01, ddphi=0.01234, dphi=0.001, dddphi=0.0000004; float dolly=-600, rSize, zStretch=1.0, stepSize=8.0, turnRate=0.01, xRot=0, yRot=0, xOld=0, yOld=0, transp=12; int i=0, limit=800; boolean clearBackground=true; void setup() { size(400, 400, P3D); rSize = 6; noStroke(); fill(204, 204); framerate(30); background(0); colorMode(HSB, 100); } void draw() { if (clearBackground) background(0); translate(width/2, height/2, dolly); phi=0; dphi=0; ddphi+=dddphi; rotateX(xRot); rotateY(yRot); //spotLight(255, 255, 255, 60, 20, 40, -1, 0, 0, PI/2, 2); //pointLight (255, 0, 255, width/2, height/2, 0); //lights(); //beginCamera(); for (i=0; i