Using the background(0) command as the first line in the draw() function, it will "erase" the screen, and your drawing will appear to be animated.
Watch this video: http://funprogramming.org/6-Animate-white-lines-across-the-display.html [Video 6]
Write a program to continuously draws white lines that start in the center of the screen, and touch the bottom edge of the screen somewhere, like this:
Click on this image to see animation