Begin with the SetupDraw.pde example. This sketch structure establishes two core functions; the setup function that is called at the startup of the app, and a draw function which will be called in a loop until the app closes. In this example a single variable is used to manage the y position of a line drawn with the line() method. A conditional, if statement, is used to reset the value when it falls outside of the size of the window.
Explore the shape methods such as
Using the above examples as a point of departure, create your own unique scripted drawing. Add a for loop to the sequence to add multiplicity to the drawing. Experiment with conditionals and simple mathematic expressions to add variation.