HW 1, due Fri, Jan 18
Use Processing to create sketches that do the following.
- [40 pts]
Draw a scene. Your sketch must include the following elements:
- At least ten objects, including an ellipse, a rect, and a line
- At least four colors, including the background, a stroke, and a fill
- A use of partial transparency to see through an object
- [30 pts]
Have your scene react to the position of the mouse, with the x and y coordinates controlling at least two different aspects of the scene (e.g., size of one object and color of another).
Comment your code to describe the reaction and how it is done. - [30 pts]
Have your scene respond to a mouse-over (changing an object when the mouse is inside it) and a mouse press (changing an object when the mouse is pressed inside it).
Comment your code to describe the responses and how they are done.
Use reasonable and consistent indentation and whitespace (along with comments) to make the source clear and comprehensible for another human reader (i.e., both you and your grader). Maximum credit is given for nicely readable code. Turn in your sketches in the usual way:
- Electronic
- Using Blackboard, turn in before the start of class a zip file for each sketch. To produce a zip file, use the menu "Tools" / "Archive Sketch". In Blackboard, go to Assignments tab, select HW 1, and then use the "complete assignment" option. Do not use the digital dropbox.
- Hardcopy
- Print out and turn in at the start of class a printout of each sketch. Processing has a print command in the "File" menu. Be sure your name is on the printouts.