Microsoft Small Basic

Program Listing: GWG872
scale = 50/247
GraphicsWindow.Title = "America"
GraphicsWindow.Width = 2470*scale
GraphicsWindow.Height = 1300*scale
gw = GraphicsWindow.Width
gh = GraphicsWindow.Height
colors = "0=White;1=Red"
GraphicsWindow.PenWidth = gh/13
For i = 1 To 13
GraphicsWindow.BrushColor = colors[Math.Remainder(i,2)]
GraphicsWindow.FillRectangle(0,gh/13*i-gh/13,gw,gh/13)
EndFor
GraphicsWindow.BrushColor = "Blue"
GraphicsWindow.FillRectangle(0,0,267/800*2470*scale,gh/13*7)
cenx = 267/800*2470*scale/2
ceny = (gh/13*7)/2
GraphicsWindow.BrushColor = "White"
For f = 1 To 13
x = cenx + Math.Cos(Math.GetRadians(f*360/13))*ceny/5*4
y = ceny + Math.Sin(Math.GetRadians(f*360/13))*ceny/5*4
rad = 60*scale
ang = f*360/13+90
Star()
EndFor

Sub Star
For i = 1 To 5
x1 = x + Math.Cos(Math.GetRadians(i*72-90+ang))*rad
y1 = y + Math.Sin(Math.GetRadians(i*72-90+ang))*rad
x2 = x + Math.Cos(Math.GetRadians(i*72+ang))*rad/3
y2 = y + Math.Sin(Math.GetRadians(i*72+ang))*rad/3
x3 = x + Math.Cos(Math.GetRadians(i*72-180+ang))*rad/3
y3 = y + Math.Sin(Math.GetRadians(i*72-180+ang))*rad/3
GraphicsWindow.FillTriangle(x1,y1,x2,y2,x3,y3)
EndFor
EndSub