Chapter 11 Outcomes
Pixel Graphics


After completing this chapter and participating in class, you should be able to accomplish each of the following outcomes.

Knowledge Outcomes

  1. Define each of the key terms listed in the chart below.

  2. coordinates origin of coordinates pixel position
    maxx maxy drawdot
    drawline drawbox closed figure
    drawfill getch grid
    reserved word drawoval drawarc
    random numbers randint randomize
    pseudo-random numbers maxcolor animation
    delay background color CGA graphics
    VGA graphics setscreen  

  3. Describe the difference between character graphics and pixel graphics.

  4. Properly use each of the following draw commands:

  5. Explain the grid system we use when drawing pixel graphics on the screen (cartesian co-ordinates). This includes the use of x and y co-ordinates, the origin, and screen size which is available for drawing pixel graphics.

  6. Know the purpose and use of each of the following:

  7. Describe the purpose of the setscreen statement, and explain what each of the following can accomplish when used with setscreen:

  8. Describe the two uses of the getch command.

  9. Describe how to determine the size of each square for any sized checkerboard configuration (appropriately scaled to the length and height of the screen).

  10. Explain a method of scaling the screen to display a grid for any screen settings.

  11. Discuss how to find the coordinates of the corners of any square placed in a checkerboard.

  12. Explain how random number generation is achieved in a computer.

  13. Use random integers in a program to draw random objects (using the draw commands listed above).

Skills Outcomes

  1. Given the number of pixels on the horizontal and vertical axis, determine the total number of possible pixel positions.

  2. Create the program instructions which will pause a program until any key is struck.

  3. Create the program instructions which will allow the user to enter a single keystroke without having to follow this by pressing the "Enter" key.

  4. Generate random integers.

  5. Create a program that will change the direction of an animated object when it bumps up against the edge of the screen. It must do this in such a way as to stay on the screen.

  6. Create a program that will change the background color for pixel graphics using the colorback subprogram.

  7. Detect and correct a variety of common errors when creating programs using pixel graphics as outlined in the chapter.