|
Computer Science 110 The Art & Science of Computer Graphics Mount Holyoke College Spring 2008
|
|
Lecture 12: Programming
Date: Wednesday, March 26, 2008
- Announcements
- Grading status
- Shared model repository status
- Programming basics
- mathematical functions
- a better random number function
- list manipulations
- conditional execution
- building a scene with replicated objects
Due at the start of class, Monday, March 31.
Fill in the function definitions below. Please turn in a hard
copy (typeset or handwritten are OK). We will discuss these questions
during class, so no late submissions are accepted.
- A function to return a darker shade of an HSV color.
(define (darkerHSV c)
)
- A function that generates a random RGB color.
(define (randomRGBColor)
)
- A function that returns one color (provided as a parameter) half
of the time (randomly) or a second color (provided as another
parameter) the other half of the time.
(define (pickAColor c1 c2)
)
So the function call (pickAColor red blue) would randomly return
either red or blue.
You may use the helper functions we defined in class examples such as
rand, first, etc.
- DarkerLighter
- Countdown
- SaltShaker