PSICS Fall 2004 Quiz #3

Quiz #3 - 9/23/2004

Animated Kyle

Submit your solutions to this quiz by dropping in your webct drop box in the box labeled "Quiz3". Let Dave know if you have problems submitting!

Animation of Kyle

This quiz involves the development of scheme code to provide a simple animation of a "kyle". You are given a function that will draw a "kyle" at a given position, size and conrol over where kyle is looking. Below is a description of the drawing function and some examples:

;;draw-kyle needs a posn, number and symbol
;;  posn is the center of kyle's head.
;;  number is the radius of kyle's head.
;;  symbol determines where kyle is looking:
;;    'left - he is looking to our left.
;;    'right - he is looking to our right.
;;    'center - he is looking at us.

Here are some examples of what kyle will look like:

(draw-kyle (make-posn 100 100) 50 'left)
(draw-kyle (make-posn 100 100) 50 'center)
(draw-kyle (make-posn 100 100) 50 'right)

There is also a clear-kyle functon.

Your animation should move kyle horizontally across the canvas and change his eyes at the same time (so that he is constantly changing where he is looking). Your animation must include at least 4 different steps.

Grading

There are a number of ways to accomplish the animation, your grade will depend on how you implement the animation:


Kyle Code

The code you should start with is available here: quiz3.scm and also as html: quiz3.scm.html. This code includes the definition of lots of functions - the only one you need to use directly is draw-kyle and clear-kyle.


Submitting your code

Submit your code as a single program (file) to the WebCT Drop Box labeled "Quiz 3". We should be able to simply run the program and see kyle move (so include the call to the code that actually moves him). Feel free to submit code that has the easy version complete (to make sure you get 75) and partial work of either harder version.