Week 09

Topics:

  • Details: Sine and Cosine. Circular motion.
  • Objects and Classes – Conceptual Introduction & Basic Implementation
  • Individual Review of Finals concept progress & Initial Research

Due Next Week

  1. Objectify: Part 1
    Write a Processing sketch that uses a Class to describe a single object with one simple behavior. This can be something minimal, for example, an ellipse that “breathes” slowly using sin and cos, or a rect that moves to the right and wraps around when it goes off screen. Call your class “Thing”. To do this, begin (as we did in class) by creating your animation in Processing without Classes, in setup and draw using global variables. Then move the definition of your thing┬áinto a Class structure. You don’t have to pass any starting parameters into the constructor or anything like that. Start simple. If you are feeling ambitious, you can look ahead at what I just described or define two separate Classes for two different Things. Your main program will look something like this:

    Thing t;
    void setup(){
         t = new Thing();
    }
    void draw(){
         t.move();
         t.display(); //or whatever functions you invent
    }
    
    class Thing{
         //...
    }
  2. Continued Research and Development of your Final

 

8.0 ICM: What is Object-Oriented Programming? from shiffman on Vimeo.

8.1 ICM: Defining a Class Part I from shiffman on Vimeo.

8.2 ICM: Defining a Class Part II from shiffman on Vimeo.

´╗┐

Comments are closed.