Microsoft Small Basic

Program Listing: ZFK355
' Anemone
' Copyright © 2018 Nonki Takahashi. The MIT License.
' Challenge 2018-09

GraphicsWindow.Title = "Anemone"
Init()
For i = 1 To 7
GraphicsWindow.BrushColor = bc[Math.Remainder(i, 2) + 1]
For x = gw / 2 - 65 To gw / 2 + 65 Step 4
y = gh * 2 / 3 + i * 10 + 5 * Math.Sin(x / 6)
GraphicsWindow.FillEllipse(x - 5, y - 5, 10, 10)
EndFor
EndFor
GraphicsWindow.BrushColor = "Tan"
y = gh * 2 / 3 + 70
GraphicsWindow.FillRectangle(0, y, gw, gh - y)
GraphicsWindow.BrushColor = "#80FF9933"
For i = 1 To 7
s1 = 20
s2 = 1
x = gw / 2 + (i - 4) * 20
For y = gh * 2 / 3 To gh / 3 Step -10
GraphicsWindow.FillEllipse(x - s1 / 2, y - s1 / 2, s1, s1)
x = x + 2 - Math.GetRandomNumber(3) + (i - 4) * s2
s1 = s1 * 0.97
s2 = s2 * 1.06
EndFor
EndFor

Sub Init
gw = 598
gh = 428
GraphicsWindow.Width = gw
GraphicsWindow.Height = gh
GraphicsWindow.BackgroundColor = "Navy"
bc = "1=#333333;2=#222222;"
EndSub