hi,
ive created a wavey line and want to be able to repeat it at regular intervals until it reached the bottom of the page.
Any help would be great
heres my code
void setup() {
size(800, 800);
float a = 0.0;
float inc = TWO_PI/8.0;
float prev_x = 0, prev_y = 100, x, y;
for(int i=0; i<800; i=i+4) {
x = i;
y = 100 + sin(a) * 80.0;
line(prev_x, prev_y, x, y);
prev_x = x;
prev_y = y;
a = a + inc;
}
}
1