; Line Example ; ------------ Graphics 640,480,0,2 SetBuffer BackBuffer() SeedRnd MilliSecs() ; Scatter some radar blips Dim blipx(4),blipy(4) For i=0 To 4 a=Rand(0,359) d=Rand(40,170) blipx(i)=320+Cos(a)*d blipy(i)=240+Sin(a)*d Next angle#=0 While Not KeyDown(1) Cls ; Radar rings Color 0,80,0 Oval 140,60,360,360,0 Oval 200,120,240,240,0 Oval 260,180,120,120,0 ; Cross hairs drawn with Line Line 140,240,500,240 Line 320,60,320,420 ; Blips Color 255,80,80 For i=0 To 4 Oval blipx(i)-3,blipy(i)-3,6,6,1 Next ; The rotating radar sweep - one Line from the centre outwards angle=angle+2 Color 0,255,0 Line 320,240,320+Cos(angle)*180,240+Sin(angle)*180 Color 255,255,255 Text 0,0,"Esc: exit" Text 0,20,"Line 320,240,"+Int(320+Cos(angle)*180)+","+Int(240+Sin(angle)*180) Flip Wend End