├── .gitignore ├── README.md ├── code ├── CLDtoDrawing │ ├── CLDtoDrawing.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── CLDtoDrawing Debug.xcscheme │ │ │ └── CLDtoDrawing Release.xcscheme │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── bin │ │ └── data │ │ │ ├── 0162681551.png │ │ │ ├── 0168366051.png │ │ │ └── 0168639352.png │ ├── config.make │ ├── openFrameworks-Info.plist │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── angleLengthLine │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── angleLengthLine.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── angleLengthLine Debug.xcscheme │ │ │ └── angleLengthLine Release.xcscheme │ ├── bin │ │ └── data │ │ │ └── .gitkeep │ ├── config.make │ ├── openFrameworks-Info.plist │ └── src │ │ ├── angleLengthLine.cpp │ │ ├── angleLengthLine.h │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── basicDrawing │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── basicDrawing.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── basicDrawing Debug.xcscheme │ │ │ └── basicDrawing Release.xcscheme │ ├── bin │ │ └── data │ │ │ └── .gitkeep │ ├── config.make │ ├── openFrameworks-Info.plist │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── basicDrawing2 │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── basicDrawing2.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── basicDrawing2 Debug.xcscheme │ │ │ └── basicDrawing2 Release.xcscheme │ ├── bin │ │ └── data │ │ │ └── .gitkeep │ ├── config.make │ ├── openFrameworks-Info.plist │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── basicDrawing3 │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── basicDrawing3.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── basicDrawing3 Debug.xcscheme │ │ │ └── basicDrawing3 Release.xcscheme │ ├── bin │ │ └── data │ │ │ └── .gitkeep │ ├── config.make │ ├── openFrameworks-Info.plist │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── cvColorTracker │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── bin │ │ └── data │ │ │ ├── .gitkeep │ │ │ └── Movie on 3-31-20 at 11.00 AM.mov │ ├── config.make │ ├── cvColorTracker.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── cvColorTracker Debug.xcscheme │ │ │ └── cvColorTracker Release.xcscheme │ ├── openFrameworks-Info.plist │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── cvContourTracker │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── bin │ │ └── data │ │ │ ├── .gitkeep │ │ │ └── Movie on 3-31-20 at 10.59 AM.mov │ ├── config.make │ ├── cvContourTracker.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── cvContourTracker Debug.xcscheme │ │ │ └── cvContourTracker Release.xcscheme │ ├── openFrameworks-Info.plist │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── cvFaceDraw │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── bin │ │ └── data │ │ │ ├── .gitkeep │ │ │ └── model │ │ │ ├── .gitkeep │ │ │ └── README.md │ ├── config.make │ ├── cvFaceDraw.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── cvFaceDraw Debug.xcscheme │ │ │ └── cvFaceDraw Release.xcscheme │ ├── openFrameworks-Info.plist │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── drawing3d │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── bin │ │ └── data │ │ │ └── .gitkeep │ ├── config.make │ ├── drawing3d.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── drawing3d Debug.xcscheme │ │ │ └── drawing3d Release.xcscheme │ ├── openFrameworks-Info.plist │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── drawingBackwards │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── bin │ │ └── data │ │ │ └── .gitkeep │ ├── config.make │ ├── drawingBackwards.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── drawingBackwards Debug.xcscheme │ │ │ └── drawingBackwards Release.xcscheme │ ├── openFrameworks-Info.plist │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── drawingPlayback │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── bin │ │ └── data │ │ │ ├── .gitkeep │ │ │ └── drawbar_c4_a.aif │ ├── config.make │ ├── drawingPlayback.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── drawingPlayback Debug.xcscheme │ │ │ └── drawingPlayback Release.xcscheme │ ├── openFrameworks-Info.plist │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── drawingRendering │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── bin │ │ └── data │ │ │ └── .gitkeep │ ├── config.make │ ├── drawingRendering.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── drawingRendering Debug.xcscheme │ │ │ └── drawingRendering Release.xcscheme │ ├── openFrameworks-Info.plist │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── generativeExample1 │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── bin │ │ └── data │ │ │ └── .gitkeep │ ├── config.make │ ├── generativeExample1.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── generativeExample1 Debug.xcscheme │ │ │ └── generativeExample1 Release.xcscheme │ ├── openFrameworks-Info.plist │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── generativeExample2 │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── bin │ │ └── data │ │ │ └── .gitkeep │ ├── config.make │ ├── generativeExample2.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── generativeExample2 Debug.xcscheme │ │ │ └── generativeExample2 Release.xcscheme │ ├── openFrameworks-Info.plist │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── generativeExample3 │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── bin │ │ └── data │ │ │ └── .gitkeep │ ├── config.make │ ├── generativeExample3.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── generativeExample3 Debug.xcscheme │ │ │ └── generativeExample3 Release.xcscheme │ ├── openFrameworks-Info.plist │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── generativeExample4 │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── bin │ │ └── data │ │ │ └── .gitkeep │ ├── config.make │ ├── generativeExample4.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── generativeExample4 Debug.xcscheme │ │ │ └── generativeExample4 Release.xcscheme │ ├── openFrameworks-Info.plist │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── generativeExample5 │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── bin │ │ └── data │ │ │ └── .gitkeep │ ├── config.make │ ├── generativeExample5.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── generativeExample5 Debug.xcscheme │ │ │ └── generativeExample5 Release.xcscheme │ ├── openFrameworks-Info.plist │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── generativeExample6 │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── bin │ │ └── data │ │ │ └── .gitkeep │ ├── config.make │ ├── generativeExample6.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── generativeExample6 Debug.xcscheme │ │ │ └── generativeExample6 Release.xcscheme │ ├── openFrameworks-Info.plist │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── mixDrawings │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── bin │ │ └── data │ │ │ └── .gitkeep │ ├── config.make │ ├── mixDrawings.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── mixDrawings Debug.xcscheme │ │ │ └── mixDrawings Release.xcscheme │ ├── openFrameworks-Info.plist │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── node │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── bin │ │ └── data │ │ │ └── .gitkeep │ ├── config.make │ ├── node.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── node Debug.xcscheme │ │ │ └── node Release.xcscheme │ ├── openFrameworks-Info.plist │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── pathReplayPart │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── bin │ │ └── data │ │ │ └── .gitkeep │ ├── config.make │ ├── openFrameworks-Info.plist │ ├── pathReplayPart.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── pathReplayPart Debug.xcscheme │ │ │ └── pathReplayPart Release.xcscheme │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ └── ofApp.h ├── pathWithTime │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── bin │ │ └── data │ │ │ └── .gitkeep │ ├── config.make │ ├── openFrameworks-Info.plist │ ├── pathWithTime.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── pathWithTime Debug.xcscheme │ │ │ └── pathWithTime Release.xcscheme │ └── src │ │ ├── main.cpp │ │ ├── ofApp.cpp │ │ ├── ofApp.h │ │ ├── timePointRecorder.cpp │ │ └── timePointRecorder.h └── springDrawing │ ├── Makefile │ ├── Project.xcconfig │ ├── addons.make │ ├── bin │ └── data │ │ └── .gitkeep │ ├── config.make │ ├── openFrameworks-Info.plist │ ├── springDrawing.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── springDrawing Debug.xcscheme │ │ └── springDrawing Release.xcscheme │ └── src │ ├── main.cpp │ ├── ofApp.cpp │ ├── ofApp.h │ ├── particle.cpp │ ├── particle.h │ ├── spring.cpp │ └── spring.h ├── code_p5js ├── basicDrawing │ ├── index.html │ ├── js │ │ └── sketch.js │ └── libraries │ │ ├── p5.js │ │ └── p5.min.js ├── basicDrawing2 │ ├── index.html │ ├── js │ │ └── sketch.js │ └── libraries │ │ ├── p5.js │ │ └── p5.min.js └── basicDrawing3 │ ├── index.html │ ├── js │ └── sketch.js │ └── libraries │ ├── p5.js │ └── p5.min.js ├── code_processing ├── basicDrawing │ └── basicDrawing.pde ├── basicDrawing2 │ └── basicDrawing2.pde └── basicDrawing3 │ └── basicDrawing3.pde └── notes ├── assets ├── angleLengthLine.gif ├── basicDrawing.jpg ├── basicDrawing2.jpg ├── basicDrawing3.jpg ├── cvColorTracker.gif ├── cvContourTracker.gif ├── cvFaceDraw.gif ├── drawing3d.gif ├── drawingBackwards.gif ├── drawingPlayback.gif ├── drawingRendering.gif ├── generativeExample1.gif ├── generativeExample2.gif ├── generativeExample3.gif ├── generativeExample4.gif ├── generativeExample5.gif ├── generativeExample6.gif ├── mixDrawings.gif ├── node.gif └── springDrawing.gif └── notes.md /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *shape_predictor_68_face_landmarks.dat 3 | 4 | # Some general ignore patterns 5 | build/ 6 | obj/ 7 | *.o 8 | Debug*/ 9 | Release*/ 10 | *.mode* 11 | *.app/ 12 | *.pyc 13 | .svn/ 14 | 15 | 16 | #XCode 17 | *.pbxuser 18 | *.perspective 19 | *.perspectivev3 20 | *.mode1v3 21 | *.mode2v3 22 | #XCode 4 23 | xcuserdata 24 | *.xcworkspace 25 | 26 | #Code::Blocks 27 | *.depend 28 | *.layout 29 | 30 | #Visual Studio 31 | *.sdf 32 | *.opensdf 33 | *.suo 34 | ipch/ 35 | 36 | #Eclipse 37 | .metadata 38 | local.properties 39 | .externalToolBuilders 40 | 41 | 42 | # OS-specific ignore patterns 43 | 44 | #Linux 45 | *~ 46 | # KDE 47 | .directory 48 | 49 | #OSX 50 | .DS_Store 51 | *.swp 52 | *~.nib 53 | # Thumbnails 54 | ._* 55 | 56 | #Windows 57 | # Windows image file caches 58 | Thumbs.db 59 | # Folder config file 60 | Desktop.ini 61 | 62 | #Android 63 | .csettings 64 | /libs/openFrameworksCompiled/project/android/paths.make 65 | 66 | # Miscellaneous 67 | .mailmap 68 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MIT_DRAWINGPLUSPLUS 2 | 3 | ## About 4 | 5 | This repository is for MIT Media Lab drawing++ class. 6 | 7 | ## Contents 8 | 9 | * [code/](code/): examples written with [openFrameworks](https://openframeworks.cc/) 10 | * [code_p5js/](code_p5js/): examples written with [p5.js](https://p5js.org/) 11 | * [code_processing/](code_processing/): examples written with [Processing](https://processing.org/) 12 | * [notes/](notes/): notes for each class, organized by week, written in [Markdown](https://en.wikipedia.org/wiki/Markdown). 13 | -------------------------------------------------------------------------------- /code/CLDtoDrawing/CLDtoDrawing.xcodeproj/xcshareddata/xcschemes/CLDtoDrawing Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /code/CLDtoDrawing/CLDtoDrawing.xcodeproj/xcshareddata/xcschemes/CLDtoDrawing Release.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /code/CLDtoDrawing/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/CLDtoDrawing/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/CLDtoDrawing/addons.make: -------------------------------------------------------------------------------- 1 | ofxOpenCv 2 | ofxCv 3 | ofxGui 4 | -------------------------------------------------------------------------------- /code/CLDtoDrawing/bin/data/0162681551.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/CLDtoDrawing/bin/data/0162681551.png -------------------------------------------------------------------------------- /code/CLDtoDrawing/bin/data/0168366051.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/CLDtoDrawing/bin/data/0168366051.png -------------------------------------------------------------------------------- /code/CLDtoDrawing/bin/data/0168639352.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/CLDtoDrawing/bin/data/0168639352.png -------------------------------------------------------------------------------- /code/CLDtoDrawing/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/CLDtoDrawing/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | int main() { 4 | ofSetupOpenGL(1280, 720, OF_WINDOW); 5 | ofRunApp(new ofApp()); 6 | } 7 | -------------------------------------------------------------------------------- /code/CLDtoDrawing/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxGui.h" 5 | #include "ofxCv.h" 6 | 7 | class ofApp : public ofBaseApp{ 8 | public: 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | 13 | ofImage input, output, canny; 14 | 15 | ofParameter sigma1, sigma2, tau; 16 | ofParameter halfw, smoothPasses, black, thresh, cannyParam1, cannyParam2; 17 | ofParameter doFDoG, doThresh, doThin, doCanny; 18 | 19 | ofxPanel gui; 20 | 21 | ofVideoGrabber grabber; 22 | ofImage img; 23 | 24 | 25 | }; 26 | -------------------------------------------------------------------------------- /code/angleLengthLine/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/angleLengthLine/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/angleLengthLine/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/angleLengthLine/addons.make -------------------------------------------------------------------------------- /code/angleLengthLine/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/angleLengthLine/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/angleLengthLine/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/angleLengthLine/src/angleLengthLine.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/angleLengthLine/src/angleLengthLine.cpp -------------------------------------------------------------------------------- /code/angleLengthLine/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/angleLengthLine/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | //-------------------------------------------------------------- 4 | void ofApp::setup(){ 5 | 6 | // paint the background black 7 | ofBackground(0,0,0); 8 | } 9 | 10 | //-------------------------------------------------------------- 11 | void ofApp::update(){ 12 | 13 | } 14 | 15 | //-------------------------------------------------------------- 16 | void ofApp::draw(){ 17 | 18 | // draw the ofPolyline line 19 | line.draw(); 20 | 21 | // go through every angleLengthline in the alines vector 22 | for (int i = 0; i < alines.size(); i++){ 23 | // draw the corresponding instance of angleLengthline 24 | alines[i].draw(); 25 | } 26 | } 27 | 28 | //-------------------------------------------------------------- 29 | void ofApp::keyPressed(int key){ 30 | 31 | // when any key is pressed 32 | 33 | // clear all the angleLengthLine elements in the alines vector 34 | alines.clear(); 35 | } 36 | 37 | //-------------------------------------------------------------- 38 | void ofApp::keyReleased(int key){ 39 | 40 | } 41 | 42 | //-------------------------------------------------------------- 43 | void ofApp::mouseMoved(int x, int y ){ 44 | 45 | } 46 | 47 | //-------------------------------------------------------------- 48 | void ofApp::mouseDragged(int x, int y, int button){ 49 | 50 | // every time the mouse is dragged 51 | 52 | // add vertex to ofPolyline line with the mouse position 53 | line.addVertex(ofPoint(x,y)); 54 | } 55 | 56 | //-------------------------------------------------------------- 57 | void ofApp::mousePressed(int x, int y, int button){ 58 | 59 | // every time the mouse is pressed 60 | 61 | // delete all vertices in ofPolyline line 62 | line.clear(); 63 | // add new vertex to ofPolyline with current mouse position 64 | line.addVertex(ofPoint(x,y)); 65 | } 66 | 67 | //-------------------------------------------------------------- 68 | void ofApp::mouseReleased(int x, int y, int button){ 69 | 70 | // every time the mouse is released 71 | 72 | // declare new instance of angleLengthLine 73 | angleLengthLine angleLine; 74 | 75 | // calculate from line, the vectors inside of angleLine 76 | angleLine.convertFrom(line); 77 | 78 | // add the angleLengthLine angleLine to the alines vector 79 | alines.push_back(angleLine); 80 | 81 | // clear all vertices in ofPolyline line 82 | line.clear(); 83 | } 84 | 85 | //-------------------------------------------------------------- 86 | void ofApp::mouseEntered(int x, int y){ 87 | 88 | } 89 | 90 | //-------------------------------------------------------------- 91 | void ofApp::mouseExited(int x, int y){ 92 | 93 | } 94 | 95 | //-------------------------------------------------------------- 96 | void ofApp::windowResized(int w, int h){ 97 | 98 | } 99 | 100 | //-------------------------------------------------------------- 101 | void ofApp::gotMessage(ofMessage msg){ 102 | 103 | } 104 | 105 | //-------------------------------------------------------------- 106 | void ofApp::dragEvent(ofDragInfo dragInfo){ 107 | 108 | } 109 | -------------------------------------------------------------------------------- /code/angleLengthLine/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | //add .h file with class angleLengthLine 5 | #include "angleLengthLine.h" 6 | 7 | class ofApp : public ofBaseApp{ 8 | 9 | public: 10 | void setup(); 11 | void update(); 12 | void draw(); 13 | 14 | void keyPressed(int key); 15 | void keyReleased(int key); 16 | void mouseMoved(int x, int y ); 17 | void mouseDragged(int x, int y, int button); 18 | void mousePressed(int x, int y, int button); 19 | void mouseReleased(int x, int y, int button); 20 | void mouseEntered(int x, int y); 21 | void mouseExited(int x, int y); 22 | void windowResized(int w, int h); 23 | void dragEvent(ofDragInfo dragInfo); 24 | void gotMessage(ofMessage msg); 25 | 26 | // declare ofPolyline line 27 | ofPolyline line; 28 | 29 | // declare vector alines of type angleLengthLine 30 | vector < angleLengthLine > alines; 31 | 32 | }; 33 | -------------------------------------------------------------------------------- /code/basicDrawing/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/basicDrawing/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/basicDrawing/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/basicDrawing/addons.make -------------------------------------------------------------------------------- /code/basicDrawing/basicDrawing.xcodeproj/xcshareddata/xcschemes/basicDrawing Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /code/basicDrawing/basicDrawing.xcodeproj/xcshareddata/xcschemes/basicDrawing Release.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /code/basicDrawing/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/basicDrawing/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/basicDrawing/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/basicDrawing/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/basicDrawing/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | //-------------------------------------------------------------- 4 | void ofApp::setup(){ 5 | 6 | ofSetBackgroundAuto(false); 7 | ofBackground(0); 8 | } 9 | 10 | //-------------------------------------------------------------- 11 | void ofApp::update(){ 12 | 13 | } 14 | 15 | //-------------------------------------------------------------- 16 | void ofApp::draw(){ 17 | 18 | if (ofGetMousePressed()){ 19 | ofDrawCircle(mouseX, mouseY, 20); 20 | } 21 | } 22 | 23 | //-------------------------------------------------------------- 24 | void ofApp::keyPressed(int key){ 25 | 26 | } 27 | 28 | //-------------------------------------------------------------- 29 | void ofApp::keyReleased(int key){ 30 | 31 | } 32 | 33 | //-------------------------------------------------------------- 34 | void ofApp::mouseMoved(int x, int y ){ 35 | 36 | } 37 | 38 | //-------------------------------------------------------------- 39 | void ofApp::mouseDragged(int x, int y, int button){ 40 | 41 | } 42 | 43 | //-------------------------------------------------------------- 44 | void ofApp::mousePressed(int x, int y, int button){ 45 | 46 | } 47 | 48 | //-------------------------------------------------------------- 49 | void ofApp::mouseReleased(int x, int y, int button){ 50 | 51 | } 52 | 53 | //-------------------------------------------------------------- 54 | void ofApp::mouseEntered(int x, int y){ 55 | 56 | } 57 | 58 | //-------------------------------------------------------------- 59 | void ofApp::mouseExited(int x, int y){ 60 | 61 | } 62 | 63 | //-------------------------------------------------------------- 64 | void ofApp::windowResized(int w, int h){ 65 | 66 | } 67 | 68 | //-------------------------------------------------------------- 69 | void ofApp::gotMessage(ofMessage msg){ 70 | 71 | } 72 | 73 | //-------------------------------------------------------------- 74 | void ofApp::dragEvent(ofDragInfo dragInfo){ 75 | 76 | } 77 | -------------------------------------------------------------------------------- /code/basicDrawing/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | class ofApp : public ofBaseApp{ 6 | 7 | public: 8 | void setup(); 9 | void update(); 10 | void draw(); 11 | 12 | void keyPressed(int key); 13 | void keyReleased(int key); 14 | void mouseMoved(int x, int y ); 15 | void mouseDragged(int x, int y, int button); 16 | void mousePressed(int x, int y, int button); 17 | void mouseReleased(int x, int y, int button); 18 | void mouseEntered(int x, int y); 19 | void mouseExited(int x, int y); 20 | void windowResized(int w, int h); 21 | void dragEvent(ofDragInfo dragInfo); 22 | void gotMessage(ofMessage msg); 23 | 24 | }; 25 | -------------------------------------------------------------------------------- /code/basicDrawing2/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/basicDrawing2/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/basicDrawing2/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/basicDrawing2/addons.make -------------------------------------------------------------------------------- /code/basicDrawing2/basicDrawing2.xcodeproj/xcshareddata/xcschemes/basicDrawing2 Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /code/basicDrawing2/basicDrawing2.xcodeproj/xcshareddata/xcschemes/basicDrawing2 Release.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /code/basicDrawing2/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/basicDrawing2/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/basicDrawing2/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/basicDrawing2/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/basicDrawing2/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | //-------------------------------------------------------------- 4 | void ofApp::setup(){ 5 | 6 | } 7 | 8 | //-------------------------------------------------------------- 9 | void ofApp::update(){ 10 | 11 | float time = ofGetElapsedTimef(); 12 | 13 | // go through every element in the ofPolyline 14 | for (int i = 0; i < line.size(); i++){ 15 | 16 | // uncomment to add random noise to each element 17 | // line[i].x += ofRandom(-1,1); 18 | // line[i].y += ofRandom(-1,1); 19 | 20 | // uncomment to add a sine wave to x position 21 | // line[i].x += sin(time + line[i].y * 0.01) * 3; 22 | } 23 | 24 | } 25 | 26 | //-------------------------------------------------------------- 27 | void ofApp::draw(){ 28 | 29 | // draw the ofPolyline line 30 | line.draw(); 31 | } 32 | 33 | //-------------------------------------------------------------- 34 | void ofApp::keyPressed(int key){ 35 | 36 | } 37 | 38 | //-------------------------------------------------------------- 39 | void ofApp::keyReleased(int key){ 40 | 41 | } 42 | 43 | //-------------------------------------------------------------- 44 | void ofApp::mouseMoved(int x, int y ){ 45 | 46 | } 47 | 48 | //-------------------------------------------------------------- 49 | void ofApp::mouseDragged(int x, int y, int button){ 50 | // when mouse is dragged, add a new vertex to ofPolyline line 51 | line.addVertex(x,y); 52 | } 53 | 54 | //-------------------------------------------------------------- 55 | void ofApp::mousePressed(int x, int y, int button){ 56 | line.clear(); 57 | 58 | } 59 | 60 | //-------------------------------------------------------------- 61 | void ofApp::mouseReleased(int x, int y, int button){ 62 | 63 | } 64 | 65 | //-------------------------------------------------------------- 66 | void ofApp::mouseEntered(int x, int y){ 67 | 68 | } 69 | 70 | //-------------------------------------------------------------- 71 | void ofApp::mouseExited(int x, int y){ 72 | 73 | } 74 | 75 | //-------------------------------------------------------------- 76 | void ofApp::windowResized(int w, int h){ 77 | 78 | } 79 | 80 | //-------------------------------------------------------------- 81 | void ofApp::gotMessage(ofMessage msg){ 82 | 83 | } 84 | 85 | //-------------------------------------------------------------- 86 | void ofApp::dragEvent(ofDragInfo dragInfo){ 87 | 88 | } 89 | -------------------------------------------------------------------------------- /code/basicDrawing2/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | class ofApp : public ofBaseApp{ 6 | 7 | public: 8 | void setup(); 9 | void update(); 10 | void draw(); 11 | 12 | void keyPressed(int key); 13 | void keyReleased(int key); 14 | void mouseMoved(int x, int y ); 15 | void mouseDragged(int x, int y, int button); 16 | void mousePressed(int x, int y, int button); 17 | void mouseReleased(int x, int y, int button); 18 | void mouseEntered(int x, int y); 19 | void mouseExited(int x, int y); 20 | void windowResized(int w, int h); 21 | void dragEvent(ofDragInfo dragInfo); 22 | void gotMessage(ofMessage msg); 23 | 24 | // declare instance of ofPolyline 25 | ofPolyline line; 26 | }; 27 | -------------------------------------------------------------------------------- /code/basicDrawing3/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/basicDrawing3/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/basicDrawing3/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/basicDrawing3/addons.make -------------------------------------------------------------------------------- /code/basicDrawing3/basicDrawing3.xcodeproj/xcshareddata/xcschemes/basicDrawing3 Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /code/basicDrawing3/basicDrawing3.xcodeproj/xcshareddata/xcschemes/basicDrawing3 Release.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /code/basicDrawing3/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/basicDrawing3/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/basicDrawing3/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/basicDrawing3/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/basicDrawing3/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | //-------------------------------------------------------------- 4 | void ofApp::setup(){ 5 | 6 | } 7 | 8 | //-------------------------------------------------------------- 9 | void ofApp::update(){ 10 | 11 | } 12 | 13 | //-------------------------------------------------------------- 14 | void ofApp::draw(){ 15 | 16 | // uncomment to smooth ofPolyline line 17 | // line = line.getSmoothed(3); 18 | 19 | // declare ofPolyline resampled 20 | // it is obtained from resampling ofPolyline line 21 | ofPolyline resampled = line.getResampledBySpacing(20); 22 | 23 | // iterate through every element in resampled 24 | for (int i = 0; i < resampled.size(); i++){ 25 | // for each element, draw a red circle 26 | ofSetColor(255, 0, 0); 27 | ofDrawCircle(resampled[i], 10); 28 | } 29 | 30 | // uncomment to draw ofPolyline resampled in green 31 | // ofSetColor(0,255,0); 32 | // resampled.draw(); 33 | 34 | // uncomment to draw ofPolyline line in blue 35 | // ofSetColor(0, 0, 255); 36 | // line.draw(); 37 | 38 | } 39 | 40 | //-------------------------------------------------------------- 41 | void ofApp::keyPressed(int key){ 42 | 43 | } 44 | 45 | //-------------------------------------------------------------- 46 | void ofApp::keyReleased(int key){ 47 | 48 | } 49 | 50 | //-------------------------------------------------------------- 51 | void ofApp::mouseMoved(int x, int y ){ 52 | 53 | } 54 | 55 | //-------------------------------------------------------------- 56 | void ofApp::mouseDragged(int x, int y, int button){ 57 | 58 | // when mouseDragged, add new element to ofPolyline line 59 | line.addVertex(x, y); 60 | } 61 | 62 | //-------------------------------------------------------------- 63 | void ofApp::mousePressed(int x, int y, int button){ 64 | 65 | // when mousePressed, delete all elements in ofPolyline line 66 | line.clear(); 67 | } 68 | 69 | //-------------------------------------------------------------- 70 | void ofApp::mouseReleased(int x, int y, int button){ 71 | 72 | } 73 | 74 | //-------------------------------------------------------------- 75 | void ofApp::mouseEntered(int x, int y){ 76 | 77 | } 78 | 79 | //-------------------------------------------------------------- 80 | void ofApp::mouseExited(int x, int y){ 81 | 82 | } 83 | 84 | //-------------------------------------------------------------- 85 | void ofApp::windowResized(int w, int h){ 86 | 87 | } 88 | 89 | //-------------------------------------------------------------- 90 | void ofApp::gotMessage(ofMessage msg){ 91 | 92 | } 93 | 94 | //-------------------------------------------------------------- 95 | void ofApp::dragEvent(ofDragInfo dragInfo){ 96 | 97 | } 98 | -------------------------------------------------------------------------------- /code/basicDrawing3/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | class ofApp : public ofBaseApp{ 6 | 7 | public: 8 | void setup(); 9 | void update(); 10 | void draw(); 11 | 12 | void keyPressed(int key); 13 | void keyReleased(int key); 14 | void mouseMoved(int x, int y ); 15 | void mouseDragged(int x, int y, int button); 16 | void mousePressed(int x, int y, int button); 17 | void mouseReleased(int x, int y, int button); 18 | void mouseEntered(int x, int y); 19 | void mouseExited(int x, int y); 20 | void windowResized(int w, int h); 21 | void dragEvent(ofDragInfo dragInfo); 22 | void gotMessage(ofMessage msg); 23 | 24 | // declare instance of ofPolyline 25 | ofPolyline line; 26 | 27 | }; 28 | -------------------------------------------------------------------------------- /code/cvColorTracker/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/cvColorTracker/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/cvColorTracker/addons.make: -------------------------------------------------------------------------------- 1 | ofxOpenCv 2 | ofxCv 3 | -------------------------------------------------------------------------------- /code/cvColorTracker/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/cvColorTracker/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/cvColorTracker/bin/data/Movie on 3-31-20 at 11.00 AM.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/cvColorTracker/bin/data/Movie on 3-31-20 at 11.00 AM.mov -------------------------------------------------------------------------------- /code/cvColorTracker/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/cvColorTracker/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1920,1080,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/cvColorTracker/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxCv.h" 5 | 6 | 7 | //#define USE_LIVE 8 | 9 | 10 | class ofApp : public ofBaseApp{ 11 | 12 | public: 13 | void setup(); 14 | void update(); 15 | void draw(); 16 | 17 | void keyPressed(int key); 18 | void keyReleased(int key); 19 | void mouseMoved(int x, int y ); 20 | void mouseDragged(int x, int y, int button); 21 | void mousePressed(int x, int y, int button); 22 | void mouseReleased(int x, int y, int button); 23 | void mouseEntered(int x, int y); 24 | void mouseExited(int x, int y); 25 | void windowResized(int w, int h); 26 | void dragEvent(ofDragInfo dragInfo); 27 | void gotMessage(ofMessage msg); 28 | 29 | #ifdef USE_LIVE 30 | ofVideoGrabber grabber; 31 | #else 32 | ofVideoPlayer player; 33 | #endif 34 | ofxCv::ContourFinder finder; 35 | ofColor targetColor; 36 | 37 | ofPolyline myLine; 38 | 39 | }; 40 | -------------------------------------------------------------------------------- /code/cvContourTracker/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/cvContourTracker/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/cvContourTracker/addons.make: -------------------------------------------------------------------------------- 1 | ofxOpenCv 2 | ofxCv 3 | -------------------------------------------------------------------------------- /code/cvContourTracker/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/cvContourTracker/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/cvContourTracker/bin/data/Movie on 3-31-20 at 10.59 AM.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/cvContourTracker/bin/data/Movie on 3-31-20 at 10.59 AM.mov -------------------------------------------------------------------------------- /code/cvContourTracker/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/cvContourTracker/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(640*2,480*2,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/cvContourTracker/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxCv.h" 5 | 6 | class ofApp : public ofBaseApp{ 7 | 8 | public: 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | 13 | void keyPressed(int key); 14 | void keyReleased(int key); 15 | void mouseMoved(int x, int y ); 16 | void mouseDragged(int x, int y, int button); 17 | void mousePressed(int x, int y, int button); 18 | void mouseReleased(int x, int y, int button); 19 | void mouseEntered(int x, int y); 20 | void mouseExited(int x, int y); 21 | void windowResized(int w, int h); 22 | void dragEvent(ofDragInfo dragInfo); 23 | void gotMessage(ofMessage msg); 24 | 25 | // ofVideograbber for the camera input 26 | ofVideoGrabber cam; 27 | 28 | // ofImage for storing the background image 29 | ofImage background; 30 | 31 | // ofImage for storing the difference between background and image 32 | ofImage diff; 33 | 34 | // ContourFinder from the ofxCv addon 35 | ofxCv::ContourFinder finder; 36 | 37 | // ofPolyline for drawing 38 | ofPolyline myLine; 39 | 40 | }; 41 | -------------------------------------------------------------------------------- /code/cvFaceDraw/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/cvFaceDraw/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/cvFaceDraw/addons.make: -------------------------------------------------------------------------------- 1 | ofxOpenCv 2 | ofxCv 3 | ofxFaceTracker2 4 | -------------------------------------------------------------------------------- /code/cvFaceDraw/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/cvFaceDraw/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/cvFaceDraw/bin/data/model/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/cvFaceDraw/bin/data/model/.gitkeep -------------------------------------------------------------------------------- /code/cvFaceDraw/bin/data/model/README.md: -------------------------------------------------------------------------------- 1 | This folder needs to contain the landmark predictor data file for the examples to work. 2 | 3 | Run `sh download-model.sh` to download the `shape_predictor_68_face_landmarks.dat` data file automatically from [sourceforge.net/projects/dclib/files/dlib/v18.10/shape_predictor_68_face_landmarks.dat.bz2](https://sourceforge.net/projects/dclib/files/dlib/v18.10/shape_predictor_68_face_landmarks.dat.bz2), alternatively download the file manually and unzip the file. 4 | -------------------------------------------------------------------------------- /code/cvFaceDraw/cvFaceDraw.xcodeproj/xcshareddata/xcschemes/cvFaceDraw Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /code/cvFaceDraw/cvFaceDraw.xcodeproj/xcshareddata/xcschemes/cvFaceDraw Release.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /code/cvFaceDraw/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/cvFaceDraw/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/cvFaceDraw/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | // add ofxFaceTracker2.h 5 | #include "ofxFaceTracker2.h" 6 | 7 | class ofApp : public ofBaseApp{ 8 | 9 | public: 10 | void setup(); 11 | void update(); 12 | void draw(); 13 | 14 | void keyPressed(int key); 15 | void keyReleased(int key); 16 | void mouseMoved(int x, int y ); 17 | void mouseDragged(int x, int y, int button); 18 | void mousePressed(int x, int y, int button); 19 | void mouseReleased(int x, int y, int button); 20 | void mouseEntered(int x, int y); 21 | void mouseExited(int x, int y); 22 | void windowResized(int w, int h); 23 | void dragEvent(ofDragInfo dragInfo); 24 | void gotMessage(ofMessage msg); 25 | 26 | // grabber is an instance of ofVideoGrabber 27 | ofVideoGrabber grabber; 28 | 29 | // tracker is an instance of ofxFaceTracker2 30 | ofxFaceTracker2 tracker; 31 | 32 | // leftTrail is an instance of ofPolyline 33 | ofPolyline leftTrail; 34 | 35 | // rightTrail is an instance of ofPolyline 36 | ofPolyline rightTrail; 37 | 38 | }; 39 | -------------------------------------------------------------------------------- /code/drawing3d/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/drawing3d/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/drawing3d/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/drawing3d/addons.make -------------------------------------------------------------------------------- /code/drawing3d/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/drawing3d/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/drawing3d/drawing3d.xcodeproj/xcshareddata/xcschemes/drawing3d Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /code/drawing3d/drawing3d.xcodeproj/xcshareddata/xcschemes/drawing3d Release.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /code/drawing3d/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/drawing3d/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/drawing3d/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | class ofApp : public ofBaseApp{ 6 | 7 | public: 8 | void setup(); 9 | void update(); 10 | void draw(); 11 | 12 | void keyPressed(int key); 13 | void keyReleased(int key); 14 | void mouseMoved(int x, int y ); 15 | void mouseDragged(int x, int y, int button); 16 | void mousePressed(int x, int y, int button); 17 | void mouseReleased(int x, int y, int button); 18 | void mouseEntered(int x, int y); 19 | void mouseExited(int x, int y); 20 | void windowResized(int w, int h); 21 | void dragEvent(ofDragInfo dragInfo); 22 | void gotMessage(ofMessage msg); 23 | 24 | // declare global variables 25 | // they can be used in any frame 26 | bool bMousePressed; 27 | ofPolyline line; 28 | }; 29 | -------------------------------------------------------------------------------- /code/drawingBackwards/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/drawingBackwards/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/drawingBackwards/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/drawingBackwards/addons.make -------------------------------------------------------------------------------- /code/drawingBackwards/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/drawingBackwards/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/drawingBackwards/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/drawingBackwards/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/drawingBackwards/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | //-------------------------------------------------------------- 4 | void ofApp::setup(){ 5 | 6 | } 7 | 8 | //-------------------------------------------------------------- 9 | void ofApp::update(){ 10 | 11 | } 12 | 13 | //-------------------------------------------------------------- 14 | void ofApp::draw(){ 15 | 16 | // set line width 17 | ofSetLineWidth(3); 18 | 19 | // draw ofPolyline line 20 | line.draw(); 21 | } 22 | 23 | //-------------------------------------------------------------- 24 | void ofApp::keyPressed(int key){ 25 | 26 | } 27 | 28 | //-------------------------------------------------------------- 29 | void ofApp::keyReleased(int key){ 30 | 31 | } 32 | 33 | //-------------------------------------------------------------- 34 | void ofApp::mouseMoved(int x, int y ){ 35 | 36 | } 37 | 38 | //-------------------------------------------------------------- 39 | void ofApp::mouseDragged(int x, int y, int button){ 40 | 41 | // ofPoint diff is the mouse movement between frames 42 | ofPoint diff = ofPoint(x,y) - prevMouse; 43 | 44 | // ofPoint lastLinePt is the last point in ofPolyline line 45 | ofPoint lastLinePt = line[line.size()-1]; 46 | 47 | // add new element to ofPolyline line 48 | // the new element is in opposite direction of diff 49 | line.addVertex(lastLinePt - diff); 50 | 51 | // let's move the drawing so that it always starts from mouse 52 | 53 | // this is the distance between mouse and last element in line 54 | ofPoint diffToMouse = ofPoint(x,y) - line[line.size()-1]; 55 | 56 | // go through every element in ofPolyline line 57 | // move it by diffToMouse, distance of last point to mouse 58 | for (int i = 0; i < line.size(); i++){ 59 | line[i] += diffToMouse; 60 | } 61 | 62 | // when mouseDragged, update prevMouse 63 | prevMouse.set(x,y); 64 | } 65 | 66 | //-------------------------------------------------------------- 67 | void ofApp::mousePressed(int x, int y, int button){ 68 | 69 | // when mousePressed, reset line and prevMouse 70 | line.clear(); 71 | line.addVertex(x,y); 72 | prevMouse.set(x,y); 73 | } 74 | 75 | //-------------------------------------------------------------- 76 | void ofApp::mouseReleased(int x, int y, int button){ 77 | 78 | } 79 | 80 | //-------------------------------------------------------------- 81 | void ofApp::mouseEntered(int x, int y){ 82 | 83 | } 84 | 85 | //-------------------------------------------------------------- 86 | void ofApp::mouseExited(int x, int y){ 87 | 88 | } 89 | 90 | //-------------------------------------------------------------- 91 | void ofApp::windowResized(int w, int h){ 92 | 93 | } 94 | 95 | //-------------------------------------------------------------- 96 | void ofApp::gotMessage(ofMessage msg){ 97 | 98 | } 99 | 100 | //-------------------------------------------------------------- 101 | void ofApp::dragEvent(ofDragInfo dragInfo){ 102 | 103 | } 104 | -------------------------------------------------------------------------------- /code/drawingBackwards/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | class ofApp : public ofBaseApp{ 6 | 7 | public: 8 | void setup(); 9 | void update(); 10 | void draw(); 11 | 12 | void keyPressed(int key); 13 | void keyReleased(int key); 14 | void mouseMoved(int x, int y ); 15 | void mouseDragged(int x, int y, int button); 16 | void mousePressed(int x, int y, int button); 17 | void mouseReleased(int x, int y, int button); 18 | void mouseEntered(int x, int y); 19 | void mouseExited(int x, int y); 20 | void windowResized(int w, int h); 21 | void dragEvent(ofDragInfo dragInfo); 22 | void gotMessage(ofMessage msg); 23 | 24 | // create instance of ofPolyline and ofPoint 25 | // they can be accessed from any frame 26 | ofPolyline line; 27 | ofPoint prevMouse; 28 | }; 29 | -------------------------------------------------------------------------------- /code/drawingPlayback/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/drawingPlayback/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/drawingPlayback/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/drawingPlayback/addons.make -------------------------------------------------------------------------------- /code/drawingPlayback/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/drawingPlayback/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/drawingPlayback/bin/data/drawbar_c4_a.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/drawingPlayback/bin/data/drawbar_c4_a.aif -------------------------------------------------------------------------------- /code/drawingPlayback/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/drawingPlayback/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/drawingPlayback/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | class ofApp : public ofBaseApp{ 6 | 7 | public: 8 | void setup(); 9 | void update(); 10 | void draw(); 11 | 12 | void keyPressed(int key); 13 | void keyReleased(int key); 14 | void mouseMoved(int x, int y ); 15 | void mouseDragged(int x, int y, int button); 16 | void mousePressed(int x, int y, int button); 17 | void mouseReleased(int x, int y, int button); 18 | void mouseEntered(int x, int y); 19 | void mouseExited(int x, int y); 20 | void windowResized(int w, int h); 21 | void dragEvent(ofDragInfo dragInfo); 22 | void gotMessage(ofMessage msg); 23 | 24 | // declare instances of ofPolyline and ofSoundPlayer 25 | // they are global and can be used in any frame 26 | ofPolyline line; 27 | ofSoundPlayer player; 28 | }; 29 | -------------------------------------------------------------------------------- /code/drawingRendering/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/drawingRendering/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/drawingRendering/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/drawingRendering/addons.make -------------------------------------------------------------------------------- /code/drawingRendering/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/drawingRendering/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/drawingRendering/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/drawingRendering/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/drawingRendering/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | class ofApp : public ofBaseApp{ 6 | 7 | public: 8 | void setup(); 9 | void update(); 10 | void draw(); 11 | 12 | void keyPressed(int key); 13 | void keyReleased(int key); 14 | void mouseMoved(int x, int y ); 15 | void mouseDragged(int x, int y, int button); 16 | void mousePressed(int x, int y, int button); 17 | void mouseReleased(int x, int y, int button); 18 | void mouseEntered(int x, int y); 19 | void mouseExited(int x, int y); 20 | void windowResized(int w, int h); 21 | void dragEvent(ofDragInfo dragInfo); 22 | void gotMessage(ofMessage msg); 23 | 24 | // declare ofPolyline line 25 | // it can be accessed from any frame 26 | ofPolyline line; 27 | }; 28 | -------------------------------------------------------------------------------- /code/generativeExample1/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/generativeExample1/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/generativeExample1/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/generativeExample1/addons.make -------------------------------------------------------------------------------- /code/generativeExample1/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/generativeExample1/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/generativeExample1/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/generativeExample1/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/generativeExample1/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | 6 | class line { 7 | public: 8 | ofPoint a; 9 | ofPoint b; 10 | }; 11 | 12 | 13 | class ofApp : public ofBaseApp{ 14 | 15 | public: 16 | void setup(); 17 | void update(); 18 | void draw(); 19 | 20 | void keyPressed(int key); 21 | void keyReleased(int key); 22 | void mouseMoved(int x, int y ); 23 | void mouseDragged(int x, int y, int button); 24 | void mousePressed(int x, int y, int button); 25 | void mouseReleased(int x, int y, int button); 26 | void mouseEntered(int x, int y); 27 | void mouseExited(int x, int y); 28 | void windowResized(int w, int h); 29 | void dragEvent(ofDragInfo dragInfo); 30 | void gotMessage(ofMessage msg); 31 | 32 | // create array myLines of objects type line 33 | // syntax is vector < type > name; 34 | vector < line > myLines; 35 | }; 36 | -------------------------------------------------------------------------------- /code/generativeExample2/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/generativeExample2/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/generativeExample2/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/generativeExample2/addons.make -------------------------------------------------------------------------------- /code/generativeExample2/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/generativeExample2/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/generativeExample2/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/generativeExample2/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/generativeExample2/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | // declaration of class line 6 | // line has two elements: ofPoint a, and ofPoint b 7 | class line { 8 | public: 9 | ofPoint a; 10 | ofPoint b; 11 | }; 12 | 13 | class ofApp : public ofBaseApp{ 14 | 15 | public: 16 | void setup(); 17 | void update(); 18 | void draw(); 19 | 20 | void keyPressed(int key); 21 | void keyReleased(int key); 22 | void mouseMoved(int x, int y ); 23 | void mouseDragged(int x, int y, int button); 24 | void mousePressed(int x, int y, int button); 25 | void mouseReleased(int x, int y, int button); 26 | void mouseEntered(int x, int y); 27 | void mouseExited(int x, int y); 28 | void windowResized(int w, int h); 29 | void dragEvent(ofDragInfo dragInfo); 30 | void gotMessage(ofMessage msg); 31 | 32 | // mylines is the name of a vector of type line 33 | // syntax: vector name; 34 | vector < line > myLines; 35 | }; 36 | -------------------------------------------------------------------------------- /code/generativeExample3/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/generativeExample3/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/generativeExample3/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/generativeExample3/addons.make -------------------------------------------------------------------------------- /code/generativeExample3/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/generativeExample3/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/generativeExample3/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/generativeExample3/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/generativeExample3/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | // declaration of class line 6 | // line has two elements: ofPoint a, and ofPoint b 7 | class line { 8 | public: 9 | ofPoint a; 10 | ofPoint b; 11 | }; 12 | 13 | 14 | class ofApp : public ofBaseApp{ 15 | 16 | public: 17 | void setup(); 18 | void update(); 19 | void draw(); 20 | 21 | void keyPressed(int key); 22 | void keyReleased(int key); 23 | void mouseMoved(int x, int y ); 24 | void mouseDragged(int x, int y, int button); 25 | void mousePressed(int x, int y, int button); 26 | void mouseReleased(int x, int y, int button); 27 | void mouseEntered(int x, int y); 28 | void mouseExited(int x, int y); 29 | void windowResized(int w, int h); 30 | void dragEvent(ofDragInfo dragInfo); 31 | void gotMessage(ofMessage msg); 32 | 33 | // mylines is the name of a vector of type line 34 | // syntax: vector name; 35 | vector < line > myLines; 36 | }; 37 | -------------------------------------------------------------------------------- /code/generativeExample4/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/generativeExample4/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/generativeExample4/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/generativeExample4/addons.make -------------------------------------------------------------------------------- /code/generativeExample4/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/generativeExample4/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/generativeExample4/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/generativeExample4/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/generativeExample4/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | // declaration of class line 6 | // line has two elements: ofPoint a, and ofPoint b 7 | class line { 8 | public: 9 | ofPoint a; 10 | ofPoint b; 11 | }; 12 | 13 | 14 | class ofApp : public ofBaseApp{ 15 | 16 | public: 17 | void setup(); 18 | void update(); 19 | void draw(); 20 | 21 | void keyPressed(int key); 22 | void keyReleased(int key); 23 | void mouseMoved(int x, int y ); 24 | void mouseDragged(int x, int y, int button); 25 | void mousePressed(int x, int y, int button); 26 | void mouseReleased(int x, int y, int button); 27 | void mouseEntered(int x, int y); 28 | void mouseExited(int x, int y); 29 | void windowResized(int w, int h); 30 | void dragEvent(ofDragInfo dragInfo); 31 | void gotMessage(ofMessage msg); 32 | 33 | // mylines is the name of a vector of type line 34 | // syntax: vector name; 35 | vector < line > myLines; 36 | }; 37 | -------------------------------------------------------------------------------- /code/generativeExample5/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/generativeExample5/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/generativeExample5/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/generativeExample5/addons.make -------------------------------------------------------------------------------- /code/generativeExample5/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/generativeExample5/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/generativeExample5/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/generativeExample5/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/generativeExample5/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | // declaration of class line 6 | // line has two elements: ofPoint a, and ofPoint b 7 | class line { 8 | public: 9 | ofPoint a; 10 | ofPoint b; 11 | }; 12 | 13 | 14 | class ofApp : public ofBaseApp{ 15 | 16 | public: 17 | void setup(); 18 | void update(); 19 | void draw(); 20 | 21 | void keyPressed(int key); 22 | void keyReleased(int key); 23 | void mouseMoved(int x, int y ); 24 | void mouseDragged(int x, int y, int button); 25 | void mousePressed(int x, int y, int button); 26 | void mouseReleased(int x, int y, int button); 27 | void mouseEntered(int x, int y); 28 | void mouseExited(int x, int y); 29 | void windowResized(int w, int h); 30 | void dragEvent(ofDragInfo dragInfo); 31 | void gotMessage(ofMessage msg); 32 | 33 | // mylines is the name of a vector of type line 34 | // syntax: vector name; 35 | vector < line > myLines; 36 | }; 37 | -------------------------------------------------------------------------------- /code/generativeExample6/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/generativeExample6/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/generativeExample6/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/generativeExample6/addons.make -------------------------------------------------------------------------------- /code/generativeExample6/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/generativeExample6/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/generativeExample6/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/generativeExample6/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/generativeExample6/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | // declaration of class line 6 | // line has two elements: ofPoint a, and ofPoint b 7 | class line { 8 | public: 9 | ofPoint a; 10 | ofPoint b; 11 | }; 12 | 13 | 14 | class ofApp : public ofBaseApp{ 15 | 16 | public: 17 | void setup(); 18 | void update(); 19 | void draw(); 20 | 21 | void keyPressed(int key); 22 | void keyReleased(int key); 23 | void mouseMoved(int x, int y ); 24 | void mouseDragged(int x, int y, int button); 25 | void mousePressed(int x, int y, int button); 26 | void mouseReleased(int x, int y, int button); 27 | void mouseEntered(int x, int y); 28 | void mouseExited(int x, int y); 29 | void windowResized(int w, int h); 30 | void dragEvent(ofDragInfo dragInfo); 31 | void gotMessage(ofMessage msg); 32 | 33 | // mylines is the name of a vector of type line 34 | // syntax: vector name; 35 | vector < line > myLines; 36 | }; 37 | -------------------------------------------------------------------------------- /code/mixDrawings/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/mixDrawings/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/mixDrawings/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/mixDrawings/addons.make -------------------------------------------------------------------------------- /code/mixDrawings/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/mixDrawings/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/mixDrawings/mixDrawings.xcodeproj/xcshareddata/xcschemes/mixDrawings Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /code/mixDrawings/mixDrawings.xcodeproj/xcshareddata/xcschemes/mixDrawings Release.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /code/mixDrawings/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/mixDrawings/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/mixDrawings/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | class ofApp : public ofBaseApp{ 6 | 7 | public: 8 | void setup(); 9 | void update(); 10 | void draw(); 11 | 12 | void keyPressed(int key); 13 | void keyReleased(int key); 14 | void mouseMoved(int x, int y ); 15 | void mouseDragged(int x, int y, int button); 16 | void mousePressed(int x, int y, int button); 17 | void mouseReleased(int x, int y, int button); 18 | void mouseEntered(int x, int y); 19 | void mouseExited(int x, int y); 20 | void windowResized(int w, int h); 21 | void dragEvent(ofDragInfo dragInfo); 22 | void gotMessage(ofMessage msg); 23 | 24 | // lineA, lineB, and mix are instances of ofPolyine 25 | // lineA and lineB store the two most recent lines drawn 26 | // mix stores the interpolation between lineA and lineB 27 | ofPolyline lineA; 28 | ofPolyline lineB; 29 | ofPolyline mix; 30 | 31 | // mixPct is a float that stores the interpolation percentage 32 | float mixPct; 33 | 34 | // sampleCount is an integer that stores the sampling count 35 | int sampleCount; 36 | 37 | // bDrawingA is a boolean for toggling for every new drawing 38 | // this allows the app to always store the latest two drawings 39 | bool bDrawingA; 40 | 41 | }; 42 | -------------------------------------------------------------------------------- /code/node/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/node/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/node/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/node/addons.make -------------------------------------------------------------------------------- /code/node/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/node/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/node/node.xcodeproj/xcshareddata/xcschemes/node Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /code/node/node.xcodeproj/xcshareddata/xcschemes/node Release.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /code/node/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/node/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/node/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | class ofApp : public ofBaseApp{ 6 | 7 | public: 8 | void setup(); 9 | void update(); 10 | void draw(); 11 | 12 | void keyPressed(int key); 13 | void keyReleased(int key); 14 | void mouseMoved(int x, int y ); 15 | void mouseDragged(int x, int y, int button); 16 | void mousePressed(int x, int y, int button); 17 | void mouseReleased(int x, int y, int button); 18 | void mouseEntered(int x, int y); 19 | void mouseExited(int x, int y); 20 | void windowResized(int w, int h); 21 | void dragEvent(ofDragInfo dragInfo); 22 | void gotMessage(ofMessage msg); 23 | 24 | void resetSpeeds(bool resetA, bool resetB); 25 | 26 | float speedA; 27 | float speedB; 28 | 29 | float speedASmooth; 30 | float speedBSmooth; 31 | 32 | ofNode nodeA; 33 | ofNode nodeB; 34 | ofNode nodeC; 35 | 36 | ofPolyline myLine; 37 | 38 | 39 | 40 | }; 41 | -------------------------------------------------------------------------------- /code/pathReplayPart/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/pathReplayPart/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/pathReplayPart/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/pathReplayPart/addons.make -------------------------------------------------------------------------------- /code/pathReplayPart/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/pathReplayPart/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/pathReplayPart/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/pathReplayPart/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/pathReplayPart/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | //-------------------------------------------------------------- 4 | void ofApp::setup(){ 5 | 6 | bDoneDrawing = false; 7 | } 8 | 9 | //-------------------------------------------------------------- 10 | void ofApp::update(){ 11 | 12 | } 13 | 14 | //-------------------------------------------------------------- 15 | void ofApp::draw(){ 16 | 17 | ofSetLineWidth(1); 18 | ofSetColor(255); 19 | line.draw(); 20 | 21 | if (bDoneDrawing == true){ 22 | 23 | float pctMe = ofMap(fmod(ofGetElapsedTimef(), 5), 0, 5, 0, 1.2); // go from 0 to 1.2 (we will show 20%) every 5 seconds 24 | float pctToShow = 0.2; // show 20 pct of the lines 25 | 26 | ofPolyline newLine; 27 | for (int i = 0; i < 100; i++){ 28 | float pct = ofMap(i, 0, 100, pctMe - pctToShow, pctMe); 29 | if (pct > 0 && pct < 1){ 30 | newLine.addVertex(line.getPointAtPercent(pct)); 31 | } 32 | } 33 | ofSetColor(255,0,0); 34 | ofSetLineWidth(3); 35 | newLine.draw(); 36 | 37 | } 38 | 39 | } 40 | 41 | //-------------------------------------------------------------- 42 | void ofApp::keyPressed(int key){ 43 | 44 | } 45 | 46 | //-------------------------------------------------------------- 47 | void ofApp::keyReleased(int key){ 48 | 49 | } 50 | 51 | //-------------------------------------------------------------- 52 | void ofApp::mouseMoved(int x, int y ){ 53 | 54 | } 55 | 56 | //-------------------------------------------------------------- 57 | void ofApp::mouseDragged(int x, int y, int button){ 58 | 59 | line.addVertex(x,y); 60 | } 61 | 62 | //-------------------------------------------------------------- 63 | void ofApp::mousePressed(int x, int y, int button){ 64 | 65 | line.clear(); 66 | bDoneDrawing = false; 67 | } 68 | 69 | //-------------------------------------------------------------- 70 | void ofApp::mouseReleased(int x, int y, int button){ 71 | 72 | bDoneDrawing = true; 73 | } 74 | 75 | //-------------------------------------------------------------- 76 | void ofApp::mouseEntered(int x, int y){ 77 | 78 | } 79 | 80 | //-------------------------------------------------------------- 81 | void ofApp::mouseExited(int x, int y){ 82 | 83 | } 84 | 85 | //-------------------------------------------------------------- 86 | void ofApp::windowResized(int w, int h){ 87 | 88 | } 89 | 90 | //-------------------------------------------------------------- 91 | void ofApp::gotMessage(ofMessage msg){ 92 | 93 | } 94 | 95 | //-------------------------------------------------------------- 96 | void ofApp::dragEvent(ofDragInfo dragInfo){ 97 | 98 | } 99 | -------------------------------------------------------------------------------- /code/pathReplayPart/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | class ofApp : public ofBaseApp{ 6 | 7 | public: 8 | void setup(); 9 | void update(); 10 | void draw(); 11 | 12 | void keyPressed(int key); 13 | void keyReleased(int key); 14 | void mouseMoved(int x, int y ); 15 | void mouseDragged(int x, int y, int button); 16 | void mousePressed(int x, int y, int button); 17 | void mouseReleased(int x, int y, int button); 18 | void mouseEntered(int x, int y); 19 | void mouseExited(int x, int y); 20 | void windowResized(int w, int h); 21 | void dragEvent(ofDragInfo dragInfo); 22 | void gotMessage(ofMessage msg); 23 | 24 | 25 | ofPolyline line; 26 | bool bDoneDrawing; 27 | 28 | 29 | }; 30 | -------------------------------------------------------------------------------- /code/pathWithTime/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/pathWithTime/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/pathWithTime/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/pathWithTime/addons.make -------------------------------------------------------------------------------- /code/pathWithTime/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/pathWithTime/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/pathWithTime/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/pathWithTime/pathWithTime.xcodeproj/xcshareddata/xcschemes/pathWithTime Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /code/pathWithTime/pathWithTime.xcodeproj/xcshareddata/xcschemes/pathWithTime Release.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /code/pathWithTime/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/pathWithTime/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | //-------------------------------------------------------------- 4 | void ofApp::setup(){ 5 | 6 | TPR.setup(); 7 | playbackStartTime = ofGetElapsedTimef(); 8 | } 9 | 10 | //-------------------------------------------------------------- 11 | void ofApp::update(){ 12 | 13 | } 14 | 15 | //-------------------------------------------------------------- 16 | void ofApp::draw(){ 17 | 18 | 19 | TPR.draw(); 20 | 21 | // -------------------------- draw the point at the current time 22 | if (TPR.bHaveADrawing()){ // if we have a drawing to work with 23 | 24 | // figure out what time we are at, and make sure we playback cyclically (!) 25 | // use the duration here and make sure our timeToCheck is in the range of 0 - duration 26 | float timeToCheck = ofGetElapsedTimef() - playbackStartTime; 27 | while (timeToCheck > TPR.getDuration() && TPR.getDuration() > 0){ 28 | timeToCheck -= TPR.getDuration(); 29 | } 30 | 31 | // get the position and velocity at timeToCheck 32 | ofPoint pos = TPR.getPositionForTime(timeToCheck); 33 | ofPoint vel = TPR.getVelocityForTime(timeToCheck); 34 | 35 | float angle = atan2(vel.y, vel.x); 36 | 37 | float lengthVel = ofDist(0,0,vel.x, vel.y); 38 | 39 | ofFill(); 40 | ofSetColor(255,0,0); 41 | 42 | ofSetRectMode(OF_RECTMODE_CENTER); 43 | 44 | ofPushMatrix(); 45 | ofTranslate(pos.x, pos.y, 0); 46 | ofRotateZ(angle * RAD_TO_DEG); 47 | //ofRect(0,0,50,50); 48 | ofRect(0,0,50 + lengthVel/2.0,50); // this does some stretching based on velocity. 49 | ofPopMatrix(); 50 | 51 | 52 | 53 | 54 | } 55 | } 56 | 57 | //-------------------------------------------------------------- 58 | void ofApp::keyPressed(int key){ 59 | 60 | } 61 | 62 | //-------------------------------------------------------------- 63 | void ofApp::keyReleased(int key){ 64 | 65 | } 66 | 67 | //-------------------------------------------------------------- 68 | void ofApp::mouseMoved(int x, int y ){ 69 | 70 | } 71 | 72 | //-------------------------------------------------------------- 73 | void ofApp::mouseDragged(int x, int y, int button){ 74 | TPR.addPoint(x,y); 75 | } 76 | 77 | //-------------------------------------------------------------- 78 | void ofApp::mousePressed(int x, int y, int button){ 79 | TPR.startDrawing(x,y); 80 | } 81 | 82 | //-------------------------------------------------------------- 83 | void ofApp::mouseReleased(int x, int y, int button){ 84 | TPR.endDrawing(); 85 | playbackStartTime = ofGetElapsedTimef(); 86 | } 87 | 88 | //-------------------------------------------------------------- 89 | void ofApp::mouseEntered(int x, int y){ 90 | 91 | } 92 | 93 | //-------------------------------------------------------------- 94 | void ofApp::mouseExited(int x, int y){ 95 | 96 | } 97 | 98 | //-------------------------------------------------------------- 99 | void ofApp::windowResized(int w, int h){ 100 | 101 | } 102 | 103 | //-------------------------------------------------------------- 104 | void ofApp::gotMessage(ofMessage msg){ 105 | 106 | } 107 | 108 | //-------------------------------------------------------------- 109 | void ofApp::dragEvent(ofDragInfo dragInfo){ 110 | 111 | } 112 | -------------------------------------------------------------------------------- /code/pathWithTime/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "timePointRecorder.h" 5 | 6 | class ofApp : public ofBaseApp{ 7 | 8 | public: 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | 13 | void keyPressed(int key); 14 | void keyReleased(int key); 15 | void mouseMoved(int x, int y ); 16 | void mouseDragged(int x, int y, int button); 17 | void mousePressed(int x, int y, int button); 18 | void mouseReleased(int x, int y, int button); 19 | void mouseEntered(int x, int y); 20 | void mouseExited(int x, int y); 21 | void windowResized(int w, int h); 22 | void dragEvent(ofDragInfo dragInfo); 23 | void gotMessage(ofMessage msg); 24 | 25 | 26 | float playbackStartTime; 27 | timePointRecorder TPR; 28 | 29 | }; 30 | -------------------------------------------------------------------------------- /code/pathWithTime/src/timePointRecorder.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * timePointRecorder.cpp 3 | * drawingWithTime 4 | * 5 | * Created by zachary lieberman on 9/21/10. 6 | * Copyright 2010 __MyCompanyName__. All rights reserved. 7 | * 8 | */ 9 | 10 | #include "timePointRecorder.h" 11 | 12 | //------------------------------------------------- 13 | void timePointRecorder::setup(){ 14 | bRecording = false; 15 | } 16 | 17 | //------------------------------------------------- 18 | void timePointRecorder::clear(){ 19 | pts.clear(); 20 | } 21 | 22 | //------------------------------------------------- 23 | void timePointRecorder::draw(){ 24 | 25 | ofSetColor(0,0,0); 26 | ofNoFill(); 27 | ofBeginShape(); 28 | for (int i = 0; i < pts.size();i++){ 29 | ofVertex(pts[i].x, pts[i].y); 30 | } 31 | ofEndShape(); 32 | } 33 | 34 | //------------------------------------------------- 35 | void timePointRecorder::startDrawing(float x, float y){ 36 | clear(); 37 | bRecording = true; 38 | startTime = ofGetElapsedTimef(); 39 | timePoint temp; 40 | temp.x = x; 41 | temp.y = y; 42 | temp.t = 0; 43 | pts.push_back(temp); 44 | } 45 | 46 | //------------------------------------------------- 47 | void timePointRecorder::addPoint (float x, float y){ 48 | timePoint temp; 49 | temp.x = x; 50 | temp.y = y; 51 | temp.t = ofGetElapsedTimef() - startTime; 52 | pts.push_back(temp); 53 | } 54 | 55 | //------------------------------------------------- 56 | void timePointRecorder::endDrawing(){ 57 | bRecording = false; 58 | } 59 | 60 | //------------------------------------------------- 61 | bool timePointRecorder::bHaveADrawing(){ 62 | if (bRecording == true){ 63 | return false; 64 | } else if (pts.size() < 2){ 65 | return false; 66 | } 67 | 68 | return true; 69 | } 70 | 71 | 72 | float timePointRecorder::getDuration(){ 73 | float duration = 0; 74 | if (bHaveADrawing() == true){ 75 | duration = pts[pts.size()-1].t; 76 | } 77 | return duration; 78 | } 79 | 80 | 81 | 82 | //------------------------------------------------- 83 | ofPoint timePointRecorder::getPositionForTime( float time){ 84 | 85 | // are we recording? 86 | if (bHaveADrawing() == false){ 87 | return ofPoint(0,0,0); 88 | } 89 | 90 | // now, let's figure out where we are in the drawing... 91 | ofPoint pos; 92 | for (int i = 0; i < pts.size()-1; i++){ 93 | if (time >= pts[i].t && time <= pts[i+1].t){ 94 | 95 | // calculate pct: 96 | float part = time - pts[i].t; 97 | float whole = pts[i+1].t - pts[i].t; 98 | float pct = part / whole; 99 | 100 | // figure out where we are between a and b 101 | pos.x = (1-pct) * pts[i].x + (pct) * pts[i+1].x; 102 | pos.y = (1-pct) * pts[i].y + (pct) * pts[i+1].y; 103 | 104 | 105 | } 106 | } 107 | 108 | return pos; 109 | 110 | } 111 | 112 | 113 | //------------------------------------------------- 114 | ofPoint timePointRecorder::getVelocityForTime( float time){ 115 | 116 | // to get the velcoity, look back a bit of time, and at the current time 117 | // and get the difference 118 | // veclocity = pos at time 1 - pos at time 0... 119 | 120 | ofPoint prevPt = getPositionForTime( MAX(time - 0.05f, 0)); // check for where we were 0.05 seconds ago 121 | ofPoint currPt = getPositionForTime(time); // check for where we are now. 122 | 123 | ofPoint diff; 124 | diff.x = currPt.x - prevPt.x; 125 | diff.y = currPt.y - prevPt.y; 126 | 127 | return diff; 128 | } 129 | -------------------------------------------------------------------------------- /code/pathWithTime/src/timePointRecorder.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | 6 | class timePoint { 7 | 8 | public: 9 | float x; 10 | float y; 11 | float t; 12 | }; 13 | 14 | //-------------------------------------------------- 15 | class timePointRecorder { 16 | 17 | public: 18 | 19 | void setup(); 20 | void clear(); 21 | void draw(); 22 | 23 | void startDrawing(float x, float y); 24 | void addPoint (float x, float y); 25 | void endDrawing(); 26 | 27 | ofPoint getPositionForTime( float time); 28 | ofPoint getVelocityForTime( float time); 29 | 30 | bool bHaveADrawing(); 31 | float getDuration(); 32 | 33 | vector < timePoint > pts; 34 | float startTime; 35 | bool bRecording; 36 | 37 | 38 | }; 39 | 40 | -------------------------------------------------------------------------------- /code/springDrawing/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /code/springDrawing/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /code/springDrawing/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/springDrawing/addons.make -------------------------------------------------------------------------------- /code/springDrawing/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/code/springDrawing/bin/data/.gitkeep -------------------------------------------------------------------------------- /code/springDrawing/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /code/springDrawing/springDrawing.xcodeproj/xcshareddata/xcschemes/springDrawing Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /code/springDrawing/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /code/springDrawing/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "spring.h" 5 | #include "particle.h" 6 | 7 | class ofApp : public ofBaseApp{ 8 | 9 | public: 10 | void setup(); 11 | void update(); 12 | void draw(); 13 | 14 | void keyPressed(int key); 15 | void keyReleased(int key); 16 | void mouseMoved(int x, int y ); 17 | void mouseDragged(int x, int y, int button); 18 | void mousePressed(int x, int y, int button); 19 | void mouseReleased(int x, int y, int button); 20 | void mouseEntered(int x, int y); 21 | void mouseExited(int x, int y); 22 | void windowResized(int w, int h); 23 | void dragEvent(ofDragInfo dragInfo); 24 | void gotMessage(ofMessage msg); 25 | 26 | 27 | particle particleA; 28 | particle particleB; 29 | particle particleC; 30 | 31 | spring connector; 32 | spring connector2; 33 | 34 | ofPolyline temp; 35 | }; 36 | -------------------------------------------------------------------------------- /code/springDrawing/src/particle.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | class particle 6 | { 7 | public: 8 | ofVec2f pos; 9 | ofVec2f vel; 10 | ofVec2f frc; // frc is also know as acceleration (newton says "f=ma") 11 | 12 | particle(); 13 | virtual ~particle(){}; 14 | 15 | void resetForce(); 16 | void addForce(float x, float y); 17 | void addRepulsionForce(float x, float y, float radius, float scale); 18 | void addAttractionForce(float x, float y, float radius, float scale); 19 | 20 | void addRepulsionForce(particle &p, float radius, float scale); 21 | void addAttractionForce(particle &p, float radius, float scale); 22 | void addClockwiseForce(particle &p, float radius, float scale); 23 | void addCounterClockwiseForce(particle &p, float radius, float scale); 24 | 25 | 26 | void addDampingForce(); 27 | 28 | void setInitialCondition(float px, float py, float vx, float vy); 29 | void update(); 30 | void draw(); 31 | 32 | void bounceOffWalls(); 33 | 34 | bool bFixed; 35 | 36 | float damping; 37 | 38 | }; 39 | -------------------------------------------------------------------------------- /code/springDrawing/src/spring.cpp: -------------------------------------------------------------------------------- 1 | #include "spring.h" 2 | 3 | //--------------------------------------------------------------------- 4 | spring::spring(){ 5 | particleA = NULL; 6 | particleB = NULL; 7 | } 8 | 9 | //--------------------------------------------------------------------- 10 | void spring::update(){ 11 | if ((particleA == NULL) || (particleB == NULL)){ 12 | return; 13 | } 14 | 15 | ofVec2f pta = particleA->pos; 16 | ofVec2f ptb = particleB->pos; 17 | 18 | float theirDistance = (pta - ptb).length(); 19 | float springForce = (springiness * (distance - theirDistance)); 20 | ofVec2f frcToAdd = (pta-ptb).normalized() * springForce; 21 | 22 | particleA->addForce(frcToAdd.x, frcToAdd.y); 23 | particleB->addForce(-frcToAdd.x, -frcToAdd.y); 24 | } 25 | 26 | 27 | //--------------------------------------------------------------------- 28 | void spring::draw(){ 29 | 30 | if ((particleA == NULL) || (particleB == NULL)){ 31 | return; 32 | } 33 | 34 | ofLine(particleA->pos.x, particleA->pos.y, particleB->pos.x, particleB->pos.y); 35 | } -------------------------------------------------------------------------------- /code/springDrawing/src/spring.h: -------------------------------------------------------------------------------- 1 | #ifndef SPRING_H 2 | #define SPRING_H 3 | 4 | #include "ofMain.h" 5 | #include "particle.h" 6 | 7 | class spring { 8 | 9 | public: 10 | 11 | spring(); 12 | 13 | particle * particleA; 14 | particle * particleB; 15 | 16 | float distance; 17 | float springiness; // this is the k, springiness constant 18 | 19 | void update(); 20 | void draw(); 21 | 22 | 23 | }; 24 | 25 | 26 | #endif -------------------------------------------------------------------------------- /code_p5js/basicDrawing/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | basicDrawing2 7 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /code_p5js/basicDrawing/js/sketch.js: -------------------------------------------------------------------------------- 1 | let diameter = 20; 2 | 3 | function setup() { 4 | 5 | // create canvas 6 | createCanvas(1024, 768); 7 | 8 | // black background 9 | background(0, 0, 0); 10 | 11 | noStroke(); 12 | 13 | } 14 | 15 | function draw() { 16 | } 17 | 18 | function mouseDragged() { 19 | ellipse(mouseX, mouseY, diameter, diameter); 20 | } 21 | -------------------------------------------------------------------------------- /code_p5js/basicDrawing2/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | basicDrawing2 7 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /code_p5js/basicDrawing2/js/sketch.js: -------------------------------------------------------------------------------- 1 | // declare array called polyline 2 | let polyline = []; 3 | 4 | function setup() { 5 | 6 | // create canvas 7 | createCanvas(1024, 768); 8 | 9 | // white stroke 10 | stroke(255); 11 | 12 | } 13 | 14 | function draw() { 15 | 16 | // black background 17 | background(0, 0, 0); 18 | 19 | // go through every vector element in the array polyline 20 | for (let i = 0; i < polyline.length; i++) { 21 | // for all elements except for the last one 22 | if (i + 1 < polyline.length) { 23 | // draw a line between current element and the next one 24 | line(polyline[i].x, polyline[i].y, polyline[i+1].x, polyline[i+1].y); 25 | } 26 | } 27 | } 28 | 29 | // while mouse is dragged 30 | // create vector with current mouse position and add to polyline 31 | function mouseDragged() { 32 | polyline.push(createVector(mouseX, mouseY)); 33 | } 34 | 35 | // when mouse is pressed, clear polyline 36 | function mousePressed() { 37 | if (polyline.length > 0) { 38 | polyline = []; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /code_p5js/basicDrawing3/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | basicDrawing3 7 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /code_p5js/basicDrawing3/js/sketch.js: -------------------------------------------------------------------------------- 1 | // declare arrays for storing lines 2 | let polyline = []; 3 | let resampled = []; 4 | 5 | function setup() { 6 | 7 | // create canvas 8 | createCanvas(1024, 768); 9 | 10 | // noStroke, red fill 11 | noStroke(); 12 | fill(255, 0, 0); 13 | } 14 | 15 | function draw() { 16 | // black background 17 | background(0, 0, 0); 18 | 19 | for (let i = 0; i < resampled.length; i++) { 20 | ellipse(resampled[i].x, resampled[i].y, 20, 20); 21 | } 22 | } 23 | 24 | // while mouse is dragged, create PVector with current mouse position and add to polyline 25 | function mouseDragged() { 26 | 27 | polyline.push(createVector(mouseX, mouseY)); 28 | 29 | // if resampled is empty, add first element 30 | if (resampled.length == 0) { 31 | resampled.push(createVector(polyline[0].x, polyline[0].y)); 32 | } 33 | // in other case 34 | else { 35 | 36 | let resampledLast = resampled.length - 1; 37 | 38 | // x1, y1 is newest PVector in resampled 39 | let x1 = resampled[resampledLast].x; 40 | let y1 = resampled[resampledLast].y; 41 | 42 | // x2, y2 is last PVector in polyline 43 | let x2 = polyline[polyline.length - 1].x; 44 | let y2 = polyline[polyline.length - 1].y; 45 | 46 | // variable for storing the distance between x1,y1 and x2,y2 47 | let measure = 0; 48 | 49 | if (x1 != x2 && y1 != y2) { 50 | measure = dist(x1, y1, x2, y2); 51 | } 52 | 53 | // if distance is bigger than 20, append new PVector to resampled 54 | if (measure > 20) { 55 | 56 | // calculate angle 57 | let theta = atan2(y2 - y1, x2 - x1); 58 | 59 | // calculate x,y of new PVector in resampled 60 | let newX = x1 + 20 * cos(theta); 61 | let newY = y1 + 20 * sin(theta); 62 | 63 | resampled.push(createVector(newX, newY)); 64 | } 65 | } 66 | } 67 | 68 | // when mouse is pressed, clear lines 69 | function mousePressed() { 70 | if (polyline.length > 0) { 71 | polyline = []; 72 | } 73 | if (resampled.length > 0) { 74 | resampled = []; 75 | } 76 | } 77 | 78 | 79 | -------------------------------------------------------------------------------- /code_processing/basicDrawing/basicDrawing.pde: -------------------------------------------------------------------------------- 1 | // declare diameter 2 | int diameter = 20; 3 | 4 | 5 | void setup() { 6 | 7 | // create canvas 8 | size(1024, 768); 9 | 10 | // black background 11 | background(0, 0, 0); 12 | 13 | // by default drawing of shapes uses 14 | // black stroke, 1 px wide 15 | // white filling 16 | // noStroke() disables the drawing stroke 17 | // https://processing.org/reference/noStroke_.html 18 | noStroke(); 19 | } 20 | 21 | void draw() { 22 | } 23 | 24 | void mouseDragged() { 25 | // https://processing.org/reference/ellipse_.html 26 | ellipse(mouseX, mouseY, diameter, diameter); 27 | } 28 | -------------------------------------------------------------------------------- /code_processing/basicDrawing2/basicDrawing2.pde: -------------------------------------------------------------------------------- 1 | 2 | // declare polyline, an ArrayList made out of PVector elements 3 | ArrayList polyline = new ArrayList(); 4 | 5 | void setup() { 6 | 7 | // create canvas 8 | size(1024, 768); 9 | 10 | // white stroke 11 | stroke(255); 12 | } 13 | 14 | void draw() { 15 | 16 | // black background 17 | background(0, 0, 0); 18 | 19 | // go through every PVector element in the Arraylist polyline 20 | for (int i = 0; i < polyline.size(); i++) { 21 | // for all elements except for the last one 22 | if (i + 1 < polyline.size()) { 23 | // draw a line between current element and the next one 24 | line(polyline.get(i).x, polyline.get(i).y, polyline.get(i+1).x, polyline.get(i+1).y); 25 | } 26 | } 27 | } 28 | 29 | // while mouse is dragged, create PVector with current mouse position and add to polyline 30 | void mouseDragged() { 31 | polyline.add(new PVector(mouseX, mouseY)); 32 | } 33 | 34 | // when mouse is pressed, clear polyline 35 | void mousePressed() { 36 | while (polyline.size() > 0) { 37 | polyline.remove(0); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /code_processing/basicDrawing3/basicDrawing3.pde: -------------------------------------------------------------------------------- 1 | 2 | // declare polyline, an ArrayList made out of PVector elements 3 | ArrayList polyline = new ArrayList(); 4 | 5 | // declare resampled, an ArrayList made out of PVector elements 6 | ArrayList resampled = new ArrayList(); 7 | 8 | void setup() { 9 | 10 | // create canvas 11 | size(1024, 768); 12 | 13 | // noStroke, red fill 14 | noStroke(); 15 | fill(255, 0, 0); 16 | } 17 | 18 | void draw() { 19 | 20 | // black background 21 | background(0, 0, 0); 22 | 23 | for (int i = 0; i < resampled.size(); i++) { 24 | ellipse(resampled.get(i).x, resampled.get(i).y, 20, 20); 25 | } 26 | } 27 | 28 | // while mouse is dragged, create PVector with current mouse position and add to polyline 29 | void mouseDragged() { 30 | 31 | polyline.add(new PVector(mouseX, mouseY)); 32 | 33 | //println("polyline.size() : " + polyline.size()); 34 | //println("resampled.size() : " + resampled.size()); 35 | 36 | // if resampled is empty, add first element 37 | if (resampled.size() == 0) { 38 | resampled.add(new PVector(polyline.get(0).x, polyline.get(0).y)); 39 | } 40 | // in other case 41 | else { 42 | 43 | int resampledLast = resampled.size() - 1; 44 | 45 | // x1, y1 is newest PVector in resampled 46 | float x1 = resampled.get(resampledLast).x; 47 | float y1 = resampled.get(resampledLast).y; 48 | 49 | // x2, y2 is last PVector in polyline 50 | float x2 = polyline.get(polyline.size() - 1).x; 51 | float y2 = polyline.get(polyline.size() - 1).y; 52 | 53 | // variable for storing the distance between x1,y1 and x2,y2 54 | float measure = 0; 55 | 56 | if (x1 != x2 && y1 != y2) { 57 | measure = dist(x1, y1, x2, y2); 58 | } 59 | 60 | // if distance is bigger than 20, append new PVector to resampled 61 | if (measure > 20) { 62 | 63 | // calculate angle 64 | float theta = atan2(y2 - y1, x2 - x1); 65 | 66 | // calculate x,y of new PVector in resampled 67 | float newX = x1 + 20 * cos(theta); 68 | float newY = y1 + 20 * sin(theta); 69 | 70 | resampled.add(new PVector(newX, newY)); 71 | } 72 | } 73 | } 74 | 75 | // when mouse is pressed, clear polyline 76 | void mousePressed() { 77 | 78 | while (polyline.size() > 0) { 79 | polyline.remove(0); 80 | } 81 | 82 | while (resampled.size() > 0) { 83 | resampled.remove(0); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /notes/assets/angleLengthLine.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/angleLengthLine.gif -------------------------------------------------------------------------------- /notes/assets/basicDrawing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/basicDrawing.jpg -------------------------------------------------------------------------------- /notes/assets/basicDrawing2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/basicDrawing2.jpg -------------------------------------------------------------------------------- /notes/assets/basicDrawing3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/basicDrawing3.jpg -------------------------------------------------------------------------------- /notes/assets/cvColorTracker.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/cvColorTracker.gif -------------------------------------------------------------------------------- /notes/assets/cvContourTracker.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/cvContourTracker.gif -------------------------------------------------------------------------------- /notes/assets/cvFaceDraw.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/cvFaceDraw.gif -------------------------------------------------------------------------------- /notes/assets/drawing3d.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/drawing3d.gif -------------------------------------------------------------------------------- /notes/assets/drawingBackwards.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/drawingBackwards.gif -------------------------------------------------------------------------------- /notes/assets/drawingPlayback.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/drawingPlayback.gif -------------------------------------------------------------------------------- /notes/assets/drawingRendering.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/drawingRendering.gif -------------------------------------------------------------------------------- /notes/assets/generativeExample1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/generativeExample1.gif -------------------------------------------------------------------------------- /notes/assets/generativeExample2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/generativeExample2.gif -------------------------------------------------------------------------------- /notes/assets/generativeExample3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/generativeExample3.gif -------------------------------------------------------------------------------- /notes/assets/generativeExample4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/generativeExample4.gif -------------------------------------------------------------------------------- /notes/assets/generativeExample5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/generativeExample5.gif -------------------------------------------------------------------------------- /notes/assets/generativeExample6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/generativeExample6.gif -------------------------------------------------------------------------------- /notes/assets/mixDrawings.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/mixDrawings.gif -------------------------------------------------------------------------------- /notes/assets/node.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/node.gif -------------------------------------------------------------------------------- /notes/assets/springDrawing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ofZach/MIT_DrawingPlusPlus/535a4735a0352d45a5c419469e92268b489e9840/notes/assets/springDrawing.gif --------------------------------------------------------------------------------