level 1
yuhuquan1818
楼主
写的代码 想导出pdf格式 可是最后显示 Error on ""finished"" 谁能帮我看看哪里出错了呀
import processing.pdf.*;
void setup() {
size(400, 400, PDF, "filename.pdf");
}
void draw() {
smooth();
noLoop();
}
void draw() {
translate(350, 350);
for (int an=1; an<1600;an++) {
rotate(2*PI/an);
fl();
}
}
void fl() {
noFill();
beginShape();
vertex(0, 0);
int c1 = int(random(20, 10));
int c2 = int(random(-50, 800));
int c3 = int(random(800, -50));
int c4 = int(random(10,100));
stroke(0, 0, 0, 100);
bezierVertex(c2, c2, c1, c2, c1, c2);
bezierVertex(c1, c2, c1, c2, c1, c2);
bezierVertex(c4, c4, c3, c4, c3, c3);
bezierVertex(c4, c4, c3, c4, c3, c4);
endShape();
fill(50, 40, 63, 00);
noStroke();
ellipse(c1, c2, 5, 5);
}
// Exit the program
println("Finished.");
exit();
}
2015年09月24日 16点09分
1
import processing.pdf.*;
void setup() {
size(400, 400, PDF, "filename.pdf");
}
void draw() {
smooth();
noLoop();
}
void draw() {
translate(350, 350);
for (int an=1; an<1600;an++) {
rotate(2*PI/an);
fl();
}
}
void fl() {
noFill();
beginShape();
vertex(0, 0);
int c1 = int(random(20, 10));
int c2 = int(random(-50, 800));
int c3 = int(random(800, -50));
int c4 = int(random(10,100));
stroke(0, 0, 0, 100);
bezierVertex(c2, c2, c1, c2, c1, c2);
bezierVertex(c1, c2, c1, c2, c1, c2);
bezierVertex(c4, c4, c3, c4, c3, c3);
bezierVertex(c4, c4, c3, c4, c3, c4);
endShape();
fill(50, 40, 63, 00);
noStroke();
ellipse(c1, c2, 5, 5);
}
// Exit the program
println("Finished.");
exit();
}