I'm investigating possibilities that Processing gives regarding generative art, and I stumbled upon a problem:
I'd like to generate multiple Bezier curves using a while loop. However, the program skips parts of some curves, while others are drawn properly.
Here's a working example:
void setup() { size(1000,500); background(#ffffff); } float[] i_x = {1,1}; float[] i_y = {1,1}; void draw() { while (i_y[0] < height) { bezier(0,i_y[0],100,height-100,width - 100,height-100,width, i_y[0]); i_y[0] = i_y[0] * 1.1; } save("bezier.jpg"); }
And here is the output. As you can see, only few of the curves are drawn in their full shape.
Also, when I draw one of the 'broken' curves out of the loop, it works fine.
I'd appreciate any help. I'm having good time learning coding concepts with visual output that Processing provides.