Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this program we use two special functions:

  • void setup ()
  • void draw ()

These functions accept no parameters so the space between the brackets is left blank, and they have no return value so the 'void' keyword is used . The function names are reserved names that Processing knows, Processing calls these (this will make more sense when we look at writing our functions). Processing calls the setup functions as soon as the corresponding event occurs.the program starts, and the draw function every time the screen refreshes. We will use these two functions for all of our future processing sketches.  

Exercise 3:

Take your results to form exercise 2, and modify it so it animates across the screen. 

...