Variations
A pretty boring variant
For loops
LFMP_02_02_01
To begin with, this is a pretty boring variant. But you always have to start somewhere. Anyway, I've increased the display size to 1000 x 1000 again. background (128); I made the background slightly darker. This makes the lines stand out better. strokeWeight (1); The line thickness changes from 4 to 1 pixel. strokeCap (SQUARE); This rule may no longer be so relevant because a line width of 1 pixel always starts and ends the same. Whether you make it square, round or project. for (int x = 0; x < (height - 2); x += 4) { I replaced the variable h with x. Because we use horizontal lines. x = 0. If x is smaller than height - 2. Then 4 pixels are added to x. stroke (0, 255 - x / 16); These are the black lines with a transparency of 255 - x divided by 16. Where did the 16 come from? I removed the 16. But then you can see that the horizontal lines already stop at a quarter of the top. Dividing by 16 makes the greyscale better distributed in height. And thus remain visible all the way to the bottom. line (0, x, width, x); The black lines run the full width of the display window. stroke (255, x / 4); This rule provides the white lines with their transparency. Again, the transparency of x / 4 provides a better spread in the height of the white. line (0, x, width, x); The white lines also run over the full width of the display window.
15