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.
-
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()
-
Different ways of using mouse coordinates
- mouseX and mouseY variables
- passing coords from mouse event to global variables
- mouseDragged()
- mouseReleased()
-
Playing with ofSetBackgroundAuto();
- Using global variables to make simple animations
- Adding conditionals
- Introducing app properties:
- ofSetWindowTitle(), ofSetWindowShape()
- ofEnableAntiAliasing(), ofSetCircleResolution()
- ofGetWidth(), ofGetHeight()
-
Using loops and mouse coordinates to draw an interactive pattern a) Simple loop b) Nested loop
-
More color:
- ofColor
- setHsb()
- ofBackgroundGradient()