Skip to content

Instantly share code, notes, and snippets.

View timturnidge's full-sized avatar

Tim Turnidge timturnidge

  • Wellington, New Zealand
View GitHub Profile
@timturnidge
timturnidge / Caitlin Cole final code
Last active October 25, 2019 00:25 — forked from caitlinelise/Caitlin Cole final code
Colour keyboard final
import processing.pdf.*;
int maxHeight = 30;
int minHeight = 20;
int letterHeight = maxHeight; // Height of the letters
int letterWidth = 30; // Width of the letter
int x = -letterWidth; // X position of the letters
int y = 0; // Y position of the letters
void setup() {
size(500, 500);
}
void draw() {
background(255);
stroke(0);
strokeWeight(5);
line(125, 300, 375, 320);
void setup() {
size(500, 500);
}
void draw() {
background(255);
noStroke();
fill(0);
ellipse(160, 170, 100, 100);
ellipse(340, 170, 100, 100);
void setup() {
size(500, 500);
background(255);
noStroke();
fill(255, 0, 0);
ellipse(125, 250, 200, 200);
fill(0, 255, 0);
@timturnidge
timturnidge / processing_basic.pde
Created January 29, 2019 21:40
Basic setup for Processing
void setup(){
size(100,100);
}
void draw(){
}
@timturnidge
timturnidge / energy_csv.pde
Last active September 19, 2018 03:13
Reading .csv in Processing
// power data from https://docs.google.com/spreadsheets/d/1OJRMHsO8UV397Bh1dv2ADx8TBEV7WKa_D-TKlPJidTs/edit#gid=0
Table data;
void setup() {
size(400, 300);
data = loadTable("data/energy.csv", "header");
println(data.getRow(0).getFloat(2));
}