1. Building off of this week’s examples, particularly 03_MyFirstScene
    • Create a self-portrait using simple drawing functions.
    • Make your window 800 x 800 pixels. (ofSetWindowShape(...) can be called in ofApp::setup()).
    • Set your background color using ofBackground(...).
    • Use simple drawing functions like ofDrawRectangle(...), ofDrawEllipse(...), ofDrawCircle(...), ofDrawLine(...).
    • Use repetition (for-loops) to create patterns.
    • Use conditional statements (if-statements) to make some portion of your self-portrait react to a mouse press and its position. For example, you might make your eyes close if you click on them.
      • Use ofGetMouseX() and ofGetMouseY() to get the current mouse position.
      • Use ofIsMousePressed() to determine whether the mouse is pressed. -
          if (ofIsMousePressed())
          {
          float mouseX = ofGetMouseX();
          float mouseY = ofGetMouseY();
        
          // do something with the mouse and its position
          }
        
    • Change colors by using ofSetColor(...).
    • You can enable or disable the filling of shapes with ofFill() and ofNoFill(). Like color, this “fill state” will apply until you explicitly set it again.
    • Play with ofSoundPlayer to make looping sounds and sounds that respond to mouse input.
  2. Key questions you are expected to be able to answer after the project above.
    • What are the purposes of the ofApp::setup(), ofApp::update() and ofApp::draw() functions?
    • How do those functions correspond to the setup() and loop() functions in Arduino? -
    • Arrays
      • What are the similarities and the difference between a standard C/C++ (e.g. int myArray[];) array and a std::vector (e.g. std::vector<int> myVector;?
    • Looping
      • What is the difference between a standard for-loop and a range-for and why might you use one vs. the other?
    • If you are unsure of the answers any of those questions, look it up or check your notes. If you are still are unclear post a question to the forum and we’ll discuss it.