Week 6 Class Files and Homework
Posted: October 9th, 2010 | Author: admin | Filed under: Assignments | 15 Comments »Review
This week we went over drawing functions using pushMatrix and popMatrix(), translate(), rotate() and scale(). We also explored the atan2() function and how it can be used to put objects in a certain direction.
For more information/further reading on this, along with more examples, please see the processing website and read over the following chapters in the book:
The Basics of Drawing with Processing (page 60)
Programming Graphics (page 289)
You should also be experimenting with the basic drawing commands such as line(), rect(), ellipse(), beginShape(), endShape(), etc. These should have been covered in Boot Camp but if you are not familiar with them or feel like you need a refresher let me know.
Code Examples
Homework
Our first assignments have been pretty open ended, and have concentrated on a particular aspect of programming. This week I’d like everyone to follow directions and do similar assignments. This will (hopefully) be fun and give everyone an opportunity to combine everything they have learned so far and make a cohesive program.
The assignment is to create a monster, using code only (no images unless they are secondary, hair strands for example would be fine but an entire monster made of 1 image is not).
I made a VERY simple version of what you should be creating, and I commented the code into oblivion so hopefully it should help you along your way.
The creature should
- Live within a 500×500 processing sketch.
- White Background
- All classes as their own files (use tabs!)
- React to the mouse in some way  (mouse pressed, mouse moved, etc)
- Be completely contained in an object (the object can include other objects, see example)
- The object should be named after you (mine is called SteveMonster, you get the idea…)
- The constructor should take an argument for an x & y position
- You should translate any drawing to this x&y position first and draw relative to that position
- Other than that, go wild and try to use everything we’ve learned and some things that we haven’t!
The idea will be that since we are all coding correctly and using similar patterns we should be able to create a gallery of our monsters in class. Please try your best to stick to the requirements!
Please see the attached class files for a simple example that I made (its not really a monster but yours should be 🙂 ). This should follow the requirements completely. Notice that my main sketch does nothing but create my object, give it a position, and tell it to draw. Everything else happens in the object.
Please let me know if you have any questions, and take your time with this assignment. If everyone is able to complete this assignment correctly and creatively I will feel very comfortable letting everyone moving on to bigger projects and running class as more of a workshop and less of a show and tell/lecture format.
Thanks and make something awesome!
-Steve
PS Check here for some code examples + inspiration
http://www.rmx.cz/monsters/
Learn how people did things and don’t copy, just get inspired and change it up!
http://a.parsons.edu/~kimm541/05/
Hmmm I did a few things, but forgot to do a monster >.<
Well, here's a fish (though the applet doesn't work for some reason)
http://a.parsons.edu/~rubib864/CCLab/fishy/applet/index.html
and some fire \m/
http://a.parsons.edu/~rubib864/CCLab/flames_1/applet/index.html
http://a.parsons.edu/~kirbm818/ccLab/
soooo many problems. I dono what’s going on but my head can’t process the logic of it all.
http://a.parsons.edu/~sotoa363/cclab/alvaromonster/
http://a.parsons.edu/~zhaoy563/CClab/week06/
http://a.parsons.edu/~tum927/cc_lab/applet_monster/
http://a.parsons.edu/~zamof709/CCLAB/HW_Week6_Francisco/applet/index.html
http://a.parsons.edu/~jangs384/Seokin6/
http://www.oylumboran.com/blog/files/cclab/week7
This is horrible. Why can’t I code??
http://a.parsons.edu/~ramep244/classes/ccLab/hw6/applet/index.html
http://a.parsons.edu/~tum927/cc_lab/applet_monster/
http://ben-riley.com/benMonster.zip
Can’t get him to stay in his proper rotation when mousePressed is false, even though his xPos and yPos change accordingly. Infuriating.
http://a.parsons.edu/~tum927/cc_lab/applet_monster2/
http://a.parsons.edu/~leei674/MFADT2010_Fall/cc_lab/1021/applet/index.html
http://a.parsons.edu/~ramep244/classes/ccLab/hw7/applet/index.html