void scribe(String S) {fill(black); text(S,20,20); noFill();} void scribe(String S, int i) {fill(black); text(S,20,20+i*20); noFill();} void mousePressed() { if (mouse().isInWindow()) pickClosestPoint(); else ; } // select closest vertex (see TAB polygon) //USES geo2D void keyPressed() { if (key==' ') showHelpText=!showHelpText ; if (key=='X') {String S=" "+"-####.tif"; saveFrame(S);}; ; if (key=='?') debugging=true; // toggle debug mode }; void showHelp() { fill(dblue); pushMatrix(); translate(20,20); text("Simple Edge/Triangle intersection by Derek Tatum",0,0); translate(0,20); text(" This simplified version assumes general position ",0,0); translate(0,20); text(" ",0,0); translate(0,20); text("First click in the window to activate it ",0,0); translate(0,20); text("Press SPACE to show/hide this help text",0,0); translate(0,20); text("Click & drag vertices ",0,0); translate(0,20); text(" ",0,0); translate(0,20); text("When running Processing (not in a web browser): ",0,0); translate(0,20); text("Press 'X' to snap a picture ()",0,0); translate(0,20); text("Press '?' to print your debugging stuff",0,0); translate(0,20); popMatrix(); noFill(); showColors(); // showing off various colors (helps you select the one you want) }