Hi all, I’m an extreme novice coder taking a generative art course.
I am trying to save the image I created with a series of for loops and random functions (I included one in the script below) but it is not saving the image in the Processing>>document folder at all, or anywhere from what I can tell.
int alpha = 10;``
void setup() {
size (1280, 548);
background(205, 198, 188);
noFill();
for (int i = 0; i < 40; i++) {
if (i < 30 && i > 15) {
stroke(150, 144, 132, alpha);
} else {
stroke (150, 144, 132);
}
quad(994 + random(-20, 20),
415 + random(-20, 20),
1108 + random(-20, 20),
415 + random(-20, 20),
1108 + random(-20, 20),
520 + random(-20, 20),
994 + random(-20, 20),
520 + random(-20, 20));
}
}
void keyReleased() {
if (key == 's') {
saveFrame();
}
}
If you run it and it does create an image or if you see any egregious errors in the keyReleased() or saveFrame() syntax please let me know!