Code

//press 'i' to show the image it's grabbing the colors from
//press 'x' to clear
//i know it's cheesy... but i was rushed and feeling festive
//you can make something vaguely sculptural with the piles i guess...
//like madame trashheap from fragile rock...

BImage turkey;
boolean showturkey = false;

leaf leaves[] = new leaf[5000];
int l = 0;

int occupied[][];

int count = 0;
int interval = 10;

int leaf_w = 35;
int leaf_h = 25;
int leaf_vari = 10;
int path_width = 50;
int path_vari = 50;

void setup(){
  turkey = loadImage("turkey.jpg");
  size(turkey.width,turkey.height);
  occupied = new int[width][height];
  noStroke();
}

void loop(){
  if(showturkey){
    background(turkey);
  }else{
    background(200,180,170);
  }
  if(mousePressed&&count%interval==0){
    leaves[l%leaves.length] = new leaf(mouseX,mouseY,random(-leaf_vari,leaf_vari),random(-path_vari,path_vari),turkey.get(mouseX,mouseY));
    l++;
  }
  for(int i=0;i<l;i++){
    leaves[i%leaves.length].fall();
  }
  count++;
}

class leaf{
  float ox,oy,x,y,w,h,pw;
  int start,count,dir;
  boolean falling = true;
  color c;
  float xstep,ystep,rxstep,rzstep;
  leaf(float _ox,float _oy,float _v1,float _v2,color _c){
    ox = _ox;
    oy = _oy;
    x = ox;
    y = oy;
    w = leaf_w+_v1;
    h = leaf_h+_v1;
    pw = path_width+_v2;
    c = color(red(_c),green(_c),blue(_c),230);
    if(random(1)>.5){
      dir = 1;
    }else{
      dir = -1;
    }
    start = millis();
    xstep = random(500,800);
    ystep = random(5,20);
    rxstep = random(300,600);
    rzstep = random(300,600);
  }
  void fall(){
    if(falling){
      count = millis()-start;
      test();
    }
    push();
    translate(ox+dir*pw*sin(float(count/xstep)),oy+float(count/ystep));
    rotateX(dir*cos(float(count/rxstep)));
    rotateZ(dir*float(count/rzstep));
    if(falling){
      x = screenX(0,0,0);
      y = screenY(0,0,0);
    }
    show();
    pop();
  }
  void test(){
    if(y>400||occupied[int(constrain(x,0,width-1))][int(constrain(y,0,height-1))]==1){
      falling = false;
    }
    if(!falling){
      for(int i=int(x-w/3);i<int(x+w/3);i++){
        for(int j=int(y-h/3);j<int(y);j++){
          occupied[constrain(i,0,width-1)][constrain(j,0,height-1)] = 1;
        }
      }
    }
  }
  void show(){
    fill(c);
    beginShape(POLYGON);
    vertex(1,h/3);
    vertex(1,0);
    vertex(w/3,h/6);
    vertex(w/4,-h/6);
    vertex(w/2,-3*h/5);
    vertex(w/6,-h/2);
    vertex(0,-h);
    vertex(-w/6,-h/2);
    vertex(-w/2,-3*h/5);
    vertex(-w/4,-h/6);
    vertex(-w/3,h/6);
    vertex(-1,0);
    vertex(-1,h/3);
    endShape();
  }
}

void keyPressed(){
  if(key=='i'||key=='I'){
    showturkey = !showturkey;
  }
  if(key=='x'||key=='X'){
    l = 0;
    leaves = new leaf[5000];
  }
}

072 -- Custom Drawing Program: Custom Drawing Program

Statement:Consider how Paul Haeberli has augmented the act of drawing with a physical simulation in Dynadraw, and how Scott Snibbe has augmented the drawing act with temporal playback in Motion Phone. Consider also the various visual augmentations devised by Josh Nimoy in his Scribble Variations, or by David Lu in his recent Droomzaacht pieces, or even Ben Fry's use of photographic source material in his Directional Paint applet.

Using any means you like, create a "drawing program" which augments the user's gesture in an engaging manner.

Terms: All applets must be 400x400. Use a keypress to clear the screen. Any other graphical or keyboard user interface elements (e.g. knobs, buttons, sliders) used to modify system parameters are strictly forbidden: for this assignment, we are interested in the augmentation/transformation of gestural information, not your skill as a maker of control panels. Otherwise, any other means and materials are available to you (e.g photographic materials, physical simulation, etc.).

hide statement