I Will House My Processing Interactive Art Here As I Learn It - Terry Bailey

Draw a picture! Move your mouse over canvas, slowly for meticulous and fast for
washing. Click the reset page icon in your browser to start over (I will learn
how to program a button for you eventually - I am just starting to learn how to
program graphics and interactive apps with Processing now.

Source code: void setup() { size (480,240); smooth(); stroke(0,102); } void draw()
{ float weight = dist (mouseX, mouseY, pmouseX, pmouseY); strokeWeight (weight);
line(mouseX, mouseY, pmouseX, pmouseY); } //function called dist helps calculate
speed by distance traveled in time //in this instance, slow is small (meticulous)
and fast is large (confident)

Built with Processing. Go to Processing.org for information

Return to Riffing On Books by New Media Author Terry Bailey