very strange, works all well, but when i put ellipseMode to corner i have a white PDF file which will not open in acrobat???
here is the code:
Code:import processing.pdf.*;
float h,cx1,cy1,cx2,cy2;
float num;
float rand;
void setup()
{
size(1000,1000);
background(255);
frameRate(12);
smooth();
beginRecord(PDF,"bugtestX.pdf");
}
void draw(){
rand = (mouseX);
for(int i=0; i<1; i++) {
initRing();
fill(255,random(150));
stroke(0,random(100)+150);
strokeWeight (1);
drawRing(random(width),random(height),random(0.5,1));
}
}
void drawRing(float x,float y,float rad) {
pushMatrix();
translate(x,y);
scale(rand/300);
for(float i=0; i<11; i++) {
for(int k = 0; k < 40; k ++) {
//ellipseMode(CORNER); ////////////////////!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ellipse(cx1,cy1,cx2/k,cx2/k);
rotate(radians(360/num));
}
}
popMatrix();
}
void initRing() {
num=(int)random(9,29);
h=random(150,200);
cx1=random(0,200);
cy1=random(0,h/2);
cx2=random(0,100);
cy2=random(h/2, h);
}
void mousePressed() {
endRecord();
exit();
}