Skip to content

Instantly share code, notes, and snippets.

View camb416's full-sized avatar

Cameron Browning camb416

View GitHub Profile
/**
* 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 February 17, 2016 21:42
Instructions on how to create a new processing project in IntelliJ IDEA Community 15

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
@camb416
camb416 / sliceProgressively.sh
Created February 19, 2016 17:38
One week series. Slicing images from top to bottom over time.
#!/bin/bash
# One week series. Slicing images from top to bottom over time.
# http://cameronbrowning.com/content/one-week-series/
# Originally adapted from earlier work at:
# http://cameronbrowning.com/content/creating-slit-scan-images-from-quicktime-movies-with-ffmpeg-on-mac-os-x/
# Step 1: loop through 10,078 images
for i in `seq -f "%05g" 1 10078`;
do
# subtract 1 from the counter for the y offset
@camb416
camb416 / renamer.sh
Created February 19, 2016 17:41
rename all of the JPG images in this folder to sequence numbers.
#!/bin/bash
# rename all of the JPG images in this folder to sequence numbers.
a=1
for i in *.jpg; do
new=$(printf "%05d.jpg" "$a") #04 pad to length of 5 digits
mv -- "$i" "$new"
let a=a+1
done
import processing.core.PApplet;
import processing.core.PGraphics;
/**
* Created by cbrowning on 2/17/16.
*/
public class ProcessingExample extends PApplet{
PGraphics tile;
int tileWidth;
import processing.core.PApplet;
import processing.core.PGraphics;
/**
* Created by cbrowning on 2/17/16.
*/
//public class ProcessingExample extends PApplet{
PGraphics tile;
int tileWidth;
@camb416
camb416 / circles3.pde
Created February 28, 2016 21:00
Eased motion on tiled stage
import processing.core.PApplet;
import processing.core.PGraphics;
/**
* Created by cbrowning on 2/28/16.
*/
PGraphics tile;
int tileWidth;
int tileHeight;
@camb416
camb416 / interactiveBezier.pde
Last active June 19, 2016 15:57
Interactive Draggable Bezier Path in Processing
Bezier b;
ArrayList<DraggablePoint> pts;
boolean isDragging;
int dragID;
float slope;
float t;
void setup(){
color[] colors = {#395273,
#405B73,
#F2EDA0,
#D9A171,
#40211E,
#40211E};
color[] colors = { #395273,
#395273,
#F2EDA0,
#D9A171,
#395273,
#395273,
#40211E,
#395273,
#40211E,