C481 B581 Computer Graphics
Dana Vrajitoru
Homework 1

Due date: Wednesday, January 19.

Ex. 1 (15 points) Given the following table of correspondence between the RGB and HSV systems, write a pseudocode function to convert one of them into the other one (which ever you find simpler).
 
Color Aspect RGB HSV
black   0, 0, 0 0, 0, 0
white   1, 1, 1 0, 0, 1
gray   0.3, 0.3, 0.3 0, 0, 0.3
red   1, 0, 0 0, 1, 1
yellow   1, 1, 0 60, 1, 1
green   0, 1, 0 120, 1, 1
cyan   0, 1, 1 180, 1, 1
blue   0, 0, 1 240, 1, 1
magenta   1, 0, 1 300, 1, 1
light blue   0.6, 0.6, 1 240, 0.4, 1
light orange   0.9, 0.5, 0.3 20, 0.67, 0.9

Hint:
0.67 = 1 - (0.3 / 0.9)
20 = 0 + (0.5 - 0.3) * 60 / (0.9 - 0.3)

Ex. 2 (5 points) In this exercise you will experiment with image representation and color

Turn in: ex. 1 written or by email and image files from ex. 2 by email.