Individual Work 1 - Draw Your Stuff
[an error occurred while processing this directive]Directions
Read all directions before beginning your work.
The directions are pretty simple for this assignment: draw some cool stuff using Eclipse, Java, & Processing. Here are the constraints:
- Start by importing IW1Draw.zip into Eclipse.
- Use every variable and function on
the PW1 Reference Sheet at
least one time, with the following exemptions.
You may use these, but you are not required to.
-
PI -
TWO_PI -
background() -
ellipseMode() -
rectMode() -
noFill() -
noStroke()
-
- Draw at least one shape on top of another shape so that they overlap, but avoid drawing a larger shape completely on top a smaller shape (in other words, part of one of the shapes should be visible).
- Draw at least one thing that animates without the mouse moving.
The animation may use the mouse coordinates for help, but the
animation should happen at least part of the time without mouse
movement. Don't use the face-growing code from class, rather
use it as a reference to do your own animation. Here are some
other ideas, but I welcome anything fun and new.
- A visual object that scrolls diagonally across the window. When it reaches an edge, have it wrap around to the other edge.
- A circle that is always trying to move toward the mouse cursor (and might catch it if the mouse stays in one place long enough).
- A pie slice that spins (a little tricky).
- A triangle that spins (even trickier).
- Draw at least one thing when the mouse is clicked. Be careful
here: if you use the
backgroundmethod in yourdraw()code, then you probably won't see the thing you are trying to draw on a mouse click. - Use Java methods to break down your drawing into logical pieces. Use sensible names for the methods, i.e., names that would make sense to someone else.
- Make use of code comments to explain what is happening in the program. You do not have to use a comment on every line, but each method should have at least one comment.
Resources
The resources below are the only resources you should use in completing this assignment. In particular, do not use the CSC 130 tutors and do not search any electronic resources such as the Web for sample code.
- Use pencil and paper to sketch ideas
- Use your class notes
- Use the PW1 Reference Sheet
- Use the general resources on the CSC 130 Main Page
- Use the textbook
- Visit the instuctor during office hours or by appointment
Grading
Recall that individual work assignments are worth 50 points each. Refer to the syllabus for more course grading information.
- (14) uses each variable and function from the reference sheet
- ( 6) draws at least one shape on top of another shape
- ( 6) draws at least one animation
- ( 6) draws at least one thing when the mouse is clicked
- ( 6) breaks drawing down using methods
- ( 6) uses sensible method names
- ( 6) uses comments as described
Submission
Submit 1 file by taking two actions: create a printout and provide an electronic submission. Details are below.
- Ensure that your name appears as a comment at the top of the code file.
- Make a printout of the code file. Use duplex if possible so you submit fewer pieces of paper. If you have multiple sheets, staple them. Print the file before class starts, not during class.
- Upload the IW1Draw.java file to Moodle. This file is located your workspace folder, then the IW1Draw folder, then the src folder, then finally the iw1draw folder.