Project 2X

— golan @ 1:48 pm

Notes for September 14

  • Making your own function, and calling it.
    • Giving your own function some parameters.
  • Loading and displaying an image.
  • Displaying text on the screen.

Assignment (Due Monday September 19)

Read this chapter from the big blue book (pp. 182-185): In particular, study the “eye()” function. 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. Presently:

Design a graphical totem/emblem/figure. It could be a character, person, car, etcetera. Let’s call this your “rubberstamp”. Then implement the following function, which draws the totem (rubberstamp) at the location specified by the arguments, px,py. Your function should also accept at least one parametric “knob” (called controlParam) that modulates the appearance of the stamp somehow (perhaps its color, size, number of gills, etcetera). Give your  control parameter a good name.

void placeRubberStamp (int px, int py, float controlParam){ }

(Note, we already made a spot for Project #20 last week on the OP site.)

Project 21.

Call your function three times, to produce a composition with three of your rubberstamps. Upload your project to the OpenProcessing classroom.

Project 22.

Use two for() loops, to create a function in which your rubberstamp is placed in a grid. Add some random variation using your control parameter(s). Upload your project to the OpenProcessing classroom.

Project 23.

In an interactive program with no background() call, create an interaction in which your rubberstamp is placed wherever the user clicks. Use your rubberstamp function to allow the user to place copies of your emblem around the canvas by clicking the mouse. Upload your project to the OpenProcessing classroom.


No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2019 CMU Electronic Media Studio II, Fall 2011, Section A | powered by WordPress with Barecity