This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vector<ofPoint> vertices; | |
| vector<ofColor> colors; | |
| int nTri; //The number of triangles | |
| int nVert; //The number of the vertices equals nTri * 3 | |
| void setup() { | |
| nTri = 1500; //The number of the triangles | |
| nVert= nTri * 3; //The number of the vertices | |
| float Rad = 150; //The sphere's radius |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // use this way of definining size to establish your array globally | |
| #define NUM_IMAGES 4 | |
| // create an array of images | |
| ofImage question[NUM_IMAGES]; | |
| int imgCounter; | |
| int imgAlteration; | |
| void setup() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // use this way of definining size to establish your array globally | |
| #define NUM_IMAGES 50 | |
| // create an array of images | |
| ofImage question[NUM_IMAGES]; | |
| void setup() { | |
| // put your setup code here, to run once: | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| float nSamples; | |
| void setup() { | |
| nSamples = 10000; | |
| // put your setup code here, to run once: | |
| ofSetWindowShape(1000,1000); | |
| ofBackground(120,120,120); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // this is the basic particle class | |
| class Particle{ | |
| public: | |
| ofVec2f location; | |
| ofVec2f vel; | |
| float color; | |
| int dim; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ofMesh mesh; // declare mesh | |
| ofEasyCam cam; // use a camera for 3D | |
| void setup() { | |
| ofEnableAlphaBlending(); | |
| ofSetWindowShape(600,400); | |
| // set up a few verticies for the mesh | |
| ofVec3f top(100.0, 50.0, 0.0); | |
| ofVec3f left(50.0, 150.0, 0.0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ofEasyCam cam; | |
| int width, height; | |
| int offset; | |
| bool oneShot; | |
| int numPoints; | |
| // establish arrays to store values | |
| int r[50], g[50], b[50]; | |
| float moverX[50]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // this is the basic particle class | |
| class Particle{ | |
| public: | |
| ofVec2f location; | |
| Particle(){ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ofEasyCam cam; | |
| void setup() { | |
| ofSetWindowShape(1000,1000); | |
| ofBackground(120,120,120); | |
| ofEnableDepthTest(); | |
| cam.setDistance(100); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Matter{ | |
| public: | |
| ofVec2f location; | |
| ofVec2f velocity; | |
| ofVec2f acceleration; | |
| ofVec2f mouse; | |
| ofVec3f color; | |
| float topSpeed; |