_TITLE "Wavy with Plama: Press Spacebar for New Plasma Injection." ' for QB64 fork (B+=MGA) 2017-05-05
' Wavy with Plasma Treatment.bas SmallBASIC 0.12.9 (B+=MGA) 2017-05-03
' from: animated circles started by Admin at SdlBasic 2017-05-03
' I added Plasma treatment and spacebar changer
' 2018-08-04 updated with better circle fill
'===================================================================
' Instructions: press spacebar for new injection of plasma
'==================================================================
CONST PHIDELTA
= DPI
/ 15
current_phi = 0
cN = 1
resetPlasma
current_phi = current_phi + PHISTEP
phiIndex
= ((x
+ y
) MOD (2 * W
)) / RADIUS
phi = phiIndex * PHIDELTA + current_phi
xball
= COS(phi
) * RADIUS
+ x
yball
= SIN(phi
) * RADIUS
+ y
changePlasma
fcirc xball, yball, SMALL_R
cN = cN + 1
'Steve McNeil's copied from his forum note: Radius is too common a name
RadiusError = -subRadius
X = subRadius
Y = 0
' Draw the middle span here so we don't draw it twice in the main loop,
' which would be a problem with blending turned on.
LINE (CX
- X
, CY
)-(CX
+ X
, CY
), , BF
RadiusError = RadiusError + Y * 2 + 1
LINE (CX
- Y
, CY
- X
)-(CX
+ Y
, CY
- X
), , BF
LINE (CX
- Y
, CY
+ X
)-(CX
+ Y
, CY
+ X
), , BF
X = X - 1
RadiusError = RadiusError - X * 2
Y = Y + 1
LINE (CX
- X
, CY
- Y
)-(CX
+ X
, CY
- Y
), , BF
LINE (CX
- X
, CY
+ Y
)-(CX
+ X
, CY
+ Y
), , BF