Lighthouse, QL Graphics

See all articles from Update April 1992
Author(s): Taylor Penrose
Publication: Update Magazine
Pub Details: Update April 1992
Date: April 1992
Pages: 30-31

“Enclosed please find my first of many contributions to the QL community. This screen and dump was created for a CGP 220 color ink jet printer produced by Radio Shack, so I can not say if it will work on any other color printer to do a screen dump. I am still working on an eight color and may end up using Pixel 6 in a loop. For those with different printers it will at least provide a starting point.”

(Editors Notes) I think this short type in program is a marvelous way to get some of our readers started or helped in using their QL to produce screens or graphics without the aid of an art program. Study the listing and look for the REM lines, as these will tell you what is being created on the program lines upto the next REM line. You can later take each of these segments and use them by their self to see what effect they create on their own. Then try changing the parameters given and see the result. Ah!!!!, this is not “heavy” programming, just fun.

For those who have enjoyed this little exercise and want to further explore graphics and screen dumps on the QL, we have two things that come to mind. One, we hope to see more from Taylor Penrose on this and related subjects in the near future. Second is to study the manual that came with the QL. While what we find in there is sparse, many of us have learned just enough about our machines that if we were to now get out that old manual that we got lost on when we first got our QL, we would see that it makes more sense to us now. Not perfect, mind you, just more sense than it first did. Have fun with your computing, like most subjects we encounter in life it should be kept light, so that it is just one more of lifes enjoyments.

100 WINDOW 512,202,0,0 :PAPER 7 :OVER 1 :CLS :CSIZE 0,0 :SCALE 100,0,0
110 WINDOW #0,512,54,0,202 :PAPER #0,4,7 :INK #0,0 :CLS #0
200 REMark == Ocean ==
210 INK 4,7 :FILL 1
220 LINE 0,0 TO 0,30 ;190,0 TO 190,30
300 REMark == DarkRed sky ==
310 INK 2,0,2 :LINE 0,70 TO 0,80 ;190,70 TO 190,80
320 LINE 0,65 TO 0,63 ;190,65 TO 190,63 :FILL 0
400 REMark == LightRed Sky ==
410 INK 2,7 :FILL 1
420 LINE 0,50 TO 190,50 ;0,55 TO 0,59 ;190,55 TO 190,59
500 REMark == Grey Cloud ==
510 INK 255
520 FILL 1 :CIRCLE 80,55,10,9E-2,RAD(90) ;80,57,3 ;83,57,2 :FILL 0
600 REMark == Gulls ==
610 INK 0 :ARC 40,40 TO 45,45,-PI/2 TO 50,50,-PI/2 ;89,35 TO 95,35,-PI/2 TO 101,35,-PI/2
700 REMark == Sail Board ==
710 FILL 0 :INK 0 :CIRCLE 40,20,13,.25,RAD(120) :REMark Board Shadow
720 FILL 1 :INK 7 :CIRCLE 40,20,12,.25,RAD(120) :FILL 0 :REMark Board
730 INK 0 :FILL 1:ARC_R 3,2.5 TO -15,15,PI/3 :REMark Mast & Sail
740 INK 3 :LINE_R TO 2,-15 TO 13,-.5 :FILL 0 :INK 4 :LINE_R -15,15 TO -5,-3.5
750 INK 0 :FILL 0 :ARC 40,30 TO 30,22,-PI/4 :REMark Boom
900 REMark == LIGHTHOUSE ==
910 INK 7 :OVER -1 :FILL 1 :CIRCLE 172,30,60,.1,PI/2
920 INK 0,4 :FILL 1 :CIRCLE 172,30,60,.1,PI/2 :OVER 1 :REMark Island
930 INK 2 :FILL 1 :LINE 165,35 TO 167,90 ;179,35 TO 177,90 :ARC 165,35 TO 179,35,PI/3 :INK 7 :FILL 1 :ARC 167,90 TO 177,90,PI/3 :REMark Tower
935 INK 0 :FILL 0 :LINE 167.5,89 TO 168,95 ;176.5,89 TO 176,95 :ARC 167.5,89 TO 176.5,89,PI/3
940 INK 2 :FILL 1 :CIRCLE 172,95,5.5,.2,-PI/2 :REMark Top
950 BLOCK 8,8,470,85,0 :BLOCK 6,6,471,86,7 :REMark window
960 BLOCK 8,8,462,60,0 :BLOCK 6,6,463,61,7 :REMark window
970 FILL 0 :OVER 0 :INK 0 :SBYTES MDV1_LightHouse_Scrn,131072,32768
980 PAPER #0,0 :INK #0,7 :CLS #0 :STOP
990 REMark -----=====+++++***** High Resolution Dump *****+++++=====-----
1000 DEFine PROCedure ScrDump
1010 DIM dat$(3,64)
1020 screen=131072
1030 OPEN #3,ser1hc
1040 REPeat loop
1050 FOR col=1 TO 64
1060 dat$(2,col)=CHR$(PEEK(screen)) :REMark Green
1070 dat$(1,col)=CHR$(PEEK(screen+1)) :REMark Red
1080 dat$(3,col)=CHR$(PEEK(screen)&&PEEK(screen+1)) :REMark Blue
1090 screen=screen+2
1100 END FOR col
1110 PRINT #3,CHR$(27)&"C"&CHR$(64);
1120 FOR n=1 TO 3:PRINT #3,dat$(n,1 TO);
1130 IF screen>=163839 THEN EXIT loop
1140 END REPeat loop
1150 BEEP 100,1
1160 END DEFine ScrDump
Screen dump of the Lighthouse picture: sailboard, gulls and lighthouse on an island
Screen dump of the Lighthouse picture: sailboard, gulls and lighthouse on an island

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.