Skip to content

Instantly share code, notes, and snippets.

View bakercp's full-sized avatar

Christopher Baker bakercp

View GitHub Profile
@bakercp
bakercp / Clock.pde
Created September 12, 2014 22:23
BlendBounceClock
color[] colors = new color[4];
PVector[] vertices = new PVector[4];
int colorIndexOffset = 0;
long lastTime = 0;
void setup()
@bakercp
bakercp / DelaunayExample
Created December 9, 2014 01:04
ofSketch ofxDelaunay Example
/// 1. Download the zip file here: https://github.com/obviousjim/ofxDelaunay
/// 2. Extract it into your data/openFrameworks/addons folder of ofSketch.
/// 3. Make sure that the folder is called ofxDelaunay, not ofxDelaunay-master or something.
/// 4. Open ofSketch and paste the following code into a new sketch.
/// 5. Using the "Addons" button (+ in a circle next to the paperclip), scroll down and make sure ofxDelaunay is checked.
/// 6. Run!
#include "ofxDelaunay.h"
ofxDelaunay triangulation;
@bakercp
bakercp / HelloGist.sketch
Created December 16, 2014 23:25
HelloGist
void setup() {
}
void draw() {
ofDrawBitmapStringHighlight("Hello Gist!", 105, 120, ofColor::white, ofColor::black);
}
@bakercp
bakercp / Ball.sketch
Created December 17, 2014 03:40
HelloWorld ofSketch Gist.
class Ball{
public:
ofVec2f position;
ofVec2f velocity;
int radius;
ofColor color;
@bakercp
bakercp / config.osx.default.mk
Last active September 21, 2015 00:41
Xcode 7 fix for ofSketch
##########################################################################################
# CONFIGURE CORE PLATFORM MAKEFILE
# This file is where we make platform and architecture specific configurations.
# This file can be specified for a generic architecture or can be defined as variants.
# For instance, normally this file will be located in a platform specific subpath such
# as $(OF_ROOT)/libs/openFrameworksComplied/linux64.
#
# This file will then be a generic platform file like:
#
@bakercp
bakercp / PlaySounds.sketch
Last active September 21, 2015 04:53
Sound Example
ofSoundPlayer dubstep; // From bensound.com
ofSoundPlayer ping; // From bensound.com
ofSoundPlayer pong; // From freesound.org.
ofSoundPlayer laser; // From freesound.org
void setup() {
dubstep.loadSound("bensound-dubstep.mp3");
dubstep.setVolume(0.75f);
dubstep.play();
@bakercp
bakercp / VideoBuffer.sketch
Last active November 20, 2015 20:03
VideoBuffer
ofVideoGrabber grabber;
ofPixels filteredPixels;
ofTexture filteredTexture;
std::vector<ofTexture> buffer;
int numFramesInBuffer;
ofEasyCam cam;
@bakercp
bakercp / Logger.pde
Created October 20, 2016 14:03
A simple CSV data logger for Processing.
import processing.serial.*;
import java.text.SimpleDateFormat;
import java.util.Date;
Serial myPort;
int lineFeedChar = 10;
String lastRow = "";
int currentY = 0;
@bakercp
bakercp / readme.md
Created November 8, 2016 16:13 — forked from max-mapper/readme.md
Video stabilization using VidStab and FFMPEG (Mac OS X)

Video stabilization using VidStab and FFMPEG

Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.

Here's an example video I made

Install ffmpeg with the vidstab plugin from homebrew

brew install ffmpeg --with-libvidstab
@bakercp
bakercp / ConvexHull.cpp
Last active June 6, 2019 09:26
An openFrameworks convex hull / defect index finder using opencv (because there is a bug in the opencv version). bug https://github.com/opencv/opencv/issues/4954
//
// Copyright (c) 2017 Christopher Baker <https://christopherbaker.net>
//
// SPDX-License-Identifier: MIT
//
#include "ConvexHull.h"