But what would Pete do?
Maybe this:
Maybe this:
Code: (Select All)
_Title "Ansii Plasma - press spacebar for new set of points, be sure to swirl your mouse in the stuff!" ' b+ 2021-11-11
_ScreenMove 100, 40
Type xy
x As Single
y As Single
dx As Single
dy As Single
End Type
Randomize Timer
Width 150, 80
_Font 8
nP = 6
Dim p(1 To nP) As xy, f(6)
restart:
For n = 1 To nP
p(n).x = Rnd * _Width: p(n).y = Rnd * _Height: p(n).dx = .25 * (Rnd * 2 - 1): p(n).dy = 2 * (Rnd * 2 - 1)
f(n) = n * .015
Next
While _KeyDown(27) = 0
Cls
If InKey$ = " " Then GoTo restart
For i = 1 To nP - 1
p(i).x = p(i).x + p(i).dx
If p(i).x > _Width - 1 Or p(i).x < 1 Then p(i).dx = -p(i).dx
If p(i).x < 1 Then p(i).x = 1: If p(i).x > _Width Then p(i).x = _Width
p(i).y = p(i).y + p(i).dy
If p(i).y > _Height Or p(i).y < 1 Then p(i).dy = -p(i).dy
If p(i).y < 1 Then p(i).y = 1: If p(i).y > _Height Then p(i).y = _Height
Next
While _MouseInput: Wend
p(nP).x = _MouseX: p(nP).y = _MouseY
For y = 1 To _Height
For x = 1 To _Width
d = 0
For n = 1 To nP
dx = x - p(n).x: dy = y - p(n).y
k = Sqr(dx * dx + dy * dy)
d = d + (Sin(k * f(n)) + 1) / 2
Next
Locate y, x: Print Chr$(Int(d * 20));
Next
Next
_Display
_Limit 40
Wend
b = b + ...