'Wavy with Plama.bas 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
'===================================================================
' Instructions: press spacebar for new injection of plasma
'==================================================================
CONST PHIDELTA
= DPI
/ 15
_TITLE "Wavy with Plasma trans by bplus, Press Spacebar for New Plasma Injection." current_phi = 0
cN = 1
resetPlasma
current_phi = current_phi + PHISTEP
'COLOR _RGB(120, 80, 80)
'CIRCLE (x, y), RADIUS
phiIndex
= ((x
+ y
) MOD (2 * W
)) / RADIUS
phi = phiIndex * PHIDELTA + current_phi
xball
= COS(phi
) * RADIUS
+ x
yball
= SIN(phi
) * RADIUS
+ y
changePlasma
'LINE (x, y)-(xball, yball)
fcirc2 xball, yball, SMALL_R
cN = cN + 1
'========================================== sqrSeg Method for filled circle
SUB fcirc2
(xx%
, yy%
, r%
) 'const sqr12! = .5^.5 'in main const section
r2% = r% * r%
sqr12r% = sqr12! * r%
LINE (xx%
- sqr12r%
, yy%
- sqr12r%
)-(xx%
+ sqr12r%
, yy%
+ sqr12r%
), , BF
LINE (xx%
- x%
, yy%
+ sqr12r%
)-(xx%
- x%
, yy%
+ y%
) LINE (xx%
- x%
, yy%
- sqr12r%
)-(xx%
- x%
, yy%
- y%
) LINE (xx%
+ x%
, yy%
+ sqr12r%
)-(xx%
+ x%
, yy%
+ y%
) LINE (xx%
+ x%
, yy%
- sqr12r%
)-(xx%
+ x%
, yy%
- y%
) LINE (xx%
- x%
, yy%
+ y%
)-(xx%
- x%
, yy%
- y%
) LINE (xx%
+ x%
, yy%
+ y%
)-(xx%
+ x%
, yy%
- y%
)
r2% = r% * r%
LINE (xx%
- x%
, yy%
+ y%
)-(xx%
- x%
, yy%
- y%
) LINE (xx%
+ x%
, yy%
+ y%
)-(xx%
+ x%
, yy%
- y%
)