Where on the screen is the pixel at ( 56, 87) ?
In the upper left corner. Remember that Y=0 starts at the top of the screen.
Graphics screen 12 is 640 pixels across and 480 pixels down (you don't have to remember this.) So the pixel at (56, 87) is 56/640 the way across (about a tenth of the way across), and at 87/480 of the way down about one fifth of the way down.)
This program puts 10 dots (pixels) on the screen at locations (10, 240), (20, 240), (30, 240), ... (100, 240).
' Start the graphics system. SCREEN 12 ' FOR X = 10 TO 100 STEP 10 PSET( X, 240) ' Set one pixel in row 240 NEXT X ' END
The value for Y is a constant 240, halfway down the screen. Since Y is always the same, all the dots will be in the same row. Here is what the program does (reduced in size):
You might want to type this program in and run it, since the next several pages do things with it and you might like to see it actually running.
Could the program be modified to put a line of dots all the way across the screen?