_TITLE "Splats" 'b+ 2020-01-12 ' from eRATication/cheese wedge tests/ multiple explosions.bas 2018-07-28 translated from
'bomb.bas for SmallBASIC 0.12.2 [B+=MGA] 2016-05-09 from explosion study
CONST xmax
= 1300, ymax
= 760, pi2
= 6.283185 'tf AS INTEGER
stopit
= (RND * 100) \
1 + 15 dx
= RND * 60 - 30: dy
= RND * 60 - 30: a
= 7 * (RND * 10 - 5): b
= 7 * (RND * 10 - 5) x
= xmax
* RND: y
= ymax
* RND splat x, y, kolor
x = x + dx: y = y + dy
dx = dx + a: dy = dy + b
'_LIMIT 5
'_DELAY 1
round = 5
nRounds
= (RND * 10) \
1 + 1 nDots = nRounds * round
NewDot i, x, y
rounds = round
dots(i).x = dots(i).x + dots(i).dx
dots(i).y = dots(i).y + dots(i).dy
dots(i).dx = dots(i).dx * dots(i).spread
dots(i).dy = dots(i).dy * dots(i).spread
fcirc dots(i).x, dots(i).y, dots(i).size / 2, kolor
dots(i).size = dots(i).size * dots(i).spread
NewDot i, x, y
rounds = rounds + round
dots
(i
).x
= x
+ r
* COS(angle
) dots
(i
).y
= y
+ r
* SIN(angle
) dots
(i
).size
= RND * 15 + 5 dots
(i
).dx
= r
* (15 - dots
(i
).size
) * COS(angle
) dots
(i
).dy
= r
* (15 - dots
(i
).size
) * SIN(angle
) dots
(i
).spread
= RND * .3 + .2
Radius
= ABS(R
): RadiusError
= -Radius: X
= Radius: Y
= 0 LINE (CX
- X
, CY
)-(CX
+ X
, CY
), C
, BF
RadiusError = RadiusError + Y * 2 + 1
LINE (CX
- Y
, CY
- X
)-(CX
+ Y
, CY
- X
), C
, BF
LINE (CX
- Y
, CY
+ X
)-(CX
+ Y
, CY
+ X
), C
, BF
X = X - 1
RadiusError = RadiusError - X * 2
Y = Y + 1
LINE (CX
- X
, CY
- Y
)-(CX
+ X
, CY
- Y
), C
, BF
LINE (CX
- X
, CY
+ Y
)-(CX
+ X
, CY
+ Y
), C
, BF