int cycles = 1; float rotX, rotY; float last; float rest; int[] colsr = {200, 255,255, 255, 0, 0, 0}; int[] colsg = {100, 0, 255, 0, 255,255,0}; int[] colsb = {50, 0, 0, 255, 0, 255,255}; int col = 0; void setup() { size(800,600,P3D); frameRate(6); last = millis(); rest = 3000; background(255); } void draw() { translate(width/4,height/4); if ((millis()-last)>rest) { rotY = 0; rotX = 0; background(255); } rotateY(rotY); rotateX(rotX); drawaxes(); stroke(colsr[col],colsg[col],colsb[col]); spiral(100,100,0,50,PI/10,2,cycles); cycles++; if (cycles>10) { cycles = 1; } } void spiral(float x, float y, float z, float rad, float dr,float dh, float cycles) { float xx,yy,zz,a; float xxo,yyo,zzo; xxo=x+rad*cos(0); yyo=y+rad*sin(0); zzo=z-dh; zz = z-dh; for (int c=0;c