float x1,y1,x2,y2; float x3,y3,x4,y4; int r = 15; int r2 = 45; int v = 30; float spin = 0; void setup() { size(200, 200, P3D); stroke(255); // Set line drawing color to white noStroke(); fill(100); framerate(30); } void draw() { background(0); lights(); if(mousePressed){spin-=5;} //lights(); translate(100,100); //rect(0,0,10,10); rotateY(radians(spin)); scale(.5); rotateY(radians(35)); for (int x=0; x< 360; x+=v){ x1 = r * cos(radians(x)); x2 = r * cos(radians(x+v)); y1 = r * sin(radians(x)); y2 = r * sin(radians(x+v)); x3 = r2 * cos(radians(x)); x4 = r2 * cos(radians(x+v)); y3 = r2 * sin(radians(x)); y4 = r2 * sin(radians(x+v)); beginShape(QUAD_STRIP); vertex(x1, y1, 0); vertex(x3, y3, 100); vertex(x2, y2, 0); vertex(x4, y4, 100); endShape(); } }