Handout for Midterm 2, CS5nm, 11/14/2008

Diagrams for Question 1:

Figure 1 Figure 2
draw logo with fill in the points

Below, Figure 3 shows a function definition for drawLogo(), and Figure 4 shows the strategy for drawing the logo (i.e. the order in which the points will be drawn).

Figure 3 Figure 4
def drawLogo(screen, color, x, y, width):
   pygame.draw.lines(screen, color, False,
       makeLogoPoints(x,y,width), 1)
diagram of order in which points are drawn