Microsoft Small Basic

Program Listing: FSJ613
GraphicsWindow.Show()

centerX = GraphicsWindow.Width / 2
centerY = GraphicsWindow.Height / 2

flagWidth = 360
flagHeight = 240
flagX = centerX - flagWidth / 2
flagY = centerY - flagHeight / 2

GraphicsWindow.PenWidth = 0

GraphicsWindow.BrushColor = "White"
mid = Shapes.AddRectangle(flagWidth, flagHeight / 3)
Shapes.Move(mid, flagX, centerY - 40)

GraphicsWindow.BrushColor = "#FB7700"
top = Shapes.AddRectangle(flagWidth, flagHeight / 3)
Shapes.Move(top, flagX, centerY - 80)
Shapes.Zoom(top, 1, 0)

GraphicsWindow.BrushColor = "#15880A"
bottom = Shapes.AddRectangle(flagWidth, flagHeight / 3)
Shapes.Move(bottom, flagX, centerY)
Shapes.Zoom(bottom, 1, 0)

For i = 1 To 40
Shapes.Move(top, flagX, centerY - i - 80)
Shapes.Zoom(top, 1, i / 40)
Shapes.Move(bottom, flagX, centerY + i)
Shapes.Zoom(bottom, 1, i / 40)
Program.Delay(30)
EndFor

GraphicsWindow.PenColor = "Black"
GraphicsWindow.PenWidth = 1.0
GraphicsWindow.DrawRectangle(flagX, flagY, flagWidth, flagHeight)

GraphicsWindow.PenColor = "#23358C"
GraphicsWindow.PenWidth = 2
GraphicsWindow.BrushColor = "White"

wheelX = centerX - 35
wheelY = centerY - 35

circle = Shapes.AddEllipse(70, 70)
Shapes.Move(circle, wheelX, wheelY)

For i = 1 To 12
angle = Math.GetRadians(15 * i)
xd = 35 * Math.Cos(angle)
yd = 35 * Math.Sin(angle)
Shapes.AddLine(centerX - xd, centerY - yd, centerX + xd, centerY + yd)
EndFor