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
ofPolyline temp; | |
float ff = ofGetElapsedTimef(); | |
for (int i = 0; i < 100; i++){ | |
float angle = ofMap(i, 0, 100, 0, TWO_PI); | |
ofPoint pt= ofPoint(400,400); | |
float radius = 200 + ofSignedNoise(ff*0.1, cos(angle)*0.3, sin(angle)*0.3) * 100; | |
pt += radius * ofPoint(cos(angle), sin(angle)); | |
temp.addVertex(pt); | |
} | |
temp.setClosed(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 "ofApp.h" | |
// Note: | |
// You need ofxGui | |
// You can download the texture here: https://www.dropbox.com/s/15lw3lh87yp11za/tex-bigger.jpg?dl=1 | |
ofPolyline resampled; | |
ofPolyline points; | |
ofParameter<float> resampleLength; | |
ofParameter<bool> bDrawWireframe; |
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
// | |
// ofxiOSImageSaver.h | |
// Colorizer | |
// | |
// Created by Brett Renfer on 9/9/14. | |
// | |
#pragma once | |
#include "ofMain.h" |
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 "ofApp.h" | |
void ofApp::setup(){ | |
source.loadImage("source.jpg"); | |
source.resize(CANVAS_WIDTH, CANVAS_HEIGHT); | |
canvas.allocate(CANVAS_WIDTH, CANVAS_HEIGHT, GL_RGBA); | |
canvas.begin(); | |
ofBackground(0, 0, 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
- (BOOL)atomicCopyItemAtURL:(NSURL *)sourceURL | |
toURL:(NSURL *)destinationURL | |
error:(NSError **)outError | |
{ | |
NSFileManager *manager = [NSFileManager defaultManager]; | |
// First copy into a temporary location where failure doesn't matter | |
NSURL *tempDir = [manager URLForDirectory:NSItemReplacementDirectory | |
inDomain:NSUserDomainMask | |
appropriateForURL:destinationURL |
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 "RainbowArc.h" | |
RainbowArc::RainbowArc(VerticesPT& vertices) | |
:radius(100) | |
,width(5) | |
,fg_start_dx(0) | |
,fg_num_vertices(0) | |
,bg_start_dx(0) | |
,bg_num_vertices(0) | |
,vertices(vertices) |