$fMiVqx`[eRF@cR_IT0TimerTextROW RollAcross9RollBackDrawBox^R1C1(c2R2 StartHereMenuHere ScreenDemoPSETDemoLineDemo CircleDemo PaintDemoShutDown ShuutDownthemvrightnowIthasaj resultion4ofxoy+theprogramFlookslikethisBBFradius StartCirclesDPressMainMenuIA ChangeStuffChangeIABCChangeBCAskEmStartPaintDemo>EnterTnumberfromOIMPUTpCyclesc@% Quickie Graphics Demo Written by Vince Long April 1999 dssd)sdm Quickie id) qYxse sdmGraphics ie qYxse sdm Demo ie qYxsdsdmeikciuQ id) qYsdsdmscihparG ie qYsd momeD ie qYsd!sdsd%se5e sd)se5e se se5e se se5e se se5e sesdd! e+ e e? Ysd)sdsd)se-m Quickiese sdse se-mGraphicsse sdse se-m Demosd!sdsd%se5e sd)se5e se se5e se se5e se se5e sd)sdsd)se6meikciuQ"se sdse se6mscihparGse sdse se6momeDsesdd! e+ e e? Ysd sdsdsdm Select the Command that you"mwould like to see demonstrated."m 1. Screen"m2. PSET"m3. Line"m 4. Circle"m5. Paintm6. Quit this ProgramsdsdF  V Vmd VZdc VZd_u][ VZi sdePssdsdsmFThe SCREEN statement allows you to select various graphics mode. Eachm6mode has a different screen reolution and color depth.mFThe default mode, the one you are looking at now, is SCREEN 0 and onlymBsupports text. It does this in a layout of 80 columns by 25 rows.mFThe other SCREEN modes let you display graphics, in addition to text, mKand in different resolutions. You can see a list of resolutions by looking"m$up the SCREEN statement in the INDEXmFThe SCREEN statement also has other parameters, but we won't be using mthem right nowmDSo let's take a look at how the display mode changes when the SCREENmmode parameter is changed.m$Press a key to go to the next screenF  V Vmd. ssdsd)sd)mThis is SCREEN 1."m!It has a resolution of 320 X 200."m$Press a key to go to the next screenF  V Vmd ssd sd)sd)mThis is SCREEN 2."m!It has a resolution of 640 X 200."m$Press a key to go to the next screenF  V Vmd ssdsd)sd)mThis is SCREEN 7."m!It has a resolution of 320 X 200."m$Press a key to go to the next screenF  V Vmdd ssd!sd)sd)mThis is SCREEN 8."m!It has a resolution of 640 X 200."m$Press a key to go to the next screenF  V Vmd" ssd%sd)sd)mThis is SCREEN 9."m!It has a resolution of 640 X 350."m$Press a key to go to the next screenF  V Vmd ssd)sd)sd)mThis is SCREEN 10.m!It has a resolution of 640 X 350."m$Press a key to go to the next screenF  V Vmd sse sd)sd)mThis is SCREEN 11.m!It has a resolution of 640 X 480."m$Press a key to go to the next screenF  V VmdZsse sd)sd)mThis is SCREEN 12.m!It has a resolution of 640 X 480."m$Press a key to go to the next screenF  V Vmdsse sd)sd)mThis is SCREEN 13.m!It has a resolution of 320 X 200."m$Press a key to go to the next screenF  V VmdsdePs[VsmCPSET lets you turn any pixel on the screen on or off. You can also"m.set its color. The syntax for the command is:m PSET x, y , color"mALet's give it a try by running two different programs. The first"mEwill draw a diagonal line on SCREEN 12. The program looks like this:"m CLSm SCREEN 12m FOR I = 1 TO 300"m PSET (I, I),4"m NEXT I"mPress a key to run this program"F  V Vmdsse  Vde,Vv V Vd Vfsesdm'Press a key to go to the next PSET demo"F  V VmdsdePssm?In the next PSET demo we will generate a series of random dots,"m/1700 of them, on the screen, like a starfield. "mThe program looks like this:m SCREEN 12m FOR I = 1 TO 1700m x% = RND * 639m y% = RND * 479m PSET (x%, y%)m NEXT I"mPress a key to run this program"F  V Vmdlsse  VdeV Cep e Cep j e j Vfsesdm'Press a key to go to return to the Menu"F  V Vmd2sdePss[smEThe LINE statement draws a line on the screen (duh!). The syntax is:"m,LINE (x1, y1) - (x2, y2) attribute, B, stylem- The (x1, y1) are the starting coordinates"m+ The (x2, y2) are the ending coordinates"m attribute is the colormD B, if present, draws a box using the coordinates as its diagonalm& style allows the line to be dashedm#Let's show some lines on SCREEN 12."mPress a key to beginF  V Vmdlsse d)d)eedsd)sdmLINE (10, 10)-(200, 100)e,d)eXeddsd)se-mLINE (300, 10)-(600, 100), 4, B"d)e,eedsesemLINE (10, 300)-(200, 390),6,BFsesem&Press a key to return to the Main MenuF  V VmdsdePs[sm@The CIRCLE statement draws circles. You specify the coordinatesmEof the circle's centerpoint, its radius, and color. The syntax looks"m like this:m* CIRCLE (x, y), radius, colormELet's draw some randomly placed and colored circles. The program is:"m SCREEN 12"m DOm x% = RND * 639"m y% = RND * 479"m I% = RND * 15m CIRCLE (x%, y%), 50, I%m T = TIMERm DO"m! LOOP UNTIL TIMER > T + .05"m LOCATE 15, 25"m2 PRINT 'Press a key to return to the Main Menu'm I$ = INKEY$"m LOOP WHILE I$ = mrsemPress a key to start the demo"F  V Vmdse F Cep e Cep j Cep V e je2 V V [ F V [kL=_csesem&Press a key to return to the Main Menu  V VmdDsdePs[ smANow that you have seen ways to draw various shapes, you can start"mDto play with the PAINT statement. PAINT lets you fill a shape whichmAyou have already drawn with a color. It also lets you change the"m3color of its border. The syntax of the command is:"m: PAINT (x, y) interior attribute, border attributemG (x, y) is the coordinate of a point inside the object to be filled"m1 interior attribute is the color to fill with"mG border attribute is the color of the line that makes up the object"sesemPress a key to start the demo"F  V Vmdd d se sd)d)ededee,e2e2erd~ sesdm8To change the interior color enter a number from 0 to 14  dc e_u] [eKeK ee,e2 e>"sesdmADo you want to change it again? (Y or N) "F  V VmdZ! VYmY"]![ VYmN"aN" Tdd V," ^deV "@eKeK ^e@e,e2 ^e@V [@F@V [k=_c" ^f Tf sd ePs [P[b"sdsdsN#x Vde,V$# s qs V i V [ F V [k #<_c" s qs V m " Vf s qs V io# VeHe7dxW# s qs V i V [ F V [k #<_c# s qs V m " Vf s qs V io Draw Box Draw Tops s e  Vd wdwnV$$e ee  Draw Sides Vd wnV(%s Vs (e s Vs (e e Draw Bottoms s e  Vd wdwnV%e  e e o T_