Chapter 11 Outcomes
Pixel Graphics
Knowledge Outcomes
Define each of the key terms listed in the chart below.
| 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 |
Describe the difference between character graphics and pixel graphics.
Properly use each of the following draw commands:
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.
Know the purpose and use of each of the following:
Describe the purpose of the setscreen statement, and explain what each of the following can accomplish when used with setscreen:
Describe the two uses of the getch command.
Describe how to determine the size of each square for any sized checkerboard configuration (appropriately scaled to the length and height of the screen).
Explain a method of scaling the screen to display a grid for any screen settings.
Discuss how to find the coordinates of the corners of any square placed in a checkerboard.
Explain how random number generation is achieved in a computer.
Use random integers in a program to draw random objects (using the draw commands listed above).
Skills Outcomes
Given the number of pixels on the horizontal and vertical axis, determine the total number of possible pixel positions.
Create the program instructions which will pause a program until any key is struck.
Create the program instructions which will allow the user to enter a single keystroke without having to follow this by pressing the "Enter" key.
Generate random integers.
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.
Create a program that will change the background color for pixel graphics using the colorback subprogram.
Detect and correct a variety of common errors when creating programs using pixel graphics as outlined in the chapter.