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);
}
View sketch_160202b
/**
* Simple Swarmer
*
*/
int numAttractors = 256;
int numMasses = 4096;
Attractor[] a = new Attractor[numAttractors];
View simpleswarmer2.pde
/**
* Simple Swarmer 2
*
*/
int numAttractors = 256;
int numMasses = 8192*2;
float maxSpeed = 4.0f;
float maxAccel = 1.0f;
@camb416
camb416 / processing_ide.md
Last active Feb 17, 2016
Instructions on how to create a new processing project in IntelliJ IDEA Community 15
View processing_ide.md

Processing 3.0 in IntelliJ IDEA 15

  • Create new project
  • Java
  • Next
  • Next
  • Finish
  • File > Project Structure
  • Libraries > +
  • /Applications/Processing.app/Contents/Java/core.jar
  • OK
You can’t perform that action at this time.