filled = new boolean[10][10][5]; for (int i = 0; i < filled.length; i++) for (int j = 0; j < filled[0].length; j++) for (int k = 0; k < filled[0][0].length; k++) if (random(1) < 0.4) filled[i][j][k] = true; }
void draw() { if (mousePressed) record = true; if (record) {// set up PGraphicsPDF for use with beginRaw() PGraphicsPDF pdf = (PGraphicsPDF)beginRaw(PDF, "pdf_complex_out.pdf"); //pdf.ortho(0, width, 0, height, 1000, -1000); // set default Illustrator stroke styles and paint background rect. pdf.strokeJoin(MITER); pdf.strokeCap(SQUARE); pdf.fill(255); pdf.noStroke(); pdf.rect(0,0, width,height);