This file contains 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 heleCirkel = TWO_PI; //tau | |
void setup() { | |
size(500,500); | |
background(0); | |
smooth(); | |
} | |
void draw() { | |
background(0); |
This file contains 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
// Interactive Mandelbrot Set | |
// Inspired by Daniel Shiffman's Processing example. | |
// by Rick Companje - www.companje.nl - 6 december 2009 | |
double xmin = -2.5; | |
double ymin = -2; | |
double wh = 4; | |
double downX, downY, startX, startY, startWH; | |
int maxiterations = 200; | |
boolean shift=false; |
This file contains 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
////////////////////////////////////////////////////////////// | |
// testApp.h | |
////////////////////////////////////////////////////////////// | |
#pragma once | |
#include "ofMain.h" | |
class testApp : public ofBaseApp { | |
public: |
This file contains 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(){ | |
w = ofGetWidth(); | |
h = ofGetHeight(); | |
cam.initGrabber(w,h,true); | |
pdf = new ofxCairo(); | |
saving = false; |
This file contains 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
testApp.cpp | |
#include "testApp.h" | |
//-------------------------------------------------------------- | |
void testApp::setup(){ | |
w = ofGetWidth(); | |
h = ofGetHeight(); | |
cam.initGrabber(w,h,true); |
This file contains 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() { | |
ofBackground(0); | |
ofSetFrameRate(30); | |
glEnable(GL_DEPTH_TEST); | |
steps = 120; | |
step = TWO_PI/steps; |
This file contains 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 phi = (sqrt(5)+1)/2; | |
size(323,200); | |
translate(height/phi,0); | |
scale(height); | |
noStroke(); | |
smooth(); | |
for (float i=0; i<10; i++) { | |
fill(i/10*255); |
This file contains 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
import processing.video.*; | |
PImage bg; | |
Movie mov; | |
final int w=255; | |
void setup() { | |
size(w,w); | |
frameRate(30); | |
bg = loadImage("earth1024.jpg"); |
This file contains 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*> getAllPointsFromPath() { | |
vector<ofPoint*> points; | |
vector<ofSubPath> &subpaths = path.getSubPaths(); | |
for (int i=0; i<subpaths.size(); i++) { | |
vector<ofSubPath::Command> &commands = subpaths[i].getCommands(); | |
for (int j=0; j<commands.size(); j++) { | |
points.push_back(&commands[j].to); | |
} | |
} |
This file contains 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
//by Rick Companje, 8 june 2012 | |
String lines[]; | |
float scale=.003; | |
void setup() { | |
size(900,600); | |
mouseX = 0; | |
smooth(); | |
lines = loadStrings("freest.lgc"); |