/* Emerson Taymor
DESMA 28: Interactivity: Casey Reas
Exercise 1: Line and Dot
My idea: The line represents a straw and the dot
represents a spitball. The "straw" is angled upwards slightly
because it is difficult to hold a straw perfectly horizontal.
The "spitball" is slightly above the straw and touching the edge of
the screen because the spitball flies slightly upward due to
thermals before it hits the "wall" or edge of screen. When it hits
the "wall" it stops in its tracks because spitballs stick to surfaces.
I do not want the spitball to be smoothed because spitballs have jagged
edges. This program in no way condones the use of spitballs and I have
only shot a spitball on rare occassions!!!
ENJOY!!!
*/
//create screen and assign it a dark gray
size(400, 400);
background(51);
//STRAW PORTION!!!
//set stroke weight to 7 to make it look more like a straw
strokeWeight(5);
//set stroke cap to square because looking at a straw from the side
//gives it hard edges
strokeCap(SQUARE);
//set stroke color to white, because straws are often white
stroke(255);
//smooth the straw so that it looks more realistic. straws
//do not have jaggged edges
smooth();
//THE FOLLOWING COMMENTS ARE A TEST TO JUDGE TRAJECTORY
//draw a line or straw from just off edge of screen, to the edge of
//screen to show the straight trajectory of the straw, when it is
//angled upwards.
//line(3, 315, width, 309);
//draw a line or straw from just off edge of screen, about 55 pixels
//long to a spot slightly higher.
line(3, 315, 50, 309);
//SPITBALL PORTION!!!
//set stroke weight to 5 because a spitball must be slightly smaller
//than straw to allow it to fit in straw.
strokeWeight(5);
//set stroke cap back to round so that the point draws rounded.
strokeCap(ROUND);
//de-anti-alias the point so it has more jagged edges.
noSmooth();
//draw the spitball to be at the width of the screen -1 so it is touching
//the screen. It should be just slightly above the straws above the straw's
//height and angle.
point(width-2, 275);
//THE PROGRAM IS COMPLETE. It works as designed!
saveFrame("exercise1.jpg");
Exercise 01: Draw one line and one dot. Set the relation between them and the frame based on an idea. Explain this idea as a comment at the top of your code.