Hi.
This is my first attempt at Processing, sorry for the silly questions.
I need to save frames at 300 dpi minimum for professional printing.
I tried to use a frame 4 times the size of my monitor, but I really need to see what's happening when I record so it does not work for me.
Instead I tried to use the PDF library but I only save 'blank' frame, I don't understand why.
Is there a better way of saving at high resolution, if not, can you tell me what's wrong with my code?
Thank you for your help!
import processing.pdf.*;
boolean record;
int num = 60;
int colorL=255,k = 0,j=100,i=200;
float x,y,z;
float r,th=0,step=.1,epi=200;
float m = 1,n1=-1,n2=0,n3=0;
float b=1,a=1;
int counter1=0, counter2=0;
void setup()
{
size(1800,1100);
background(0);
frameRate(50);
smooth();
}
void draw() {
if (record) {
// #### will be replaced with the frame number.
beginRecord(PDF, "frame-####.pdf");
}
{
fill(0,5);
rect(-5, -5, 1805, 1105);
counter1++;
if (counter1 == 75) {
m=int(random(3,60));
n1=random(2);
n2=random(2);
n3=random(.1);
epi=random(50,200);
step=random(.01,10);
counter1 = 0;
}
translate(mouseX, mouseY-100);
stroke(colorL,35);
noFill();
beginShape();
for(int i=1; i < num; i++) {
r = epi*pow(((pow(abs(cos(m*th/5)/a),n2))+(pow(abs(sin(m*th/5)/b),n3))),(-1/n1)) * random(10000)/random(1000);
th = th + step;
x = r*cos(th);
y = r*sin(th);
curveVertex(x,y);
}
endShape();
if (record) {
endRecord();
record = false;
}
}
}
// Use a keypress so thousands of files aren't created
void mousePressed() {
record = true;
}