// COMB EVENT
// for single or multiple performance
boolean sketchFullScreen() { return true;
}
// a comb is held by its spine in one hand, either free // or resting on an object
boolean button = false;
int x =260; int y = 260;
int frameNumber= -1; void setup() {
size(1500,900); frameRate(5); background(255); drawComb(-1);
}
void drawLine(int number) { line(x+(20*number),y,x+(20*number),y+100);
}
void drawComb(int j) { stroke(0); strokeWeight(1); line(x,y,x+260,y);
for (int i = 0; i < 26; i++) { if(i==j) {
drawMovedLine(i); } else {
drawLine(i); }
if(i==12) { strokeWeight(2);
} stroke(0);
line(x+260,y,x+500,y);
} }
// the finger is now slowly and uniformly moved so that // the prong is inevitably released, and the nail
// engages the next prong.
void drawMovedLine(int index) { line(x+(20*index),y,x+(20*index)-30,y+90);
}
void draw() {
// This action is repeated until each prong has been used
if (frameNumber >=0 && frameNumber <= 26){ background(255);
drawComb(frameNumber);
frameNumber++;
}
fill(175);
noStroke(); rect(width/2,height/2,70,50);
}
// the thumb or a finger of the other hand is held with its // tip against an end prong of the comb, with the edge
// of the nail overlapping the end of the prong.
void mousePressed(){
if(mouseX>width/2 &&mouseX<width/2+70 &&mouseY>height/2 &&mouseY<height/2+50) {
frameNumber = 0;
} }
interactive installation based in code.
code based on the fluxus score 'comb event'.