Skip to content

Instantly share code, notes, and snippets.

Cameron Browning camb416

Block or report user

Report or block camb416

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@camb416
camb416 / mog.sh
Created Apr 7, 2015
create a slitscan image of 36 seconds of 1080 video
View mog.sh
#!/bin/bash
# http://cameronbrowning.com/content/creating-slit-scan-images-from-quicktime-movies-with-ffmpeg-on-mac-os-x/
# loop through 1080 images
for i in `seq 1 1080`;
do
# subtract 1 from the counter for the y offset
mycmd=$(printf "mogrify -crop 1920x1+0+%d image-%04d.jpg\n" `expr "$i" - "1"` $i)
# output the command that's about to be executed
# so you can see progress
echo $mycmd
@camb416
camb416 / maketriangles.sh
Created Jun 12, 2015
make triangles for hexoscope
View maketriangles.sh
#!/bin/bash
mkdir frames
ffmpeg -i $1 -f image2 frames/image-%4d.png
convert -size 1280x720 xc:black \
-fill white \
-stroke none \
-draw "path 'M 640 0 L 224 720 L 1055 720 z' " \
mask.gif
# rotate it (optional)
View generatePoster.sh
#!/bin/bash
# all new
if [[ $# -eq 0 ]] ; then
echo 'you need to supply an image file'
exit 0
fi
echo "cropping to triangle..."
@camb416
camb416 / turtle2.pde
Created Oct 23, 2015
Turtle drawing program with branches
View turtle2.pde
class Point{
float x,y;
Point(float _x, float _y){
x = _x;
y = _y;
}
};
class Turtle{
Point p;
View Ribbons_v1.pde
float x;
float y;
float z;
float outsideRadius = 150;
float insideRadius = 100;
class Point{
float x,y,z;
Point(float _x, float _y, float _z){
x = _x;
View copyToFolder.sh
#!/bin/bash
cp 3d/3DPrimitivesExample.png /Users/cbrowning/Documents/Development/of_v0.9.0_osx_release/examples/3d/3DPrimitivesExample/screenshot.png
cp 3d/advanced3dExample.png /Users/cbrowning/Documents/Development/of_v0.9.0_osx_release/examples/3d/advanced3dExample/screenshot.png
cp 3d/cameraLensOffsetExample.png /Users/cbrowning/Documents/Development/of_v0.9.0_osx_release/examples/3d/cameraLensOffsetExample/screenshot.png
cp 3d/cameraParentingExample.png /Users/cbrowning/Documents/Development/of_v0.9.0_osx_release/examples/3d/cameraParentingExample/screenshot.png
cp 3d/cameraRibbonExample.png /Users/cbrowning/Documents/Development/of_v0.9.0_osx_release/examples/3d/cameraRibbonExample/screenshot.png
cp 3d/easyCamExample.png /Users/cbrowning/Documents/Development/of_v0.9.0_osx_release/examples/3d/easyCamExample/screenshot.png
cp 3d/meshFromCamera.png /Users/cbrowning/Documents/Development/of_v0.9.0_osx_release/examples/3d/meshFromCamera/screenshot.png
cp 3d/modelNoiseExample.png /Users/cbrowning/Documents/D
View simplePointPattern.pde
int mod;
void setup(){
mod = 1;
size(600,600);
}
@camb416
camb416 / traffic-cameras.json
Last active Jun 23, 2016 — forked from kuanb/traffic-cameras.json
All traffic camera locations in NYC
View traffic-cameras.json
[{
"lat": "40.79142677512476",
"lng": "-73.93807411193848",
"name": "1 Ave @ 110 St",
"camera": "http://207.251.86.238/cctv261.jpg"
}, {
"lat": "40.800426144169315",
"lng": "-73.93155097961426",
"name": "1 Ave @ 124 St",
"camera": "http://207.251.86.238/cctv254.jpg"
@camb416
camb416 / grabAllTheCameras.sh
Created Jan 29, 2016
Grab all the NYC DOT Traffic camera images and make a contact sheet with imagemagick
View grabAllTheCameras.sh
#!/bin/bash
wget http://207.251.86.238/cctv261.jpg
wget http://207.251.86.238/cctv254.jpg
wget http://207.251.86.238/cctv490.jpg
wget http://207.251.86.238/cctv263.jpg
wget http://207.251.86.238/cctv644.jpg
wget http://207.251.86.238/cctv696.jpg
wget http://207.251.86.238/cctv722.jpg
wget http://207.251.86.238/cctv200.jpg
wget http://207.251.86.238/cctv31.jpg
View sketch_160202b
/**
* Simple Swarmer
*
*/
int numAttractors = 256;
int numMasses = 4096;
Attractor[] a = new Attractor[numAttractors];
You can’t perform that action at this time.