Skip to content

ofcourseio/ofcourse_lecture_01_graphics

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[ofCourse] Lecture 1: Graphics

Examples for Lecture 1 of ofCourse: basic graphics, animation, mouse interaction and loops using openFrameworks.

ofCourse is a creative coding program aimed at people with no coding skills. It provides a hands-on experience, tools, ideas, and full support for students to make their own projects.

Example 1: Shapes

  • Drawing some common shapes in oF

    • ofLine(), ofCircle(), ofRect()
    • ofBeginShape(), ofEndShape(true), ofVertex()
  • Playing with different styles and colors

    • ofBackground(), ofBackgroundHex()
    • ofFill(), ofNoFill()
    • ofSetColor(), ofSetHexColor()
    • ofColor::presets
    • ofSetLineWidth()

Example 2: Mouse

  • Different ways of using mouse coordinates

    • mouseX and mouseY variables
    • passing coords from mouse event to global variables
      • mouseDragged()
      • mouseReleased()
  • Playing with ofSetBackgroundAuto();

Example 3: Animation

  • Using global variables to make simple animations
  • Adding conditionals
  • Introducing app properties:
    • ofSetWindowTitle(), ofSetWindowShape()
    • ofEnableAntiAliasing(), ofSetCircleResolution()
    • ofGetWidth(), ofGetHeight()

Example 4: Loop

  • Using loops and mouse coordinates to draw an interactive pattern a) Simple loop b) Nested loop

  • More color:

    • ofColor
    • setHsb()
    • ofBackgroundGradient()

About

Examples for Lecture 1 of OFCOURSE. openFrameworks basic graphics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published