Skip to content

Instantly share code, notes, and snippets.

View lizkhoo's full-sized avatar

Liz Khoo lizkhoo

View GitHub Profile
@lizkhoo
lizkhoo / First Processing Drawing
Created September 12, 2012 20:39
Miley Cyrus' New Haircut
/*Liz Khoo - ICM - First Face Drawing*/
float x=0;
float y=0;
void setup(){
size(500,400);
colorMode(HSB,370,110,110); //Default ranges for HSB
background(302,22,90);
smooth();
@lizkhoo
lizkhoo / gist:3724241
Created September 14, 2012 19:42
Play with Miley's Hair
/*Liz Khoo - ICM - Revised Face Drawing*/
float bangsX=120;
float bangsY=200;
float haircolorH=53;
float haircolorS=29;
float haircolorB=99;
float x=0;
float y=0;
@lizkhoo
lizkhoo / gist:3751504
Created September 19, 2012 18:57
Chinese New Year's Dragon
float pearlposX = 300;
float pearlposY = 150;
float headposX;
float headposY;
float speedX;
float pearlFillR;
float pearlFillG;
float pearlFillB;
void setup() {
@lizkhoo
lizkhoo / Grass
Created September 26, 2012 12:33
Grass
int ax = -20;
int ay = -20;
int bx = 0;
int by = 0;
int cx = -10;
int cy = 60;
int dx = 0;
int dy = 60;
void setup(){
@lizkhoo
lizkhoo / Triangle Swimming
Created September 26, 2012 12:38
Triangle Swimming
float x1=0, speedx1 = 1;
float y1=0, speedy1 = 1;
float x2=100, speedx2 = 1;
float y2=100, speedy2 = 1;
float x3=0, speedx3 = 1;
float y3=200, speedy3 = 1;
float r=random(8,19);
float g=random(50,255);
float b=random(50,255);
@lizkhoo
lizkhoo / Waves
Created September 26, 2012 12:49
Waves
int ax = 100;
int ay = 20;
int bx = 50;
int by = 20;
int cx = 50;
int cy = 50;
int dx = 0;
int dy = 90;
int ex = 100;
@lizkhoo
lizkhoo / duckiehunt_01
Created October 4, 2012 19:55
duckiehunt_01
PFont PTSans;
color water = color(47, 108, 180);
PImage duck1, duck2, duck3;
float duck1x, duck2x, duck3x;
float duck1y, duck2y, duck3y;
float dspeed1, dspeed2, dspeed3;
boolean duckDraw1 = true, duckDraw2 = true, duckDraw3 = true; // decides whether to draw the duck
boolean duckHit1 = false, duckHit2 = false, duckHit3 = false; // tells me if the duck has been hit
@lizkhoo
lizkhoo / buttermybread
Created October 8, 2012 22:32
butter my bread
//butter machine for Arduino
#include <Servo.h> //add servo motor library
const int photoPin = A0; //input pin for photosensor
const int ledPin = 9;
int photoMin = 1023;
int photoMax = 0;
int photoValue = 1023;
@lizkhoo
lizkhoo / duckiehunt_02
Created October 12, 2012 17:23
Cleaned up version of Duckie Hunt game
Duck[] myDuck = new Duck[3];
Shotgun theGun;
Bullet theBullet;
PImage rubberduck;
color water = color(47, 108, 180);
PFont PTSans;
boolean gameOver = false;
void setup() {
@lizkhoo
lizkhoo / Diamonds02
Created October 24, 2012 03:17
Diamonds02 with video
//crystal raindrops with video
import processing.video.*;
Capture video;
int totalDiamonds = 10;
Diamond[] ourDiamonds = new Diamond[totalDiamonds];
void setup() {