This program generates a random terrain using the Diamond/Square method. It then displays the terrain, with green and white being above sea level, and blue below. Lighter areas are higher altitude. You can drag the map with the left mouse button. The middle mouse button (or both buttons at the same time on two-button mice) will zoom in, and a right click will zoom out. You can also use the "
This program displays a white 3D box, which will rotate as the mouse cursor is moved across its screen. -- This browser does not have a Java Plug-in. Get the latest Java Plug-in here. -- Built with Processing Code void setup() { size(255,255,P3D); } void draw() { background(0); lights(); noStroke(); translate(128,128); rotateY(float(mouseX) / float(width) * PI); rotateZ(float(mouseY)/float(height) * -PI); box(50,50,50); }
This program is a computerized version of a tool Heidi uses to help teach kids to read. It displays three letters, a vowel surrounded by two consonants. Click a letter to change it, or click outside the letter boxes to change all three. -- This browser does not have a Java Plug-in. Get the latest Java Plug-in here. -- Built with Processing Code nPFont font; String word="
Draw a circle by left-clicking. Erase by right-clicking. Clear the screen with a middle click. -- This browser does not have a Java Plug-in. Get the latest Java Plug-in here. -- Code void setup() { size(200,200); background(0); } void draw() { if (mousePressed) { if (mouseButton == LEFT) { stroke(255); fill(128); ellipse(mouseX,mouseY,20,20); } else if (mouseButton == RIGHT) { stroke(0); fill(0); ellipse(mouseX,mouseY,20,20); } else if (mouseButton == CENTER) { background(0); } } }
Processing is a programming language intended to simplify the creation of programs with graphics, data visualization, and user interaction. I got interested in it after seeing some cool examples online of what it could do. Presentation This is (more or less) the presentation I gave at Bar Camp Grand Rapids, 2009. Examples Many Circles - Draws circles under the mouse cursor. Simple Draw - Draw with left click, erase with right click.