import processing.pdf.*; int i; float xspeed = 0.93; float yspeed = 0.92; float zspeed = 0.9; float xradius = 200.0; float yradius = 240.0; float zradius = 480.0; float currentX, currentY, currentZ, currentWidth, currentHeight, zAngle, zRad, xAngle, yAngle, xRad, yRad, curR, scales; void setup() { size(500, 500); smooth(); noFill(); background(255); beginRecord(PDF, "output19.pdf"); } void draw() { i++; xAngle += xspeed; yAngle += yspeed; zAngle += zspeed; xRad = xAngle * PI/180; yRad = yAngle * PI/180; zRad = zAngle * PI/180; //currentX = cos(xRad) * (200 - sqrt(i) * 30) + cos(zRad)+150; // currentY = sin(zRad) * (200 - sqrt(i) * 30) + sin(xRad)+150; currentX = sin(xRad) * xradius + 270; currentY = cos(yRad) * yradius + 200; // currentZ = sin(zRad) * zradius + 200; currentWidth = sin(xRad) * 50 + 80; currentHeight = cos(yRad) * 50 + 80; //noStroke(); stroke(random(255), random(33), random(33)); //println(currentX); curR += 0.001f; rotate(curR); //fill(random(255), random(50), random(50), 100); //noStroke(); ellipse(currentX, currentY, currentWidth, currentHeight); //fill(255, 0, 0, random(100)); //stroke(random(255), random(255), random(255), random(100)); //ellipse(currentX, currentY, currentWidth/2, currentHeight / 2);//sin(yRad) * 100); // ellipse(currentX, currentY, currentWidth/4, currentHeight / 4);//sin(yRad) * 100); } void mousePressed() { endRecord(); println("record ended."); exit(); }