Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "fbgfx.bi"
- Dim As Double x, y, angle
- ScreenRes 800, 600, 32,,fb.gfx_alpha_primitives
- line(0,0)-(800,600),rgb(0,64,128),bf
- for S as double = (16*255)/256 to 0 step -1/32
- For angle = 0 To 3.1415 Step 1/256
- x = 16 * (Sin(angle))^3
- y = 13 * Cos(angle) - 5 * Cos(2 * angle) - 2 * Cos(3 * angle) - Cos(4 * angle)
- x = S * x : y = S * y
- var iX = cint(int(x)), iY=cint(int(y))
- var fX = x-iX, fY = y-iY
- 'dim as long iG=sqr(x*x+y*y)*.1,iR=128+S*8,iB=64-S*4
- dim as long iR=abs(X\2)+128,iB=16+angle*64,iG=abs(Y)*.9
- const iAlpha = 128
- pset ((400+iX) , (300-iY) ), RGBA(iR, iG, iB, (1-fX)*(1-fY)*iAlpha)
- pset ((400+iX)+1, (300-iY) ), RGBA(iR, iG, iB, ( fX)*(1-fY)*iAlpha)
- pset ((400+iX) , (300-iY)-1), RGBA(iR, iG, iB, (1-fX)*( fY)*iAlpha)
- pset ((400+iX)+1, (300-iY)-1), RGBA(iR, iG, iB, ( fX)*( fY)*iAlpha)
- pset ((400-iX) , (300-iY) ), RGBA(iR, iG, iB, (1-fX)*(1-fY)*iAlpha)
- pset ((400-iX)-1, (300-iY) ), RGBA(iR, iG, iB, ( fX)*(1-fY)*iAlpha)
- pset ((400-iX) , (300-iY)-1), RGBA(iR, iG, iB, (1-fX)*( fY)*iAlpha)
- pset ((400-iX)-1, (300-iY)-1), RGBA(iR, iG, iB, ( fX)*( fY)*iAlpha)
- Next angle
- sleep 30
- next S
- Sleep
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement