020 -- Your Cute Rubber Stamp: Functional Abstraction (Due Monday 10/2)
Design a graphical totem/emblem/figure. Then implement the following function:
void placeRubberStamp (int px, int py, float controlParam){ }
which draws the totem at the location specified by the arguments px,py. Your function should accept at least one parametric "knob" (controlParam) that modulates the appearance of the stamp. Use this function to allow the user to place copies of your emblem around the canvas by clicking the mouse.
For some basic examples, consider the "eye()" function discussed in the Processing book (pp. 182-185). This function draws a cartoon eyeball in a requested location. Another good example is the "drawX()" function, also discussed in this chapter, which takes a variety of control parameters.
Suggestions:
-- If your emblem consists of multi-point curves or polygons, store the coordinate points in one or more globally-scoped arrays; fill the arrays (once) in your setup() method.
-- Consider storing vertex colors in arrays as well.
If you're up for a challenge: Accomplish this assignment while still refreshing the screen on every frame with the background() command; To demonstrate your success, give your stamps a time-based behavior.
Please note that this assignment is slightly different from the version which was given to the Fall 2004 class, in case you were looking to borrow code structures.