1 minute read
The system variable frameCount
LFMP_02_02_02 stroke (0, x / 4); x was divided by 16 in the previous draft but is divided by 4 here. The reason is that this gives a higher contrast between the two parts. line (500, x, width, x); line (0, x, width - 500, x); if (frameCount >= 0.1) surface.setLocation (0, 0);
A first change is to cut the image vertically in half. All other settings, other than those I mention below, have remained the same.
Advertisement
The black horizontal lines now start at half the display window and end on the right. For 500, of course, I could have used width / 2.
The white lines start on the left and end at half the display window. And again, for the number 500, I also could have used width / 2.
I did add a draw () block in the meantime. This is because I find it very inconvenient that every time when I run a program version, the graph is displayed on top of the program editing window. In the draw () block, I entered the above line. The system variable frameCount contains the number of frames that have been displayed since the program started. So if frameCount is greater than 0.1 then the display window (surface.setLocation) is set to 0.0. And that‘s the point at the top left of my iMac. Below the pulldown menus and the Apple icon.
Variations
For loops