Chapter 12
1. (a) A pixel is the smallest area on the display screen
that can be illuminated by the electron beam of the cathode ray
tube (CRT).
(b) The screen of a VGA monitor in "graphics" mode has
307,200 pixels, arranged in a rectangular format 640 pixels wide
and 400 pixels high.
2. All standard IBM color display units support graphics.
3. After a graphics figure has been displayed on the screen,
press the Return key to return to the text mode.
4. The statement "PAUSE 60" causes the program to pause
for 60 seconds or one minute.
5. The statement "SET WINDOW Xmin, Xmax, Ymin, Ymax"
establishes a coordinate system in the current screen window.
6. (a) The point (5,10) has a Y coordinate value of 10.
(b) The Y coordinate is measured vertically.
7. (a) The aspect ratio is used to establish a coordinate
system that makes geometric figures look normal; that is, circles
look round and squares look square.
(b) The aspect ratio of an IBM PC monochrome monitor
is about 1.40.
8. If a display screen has an aspect ratio of 1.5 and the
vertical coordinate scale extends from 0 to 80, the horizontal
coordinate scale should extend from 0 to 120.
9. The default coordinates are 0 to 1 for both X and Y if the
entire screen is designated a graphics window.
10. The statement "PLOT POINTS: 3,5" illuminates the pixel at
point X = 3 and Y = 5.
11. The statement "PLOT LINES: 3,5; 10,10" draws a line from
point (3,5) to point (10,10).
12. The statement "PLOT LINES: 0,0; 0,20; 20,20; 20,0; 0,0"
draws a square with opposite corners at point (0,0) and point
(20,20).
13. The statement "BOX CLEAR 0, 20, 0, 20" erases the figure
drawn in question #12.
14. (a) The statement PLOT TEXT, at 20,20: "READY?" displays
the word READY? on the graphics screen.
(b) The lower-left corner of the letter R is at point (20,20).
15. The location of a circle drawn with the BOX ELLIPSE
statement is determined by specifying the corner coordinates of a
square that encloses the circle, with the sides of the square touching
the circle.
16. (a) The statement "BOX KEEP Xmin, Xmax, Ymin, Ymax IN Var$"
saves a figure within the area enclosed by Xmin, Xmax, Ymin
and Ymax.
(b) The figure is stored in a string variable denoted by
Var$.
17. Color number zero usually represents the color BLACK.
18. The statement "DRAW Name (Arguments)" is used to call
a picture unit named Name, passing information through arguments
denoted by Arguments.
19. (a) The statement "DRAW Pic with ROTATE (-30)" draws the
figure represented by the picture unit Pic, rotated 30 degrees
clockwise.
(b) Rotation is about point (0,0), the origin of the
coordinate system.
(c) A previous OPTION ANGLE DEGREES statement must exist to
set the angle option to degrees.
20. The statement LIBRARY "GRAPHLIB.TRU" allows a program to use
the GRAPHLIB.TRU library file.
21. The cross-hairs produced by the GET POINT statement are
displayed at the last point specified on the graphics screen or
if no previous point has been specified, at the center of the
active window.