please format code with </> button * homework policy * asking questions

Hello,

So I was wondering how can I (or if i can) randomize the colors in the set of code.

This is my code for now, it is basiclly parametric lines.

static final int NUM_LINES = 30;

float t;

void setup() {

background(10);

size (500, 500);

}

void draw() {

background(10);

stroke(225);

strokeWeight(4);

translate(width/2, height/2);

for (int i = 0; i < NUM_LINES; i++) {

line(x1(t + i), y1(t + i), x2(t + i), y2(t + i));

}

t += 0.4;

}

float x1(float t) {

return sin (-t / 10) * 100 + sin (t / 6) * 20 ;

}

float y1(float t) {

return cos (-t / 10) * 100;

}

float x2(float t) {

return sin (-t / 10) * 100 + sin (t) * 2 ;

}

float y2(float t) {

return cos (-t / 20) * 200 + cos(t / 12) * 20;

}

I have tried many different ways but none of them seem to work. I would appreciate any help with the code.

Thanks