Skip to content

Instantly share code, notes, and snippets.

View ofZach's full-sized avatar

ofZach

View GitHub Profile
w/ speed up or slow down:
ffmpeg -i INPUT -crf 14 -vf "scale=640:640, setpts=1.0*PTS" -c:a copy -tune grain OUTPUT
(adjust crf for compression amount and 1.0*PTS for speed up / down)
w/out speed up:
ffmpeg -i INPUT -crf 14 -filter:v scale=640:640 -c:a copy -tune grain OUTPUT
@ofZach
ofZach / calibration pattern
Created November 9, 2012 11:42
calibration pattern
// useful for projection alignment, etc:
// http://i.imgur.com/rWJLE.jpg
int nbOfCol = ofGetWidth() / 25;
int boardWidth = ofGetWidth();
int boardHeight = ofGetHeight();
@ofZach
ofZach / gist:e944f19b96f861693f1a035ddc588ef9
Created August 24, 2016 00:25
non openmp openmp like behavior
#include "ofApp.h"
#include <thread>
#include <algorithm>
#include <vector>
#include <iostream>
#include <functional>
using namespace std;
@ofZach
ofZach / gist:26f7e65fcc8018db1f4c
Created March 5, 2016 19:04
paperjs examples from SFPC workshop
//---------------------------------------------------------------------- paper script -> javascript
// Define a point to start with
var point1 = new Point(10, 20);
debugger;
// Create a second point that is 4 times the first one.
// This is the same as creating a new point with x and y
// of point1 multiplied by 4:
var point2 = point1 * 4;
@ofZach
ofZach / gist:88abc3aed0462121279913e87401b19c
Last active July 26, 2016 17:56
many lines from wall to wall
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
}
//--------------------------------------------------------------
void ofApp::update(){
#include "ofApp.h"
ofEasyCam cam;
//--------------------------------------------------------------
void ofApp::setup(){
}
var data2 = [343.578,240.626,342.566,220.307,345.036,161.03,338.079,105.569,393.994,107.748,416.197,168.413,419.841,235.297,422.212,256.19,338.079,105.569,330.11,79.5909,327.501,57.3636,338.079,105.569,287.615,119.797,281.813,183.263,259.249,253.235,260.306,272.378,376.786,240.247,372.111,371.145,426.257,374.581,421.481,399.685,310.122,241.008,301.739,374.391,312.717,492.93,296.487,521.009,343.578,240.626,342.411,220.293,344.539,161.074,337.828,105.704,394.524,107.575,417.215,167.367,422.298,233.197,425.304,253.642,337.828,105.704,330.146,79.864,327.896,57.5828,337.828,105.704,285.889,119.952,275.74,186.252,250.698,259.567,250.541,280.528,376.903,239.885,365.776,377.178,420.797,379.866,415.67,405.612,309.985,241.373,305.77,371.795,319.224,487.056,303.411,514.733,343.578,240.626,342.24,220.299,344.025,161.137,337.563,105.835,394.637,107.671,417.483,166.985,423.492,232.079,426.906,252.231,337.563,105.835,329.905,80.0992,327.909,57.7585,337.563,105.835,284.891,119.763,271.838,187.734,244.93,262.94,243.623,285.
#include "ofApp.h"
vector < vector < float > > energies;
//--------------------------------------------------------------
void ofApp::setup(){
// ofApp.h :
#pragma once
#include "ofMain.h"
class line {
@ofZach
ofZach / gist:8242765
Created January 3, 2014 17:53
billboard using ofNode / ofCamera
//--------------------------------------------------------------
void testApp::draw(){
glEnable(GL_DEPTH_TEST);
ofEnableLighting();
ofLight light;
light.setPosition(ofPoint(-200,0, -1000));
light.lookAt( ofPoint(-1000,0,0));
light.setDirectional();