Hello hello everyone, I used to export my svg with processing, but this time I can’t export a single svg with all the designs. Let me explain. Either it exports the first drawing, or it exports a file for each Frame. I would like it to export a single svg file with all the designs.
Thanks in advance for your help or advice
import processing.svg.*;
float a, b, a1, b1, c, d, c1, d1;
float x;
int y = 15;
/*
Enregistrement du temps
*/
int savedTime;
int totalTime = 500;
void setup() {
size(1280, 800);
background(255);
frameRate(1);
savedTime = millis();
a = random(x);
b = random(x);
a1 = random(x);
b1 = random(x);
}
void draw() {
x = width/y;
// Calculate how much time has passed
int passedTime = millis() - savedTime;
// Has five seconds passed?
for (int i = 1; i < (x*y); i = i+1) {
if (passedTime > i*totalTime) {
translate(x, 0);
}
}
for (int i = y; i < (x*y); i = i+y) {
if (passedTime > i*totalTime) {
translate(-(x*y), x);
}
}
if (passedTime > ((height/x)*y)*totalTime) {
noLoop();
}
// Get the end point
c = random(x);
d = random(x);
c1 = random(x);
d1 = random(x);
strokeWeight(1);
// Draw the line
line(a, b, a1, b1);
line(a, b, c, d);
line(c, d, c1, d1);
line(a1, b1, c1, d1);
strokeWeight(8);
point(a, b);
point(a1, b1);
point(c, d);
point(c1, d1);
// Set the end point as the new start point for the next loop
a = c;
b = d;
a1 = c1;
b1 = d1;
println(frameCount);
}