Lab-Programming with Processing
First Steps in Programming with Procesing.
For the first sketch I used a picture of Josef Albers:
Joseph Albers Processing Sketch
(link to the original image)
For the second sketch I built a paintbrush that can be used in a drawable area and I create a clear button that erases everything that had been drawn so far: