Computer Science 110
The Art & Science of Computer Graphics

Mount Holyoke College
Spring 2010


Lecture 12: More Programming
Date: Monday, March 22, 2010



Agenda


Lecture Assignment 12

Due at the start of class, Wednesday, March 24.

Please submit answers to these questions either as a hard copy (typeset or handwritten are OK) or by email to jteresco AT mtholyoke.edu by the start of class. We will discuss these questions at the start of class, so no late submissions are accepted.

  1. A function to return a darker shade of an HSV color.
    (define (darkerHSV c)
    
    
    
    
    )
    
  2. A function that generates a random RGB color.
    (define (randomRGBColor)
    
    
    
    
    )
    
  3. 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.


Examples