Sunday, September 20, 2009

Homework 2: Repetition

HW02-1:

(a) Write a processing program to create a picture with 100 rectangles whose sizes, colors, and locations are randomly generated by your program.





(b) Write a program to generate the above picture every second.
* Go to Page 176 of the PDF file to learn the continuous structure of Processing.



The goal of HW02-1 is to learn functions of setup(), draw(), loop() and random().


HW02-2:

Run the codes in pages 65-67 and modify them to create your own picture.


The goal of HW02-2 is to learn nested for loops.


HW02-3:



Write a processing program to simulate the following picture. The size of the picture is 800x600 and it can be divided into 12(=4x3) cells with size of 200x200. Each cell includes 3 ellipses with different colors and size.


No comments:

Post a Comment