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
| #!/usr/bin/env python | |
| import sys | |
| import os | |
| import re | |
| # Create map of localfiles | |
| local_files = [] | |
| for dirname, dirnames, filenames in os.walk('.'): |
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
| //-------------------------------------------------------------- | |
| void testApp::setup(){ | |
| ftp.setup("ftp.example.com", "username", "password", "HTML/"); // HTML/ <-- must end with slash. | |
| } | |
| //-------------------------------------------------------------- | |
| void testApp::update(){ | |
| ofSetWindowTitle(ofToString(ofGetFrameRate())); | |
| ftp.update(); | |
| } |
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
| #include "rxParticle.h" | |
| rxParticle::rxParticle(ofVec3f pos, float mass) | |
| :position(pos) | |
| ,mass(mass) | |
| ,velocity(0) | |
| ,forces(0) | |
| ,age(0) | |
| ,lifetime(10) | |
| { |
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
| Just work in progress :) |
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
| void Tubes::computeEdgeCoordinateSystems() { | |
| Vec3 dir; | |
| float inv = 0.0f; | |
| vector<Edge*>::iterator it = graph.edges.begin(); | |
| while(it != graph.edges.end()) { | |
| Edge* e = (*it); | |
| dir = graph.getEdgeDirection(e).normalize(); | |
| e->z_axis = dir; | |
| if(fabsf(dir.x) > fabsf(dir.y)) { | |
| inv = 1.0f / sqrtf(dir.x*dir.x + dir.z*dir.z); |
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
| // Generate spiral | |
| int prev_vertex = gr.addVertex(Vec3(0,0,0)); | |
| int prev_node = gr.addNode(new Node(prev_vertex)); | |
| int num_edges = 30; | |
| float angle = 0; | |
| float radius = 2.0f; | |
| float y = 0; | |
| for(int i = 0; i < num_edges; ++i) { | |
| angle += ((float)TWO_PI/(num_edges*0.25)); | |
| float x = cos(angle) * 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
| tmp |
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
| // source: http://stackoverflow.com/questions/10105229/c-c-puzzle-to-print-values-from-1-15-15-1-with-a-single-for-loop | |
| for (int i = 1; i < 31; i++) { | |
| int number = (1-i/16) * i + (i/16) * (31 - i); | |
| printf("%d ", number); | |
| } |
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
| #include "testApp.h" | |
| //-------------------------------------------------------------- | |
| void testApp::setup(){ | |
| ofSetFrameRate(60); | |
| ofSetVerticalSync(true); | |
| ofBackground(22,33,44); | |
| nay = new roxlu::IncrementalDelaunay2D(0,0,ofGetWidth(), ofGetHeight()); | |
| for(int i = 0; i < 400; ++i) { |
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
| #ifndef ROXLU_ERRORH | |
| #define ROXLU_ERRORH | |
| #define DEBUG | |
| #ifdef DEBUG | |
| #include <stdlib.h> | |
| #include <assert.h> | |
| #define eglGetError( )\ | |
| {\ |