DIM particle
(100) AS PARTICLE
createParticles particle()
updateAndShowParticles particle()
SUB createParticles
(this
() AS PARTICLE
)
SUB updateAndShowParticles
(this
() AS PARTICLE
) this(i).a = this(i).a + .1
r = 0
CircleFill this
(i
).x
+ COS(this
(i
).a
) * this
(i
).w
, this
(i
).y
+ SIN(this
(i
).a
) * this
(i
).h
, this
(i
).r
, this
(i
).c
x0 = R
y0 = 0
e = 0
y0 = y0 + 1
LINE (x
- x0
, y
+ y0
)-(x
+ x0
, y
+ y0
), C
, BF
LINE (x
- x0
, y
- y0
)-(x
+ x0
, y
- y0
), C
, BF
e = e + 2 * y0
LINE (x
- y0
, y
- x0
)-(x
+ y0
, y
- x0
), C
, BF
LINE (x
- y0
, y
+ x0
)-(x
+ y0
, y
+ x0
), C
, BF
x0 = x0 - 1
e = e - 2 * x0
LINE (x
- R
, y
)-(x
+ R
, y
), C
, BF