Меняющиеся узоры
Всего по паре синусов и косинусов и небольшой простенький алгоритм. В итоге перед вами меняющиеся узоры
Автор: неизвестен
Code
'===================================================================
' Lissajous Blender
'===================================================================
Const As Double TwoPi = 8 * Atn(1)
Dim As Integer m, n=1, p=1, q=1, c = 14
Dim As Double r, s
Dim As String k
Screen 19
Window (-1.01, -1.01)-( 1.01, 1.01)
Randomize
'-------------------------------------------------------------------
Do
m = p
n = q
p = q
q = 1 + Rnd * 20
windowtitle " m = "+Str(m) + " n = "+Str(n) + " p = "+Str(p) + " q = "+Str(q)
For s = 0 To 1 Step .002
Screenlock
Cls
Pset(0,1), c
For t As Double = 0 To TwoPi Step 1/(10*(5+m*n))
Line -((1-s)*Sin(m*t) + s*Sin(p*t), (1-s)*Cos(n*t) + s*Cos(q*t)), c
Next t
Line -(0,1), c
Screenunlock
Sleep 1
k = Inkey
If k <> "" Then Exit For
Next s
Loop While k = ""
'===================================================================
Sleep
'===================================================================