Code: Select all

`Dim As Double x0, y0, r, phi, dt, t`

Dim As Integer k

ScreenRes 1000, 100, 32

WindowTitle "Water Wave"

dt = 0.02

y0 = 50

r = 30

t = 0

Do

t = t + dt

Cls

ScreenLock

For k = 0 To 40

x0 = 25 * k

Circle (x0, y0), r, &HAAAAFF 'circle for each particle

phi = 0.5 * k

Circle (x0 + r * Sin(t - phi), y0 - r * Cos(t - phi)), 0.1 * r, &H00FFFF,,,, F 'particle

Next

ScreenUnlock

Sleep 10

Loop Until Inkey = Chr(255, 107)

End