**CS 161 Workshop 4 - Art, Math, and Drama**

**Week of October 11-13**

General information:

1. Return Quiz 2. I have entered the grades in Blackboard. Repeat to students information I sent out about opportunity to have quiz regraded:

You will have the opportunity to correct your errors (if any) and turn it back in at workshop Oct 18-20 for regrading. You must follow these rules:

* Write your corrected answers on a separate sheet of paper, not your original quiz. Include both the problem and the correct answer.

* For each corrected answer, add a English explanation (one or two sentences) of why the new answer is correct.

* For each corrected answer, add citation to a section and page in the Zelle textbook that contains the information needed to answer the question.

* You will receive no credit for a correction unless the written explanation and citation to the textbook is included.

* Staple your correction sheet(s) to your original quiz and turn them into your workshop leader one week after you receive back the original quiz.

* The new grade will replace the old grade for the quiz.

2. Collect Assignment 5, the written exercises. You will be grading them. It is lengthy. TA Yi Chu will create and email you a rubric.

3. Please update attendance records on Blackboard for workshops.

The workshop this week is to prepare the students for programming with graphics. Their programming assignment next week will involve creating a little animated drama. There are 3 activities in this week's workshop. **The activities require graph paper, rulers, protractors, and pencils. The bookstore only had enough protractors and rulers for one workshop at a time, so you will need to pass on the supplies to the leader of the workshop session after yours.**

Activity 1: Art

The purpose of this exercise to is to gain experience in using geometric shapes to construct pictures. Computer animators do exactly this task (but with thousands of geometric shapes per object).

Put students in pairs, each with several sheets of graph paper, pencil, ruler, and protractor. The TA hands each pair a scrap of paper with the name of an object on it, e.g., man, woman, house, train, computer, horse, etc. The task is to create a recognizable picture of the object using only straight lines, rectangles (oriented strictly vertically/horizontally), circles, and triangles (they need not be equilateral triangles). **Only a total of 5 shapes may be used.** After creating their picture, the students turn it into a series of drawing commands of the following form, where X and Y are coordinates where (0,0) is the UPPER LEFT corner of the graph paper and the Y axis is POSITIVE going down (the reverse of the convention used in math class, but the normal convention for computer graphics), and R is a number.

Circle(Point(X,Y), R) - Draw a circle centered at (X,Y) with radius R

Rectangle(Point(X1,Y1), Point(X2,Y2)) - Draw a rectangle having opposite corners at (X1,Y1) and (X2,Y2)

Line(Point(X1,Y1), Point(X2,Y2)) - Draw a line from (X1,Y1) to (X2,Y2)

Polygon(Point(X1,Y1), Point(X2,Y2), Point(X3,Y3)) - draw a triangle with the given points as vertices.

When everyone is done, exchange instructions (not drawings). Each pair reconstructs the drawing they were given, and has to guess what it is.

Activity 2: Math

Break into groups 3 or 4 students to solve the following problems. **Every group should include at least one student who remembers enough of trigonometry to know what a sine and cosine is.** They may find it useful to first try particular values of X1, X2, Y1, Y2 before solving the general case.

1. Consider a rectangle created by Rectangle(Point(X1,Y1), Point(X2,Y2)). If the rectangles moves right by 10 units, what are the new values of X1, Y1, X2, and Y2? What if it move up by 15 units?

2. Suppose the same (original) rectangle is rotated clockwise by 90 degrees around point (X1,Y1), What are the new values of X2 and Y2?

3. Suppose the same (original) rectangle moves (translates) 10 units at an angle of 45 degrees (where 0 degrees is to the right and 90 degrees is straight up). What are the new coordinates of X1 and Y1? (The answer is X1+sqrt(50), Y1+sqrt(50).) **This problem can be solved using the Pythagorean Theorem.**

4. Suppose the same original rectangle moves K units at an angle of D degrees. What are the new coordinates of X1 and X2? **Be prepared to have the whole class work on this one together - and figure it out yourself before the workshop! Everyone has probably forgotten everything they learned in 10th grade math!**

Activity 3: Drama

If there is less than 20 minutes remaining, then end the workshop now. Otherwise, go on to this exercise, which is about how a story can be told using only very simple graphics.

In groups of 2 or 3 students, create a **storyboard** (a series of sketches) of how the balcony scene from Romeo & Juliet might be enacted by two animated characters. Each character is a circle. They have the ability to move, change size, change color, and talk (make speech balloons). **Students need not try to be faithful to the Shakespeare text! Try for something unexpected and humorous.** Don't try to create all the drawing commands, just the story boards. Finish in time to share your story boards with some of the other groups.