Code and Printer

So these for loops are drawing the lines, one line at the time and each is drawn from left to right and along the height of the sketch. Notice that the u() function is defining the vertical separation of those base lines. Each line will have a unique pattern defined by their associated perlin noise.

Related to fval in the block where fval is compared to fvalBuffer, it is not clear what this function does. I mean, it does some sort of comparisons. This is why it is important for people to comment their own code, so it makes sense when somebody else reads it. Notice that you can remove this code and define fval=0.5 and the code would still run and show all the lines and waves. The value of fval affects the amplitude shown in the sketch.

Kf