Monday, September 28, 2009

Homework 2: Repetition









(a) generate 100 rectangles















(b) modify textbook program














(c) simulate picture







In this homework, it seems difficult to write program to generate the pictures above. After reading pdf textbook, it seems easy.

so this week, the important points:


Each program can have only one setup() and one draw().

When the program starts, the codeoutside of setup() and draw() is run.

Next, the code inside the setup() block is run once.

After that, the code inside the draw() block is run continuously until the program is stopped.


so that's all this week!!

No comments:

Post a Comment