Skip to content

Instantly share code, notes, and snippets.

View camb416's full-sized avatar

Cameron Browning camb416

View GitHub Profile
#!/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
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;
@camb416
camb416 / turtle2.pde
Created October 23, 2015 21:39
Turtle drawing program with branches
class Point{
float x,y;
Point(float _x, float _y){
x = _x;
y = _y;
}
};
class Turtle{
Point p;
#!/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 / maketriangles.sh
Created June 12, 2015 21:47
make triangles for hexoscope
#!/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)
@camb416
camb416 / mog.sh
Created April 7, 2015 18:04
create a slitscan image of 36 seconds of 1080 video
#!/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