Skip to content

Instantly share code, notes, and snippets.

@bdaver
bdaver / ArrayColorRandom.pde
Last active December 14, 2015 04:39
VCD 293 Design by Code Week 3 Workshop Example Arrays, Colors, Random
// VCD 293 Design by Code
// Week 3 Workshop Example
// Arrays, Colors, Random
// Made with processing
color[] colors = { #28251E, #49B4A2, #8FD783, #CEEF24, #E9DEC0 };
void setup() {
size(600,600);
background(255);
@bdaver
bdaver / LeapMotionTest.pde
Last active December 15, 2015 00:48
Leap Motion Processing Library Exercise on some basic Events and Finger Handling (https://github.com/mrzl/LeapMotionP5) Dirty-straightforward.
import com.onformative.leap.LeapMotionP5;
import com.leapmotion.leap.Finger;
import com.leapmotion.leap.Frame;
LeapMotionP5 leap;
void setup() {
size(500, 500);
leap = new LeapMotionP5(this);
frameRate(100);
@bdaver
bdaver / morph.pde
Last active December 15, 2015 09:19
VCD 293 Design by Code Week 7 Chalange Morph generator using source and modifier images
PImage sourceImg;
PImage modifierImg;
PImage resultImg;
void setup() {
size(500,500);
noLoop(); // disables draw function
sourceImg = loadImage("bruce.png");
modifierImg = loadImage("modifier2.png"); // need to supply gradient image containing red and green channel values
resultImg = createImage(width,height,RGB);
background(0);
@bdaver
bdaver / simplespectrumanalyze.pde
Created April 15, 2013 11:26
Cleaned up version of minim spectrum analyze example using averages
import ddf.minim.analysis.*;
import ddf.minim.*;
Minim minim;
AudioPlayer jingle;
FFT fftLin;
float height3;
float height23;
@bdaver
bdaver / clientexample.pde
Created May 20, 2013 13:49
VCD 293 Week 12 Workshop : Networking in processing - Send shape and color to the server
import processing.net.*;
Client cli;
String incoming;
int startX;
int startY;
int endX;
int endY;
color myColor = #ffcc00;
@bdaver
bdaver / drawingApp.pde
Created April 3, 2015 13:11
Mouse and Keyboard Interaction Workshop : Drawing application. Click to draw, rightclick to erase, press 1-5 to select color, use shift key to draw constrained lines, space to clear screen
boolean ciz = false;
boolean sil = false;
color[] palet = {#ffffff, #ffcc00, #00ffcc, #ff00cc, #cccccc};
boolean yapistir = false;
color seciliRenk = #ffffff;
float hiz = 0;
boolean yatay;
int curX, curY;
boolean yapistimi = false;
@bdaver
bdaver / formula.csv
Created April 17, 2015 12:40
Example Data for Data Visualization Workshopt : Formula
1 Felipe Massa Ferrari 58 28:51.0 1 218.067 2
2 Fernando Alonso Renault 58 +5.5 secs 3 217.766 2
3 Michael Schumacher Ferrari 58 +5.6 secs 2 218.36 2
4 Jenson Button Honda 58 +12.3 secs 6 217.202 2
5 Pedro de la Rosa McLaren-Mercedes 58 +45.9 secs 11 216.018 1
6 Giancarlo Fisichella Renault 58 +46.5 secs 4 217.026 2
7 Ralf Schumacher Toyota 58 +59.3 secs 15 215.715 2
8 Rubens Barrichello Honda 58 +60.0 secs 13 216.568 2
9 Jarno Trulli Toyota 57 +1 Lap 12 213.406 2
10 Mark Webber Williams-Cosworth 57 +1 Lap 9 213.311 2
@bdaver
bdaver / array_color_random
Created February 26, 2016 09:09
Array Color and Random Example
color[] palette = {#FE4365, #FC9D9A, #F9CDAD, #C8C8A9, #83AF9B};
void setup() {
size(800,600); //sets the size of the stage
background(0);
noStroke();
frameRate(15);
}
void draw() {
@bdaver
bdaver / formulaexample.pde
Last active March 18, 2016 14:13
Handling CSV data
PFont din;
void setup() {
size(800,600);
background(0);
din = loadFont("dinbold.vlw");
loadCSV();
visualize();
}
@bdaver
bdaver / assignment2template.pde
Created March 18, 2016 10:41
Assignment 2 Template
//define what you are going to import to stage
PImage image1;
PShape shape1;
PFont font1;
void setup() {
size(800,1000) ; // size of your poster
image1 = loadImage("filename.jpg"); // name of your file
shape1 = loadShape("filename.svg");