Example List
ITP Resident Examples
A repository of useful code created by ITP Resident Researchers.
Serial Communication
Send multiple values over serial from Processing to Arduino
https://gist.github.com/1349176
Processing Text Tricks
Keeping track of pressed keys (chars) in an ArrayList of Strings
https://gist.github.com/2438543
Basic Processing Graphics
Controlling the center of rotation in Processing
https://gist.github.com/1516424
Masking an image with a gradient.
https://gist.github.com/1443333
Generating a gradient using an OpenGL texture
https://gist.github.com/1443458
Gettng the red, green, or blue color channels from a PImage
https://gist.github.com/3631038
Triangulating a position using pixel colors
https://gist.github.com/1524544
Determining the position of a point based on signal strength from 4-detectors with vectors
https://gist.github.com/1525553
Crazy Ruby
Automatically print new files that are added to a folde
https://gist.github.com/2159588
Ruby String Tricks
Loop over the characters of a string with a for-in style loop.
https://gist.github.com/1324549
Ruby Web Scraping
Extract all the headlines on nytimes.com using Nokogiri
https://gist.github.com/1396326
Get the text of product reviews on Amazon
https://gist.github.com/1781386
Sinatra S3
Upload Image to S3 via Sinatra and save in Datamapper
https://github.com/runemadsen/Sinatra-DataMapper-S3-Example
Sinatra Email
Send email from your Sinatra app on Heroku
https://github.com/atduskgreg/SHED-P
Sinatra Deployment
Deploy your sinatra app from ITP to Heroku
https://gist.github.com/1420122
Sinatra Security
Storing an encrypted password and using it for basic auth
https://gist.github.com/1444042
Processing Video Examples
scrubbing a video file based on mouse movement
https://gist.github.com/1328972
Accessing FaceTracker OSC messages and camera image in Processing
https://gist.github.com/3929016
Processing 3D examples
Display a 3D model from an OBJ file
https://gist.github.com/1368084
3D with inner rotation
https://gist.github.com/1368012
Basic 3D rectangle
https://gist.github.com/1367940
Processing Sound Examples
Applying a band pass filter to an mp3 using minim
https://gist.github.com/1409809
Processing PGraphics Examples
Example of a function for creating PGraphics from text so you can manipulate its pixels
string_into_pgraphics.pde
Converting a string into a PGraphics so you can manipulate it as an image.
pgraphics_from_text.pde
OpenFrameworks Pixel Distances
Find the distance from a point to a line, use that to find the strip of pixels at the border of a polygon. Based on Paul Bourke's method for finding the distance from a point to a line.
https://gist.github.com/1325002[polygon_distance_bourke.pde]
Arduino
Using Parallax Memsic2125 Dual Axis Accelerometer to using Y Axis to control a servo with smoothening
https://gist.github.com/1334479[Parallax Accelerometer Servo]
Basic Shiftbrite
https://gist.github.com/2137239