CS 184 - Spring 2004 - Homework 2 - Test Cases

Test Cases

Here are some examples. Click on the pictures to see what the matching input file was. Note that these examples show only the filled polygon, and do not show the "large display-pixel" boundary that you are also required to display.

  1. A rectangle
  2. A C
  3. A V
  4. A bowtie next to a diamond

Also, here (Windows, Unix(Intel)) is an executable that demonstrates how your program should work. To run this executable, unzip it onto a windows machine, and make sure input.txt is in the same directory as it. Hitting the number keys 0-9 will toggle the display of different shapes. Clicking with the mouse will toggle the display of the thick line boundaries. Note that shapes 4 and 9 display the same even though their inputs are different. This demonstrates the "snap vertices to pixel centers" requirement.