How do I save this as a video, without background?

This is My code (where do i add the saveFrames()? or what do I add?:

void setup() {
 background(600);
 size(800, 800);
 
}

void draw() {
 background(255);
 stroke(0);
 strokeWeight(1.4);
 scale(0.8);
  

 

 
 translate(width/1.7, height/1.6);
 
 for (int i = 0; i < NUM_LINES; i++) {
 line(x1(t + i), y1(t + i), x2(t + i), y2(t + i));
 }
 t += 0.3;
}

float x1(float t) {
  return sin(t / -10) * 100 + sin(t / 5) * 100;
}

float y1(float t) {
  return cos(t / 10) * 20;
}

float x2(float t) {
  return sin(t / 20) * 100 + sin(-t) * 2;
}

float y2(float t) {
  return cos(-t / 20) * 500 + cos(-t / 12) * 20;
}
1 Like

Hello,

and welcome to the forum!

Great to have you here.

Just at the end of draw().

see https://www.processing.org/reference/saveFrame_.html

and then use the movie maker in processing, Menu Tools

Warm regards, Chrisir

2 Likes

Thank you so much!
Everything is fine - was writing it in the wrong place

1 Like