Skip to content

Instantly share code, notes, and snippets.

View companje's full-sized avatar

Rick Companje companje

View GitHub Profile
#include "testApp.h"
//--------------------------------------------------------------
void testApp::setup(){
ofSetFrameRate(60); //limit framerate to 60
ofSetBackgroundAuto(false); //turn off automatic background clearing
ofEnableAlphaBlending(); //enable transparency
ofBackground(0); //set background to black
ball.x = 100; //initial position for ball
//////////// testApp.h
#pragma once
#include "ofMain.h"
class Ball {
public:
ofPoint pos; //it's better to use ofVec3f instead of ofPoint
ofPoint vel;
#pragma once
#include "ofMain.h"
#define NUM 100
class Ball {
public:
ofPoint pos; //it's better to use ofVec3f instead of ofPoint
ofPoint vel;
///////////////////////////////////////////////
#pragma once
#include "ofMain.h"
class testApp : public ofBaseApp{
public:
void setup();
void update();
/*
* fingerDetector.cpp
* openFrameworks
*
* Created by Dani Quilez on 3/30/09.
* Copyright 2009 Mechanics_of_destruction. All rights reserved.
*
*/
#include "fingerDetector.h"
String lines[];
String invoer = "";
void setup() {
size(500,500);
strokeWeight(2);
lines = loadStrings("netnummers.txt");
}
void draw() {
@companje
companje / gist:1621018
Created January 16, 2012 14:05
voor marijn
PImage img;
color rood = color(255,0,0);
color blauw = color(0,0,255);
void setup() {
size(500, 500);
img = new PImage(100,100);
background(255);
}
@companje
companje / gist:1656945
Created January 22, 2012 12:40
batchfile
@echo off
cd /d %0\..
SetLocal EnableDelayedExpansion
set menucount=0
call :MenuAdd Run "Run Globe4D"
call :MenuAdd PresentMode "Reboot to Globe4D Present Mode"
call :MenuAdd WindowsMode "Reboot to Windows"
call :MenuAdd IniSettings "Edit Globe4D settings file"
call :MenuAdd UserAccountControl "User Account Control Settings"
//hulp bij vraag 23
for (int i=0; i<4; i++) {
ofSetColor(255,0,0); //vertices = rood
ofCircle(v[i],6);
ofSetColor(255,255,0); //texcoords = geel
ofCircle(t[i],3);
}
@companje
companje / testApp.cpp
Created May 21, 2012 17:57
Cube to Sphere Deformation
#include "testApp.h"
#define foreach(t,v) for(typeof(v.begin()) p=v.begin(); p!=v.end(); p++) { typeof(*p) &t=*p;
#define endfor }
class Vertex : public ofVec3f {
public:
Vertex(float x, float y) : ofVec3f(x,y) {}
Vertex(ofVec3f v) { set(v); }
ofFloatColor color;