|
kardiogram.BAS |
|
{* Кардиограмма *}REM basic ' КардиограммаSCREEN 9 {кардиогр press "`' To refresh
}CLS
RANDOMIZE TIMER
SLEEP 2
{If INKEY$ = "1" Then GoTo 6 Else End
}6
67 i = 100: j = 100
a = 20: a1 = 620
a2 = 320: a3 = 20
CLS : s = RND * 10: di = RND * 10
r = 5 + RND * 16
c1 = 9 + INT(RND * 7): c2 = 9 + INT(RND * 7)
p = INT(RND * 8)
Do While INKEY$ " {
}If s < 0 Then c = c1 Else c = c2
CIRCLE (i, j), r, c
If p = 5 Or p = 6 Or p = 7 Then PAINT (i, j), c{: LOCATE 1, 1: PRINT p
}If p > 7 Then PAINT (i, j), 0{: LOCATE 1, 1: PRINT p
}If j < a3 Or j > a2 Then s = -s: {s = s / ABS(s) * (.2 + (RND * 1))
}If i < a Or i > a1 Then di = -di: {di =di / ABS(di) * (.2 + (RND * 1))
}j = j + s
i = i + di
For t = 1 To 500: Next t
If INKEY$ = "`" Then GoTo 67
h = h + 1
If h = 15000 Then h = 0: GoTo 67
Loop
|