Skip to content

Latest commit

 

History

History
70 lines (66 loc) · 1.35 KB

File metadata and controls

70 lines (66 loc) · 1.35 KB
  • draw function

  • Coordinate system

  • ofDrawLine(x1, y1, x2, y2)

    • x's come before y
  • ofBackground(r, g, b)

    • each value ranges from 0-255
  • Painter's algorithm

    • The order of the lines matters
  • Comments are a letter to yourself // This is a comment

    • command + slash
  • ofDrawCircle(x, y, radius)

    • radius, not diameter
  • ofDrawRectangle(x, y, width, height)

    • width and height are (relative)
  • variables:

    • binary can be used to represent numbers, letters, other types of data
    • int x = 10;
      • A number that has no fractional component
    • float x = 50;
      • A decimal number. 1.1, 3.14, -103345.2543
    • char c = 'x';
      • a single letter
    • bool b = true;
    • types are fundamental to programming languages
  • mouseX / mouseY

  • custom functions

    • double click on .h file

    • add a new function under "public:"

      void drawLetterR()

  • parameters

    • in .h file:
      • void drawLetterR(float x);
    • in .cpp file: void drawLetterR(float x) { }
  • ofGetWidth(), ofGetHeight()

  • ofGetRandom

  • ofNoFill

  • ofSetColor

  • ofSetLineWidth

  • cout

  • if statements

  • for loop

  • ofGetFrameNum()

  • for loops

  • while loops

  • arrays

  • vectors

  • ofPoint

  • ofPolyLine

  • transformations

    • ofTranslate
    • ofRotateDeg
    • ofScale
  • ofNoise

  • ofEasyCam

  • ofLight

  • ofBox

  • ofCone

  • ofPlane

  • boolean ==, !, true, false, <=, >=, <, >

  • ofCapture?

  • ofMap