Advertisement
Mysoft

Untitled

Feb 11th, 2023
2,915
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "fbgfx.bi"
  2.  
  3. Dim As Double x, y, angle
  4.  
  5. ScreenRes 800, 600, 32,,fb.gfx_alpha_primitives
  6. line(0,0)-(800,600),rgb(0,64,128),bf
  7.  
  8. for S as double = (16*255)/256 to 0 step -1/32
  9.   For angle = 0 To 3.1415 Step 1/256
  10.      
  11.       x = 16 * (Sin(angle))^3
  12.       y = 13 * Cos(angle) - 5 * Cos(2 * angle) - 2 * Cos(3 * angle) - Cos(4 * angle)
  13.       x = S * x : y = S * y
  14.      
  15.       var iX = cint(int(x)), iY=cint(int(y))        
  16.       var fX = x-iX, fY = y-iY        
  17.      
  18.       'dim as long iG=sqr(x*x+y*y)*.1,iR=128+S*8,iB=64-S*4
  19.       dim as long iR=abs(X\2)+128,iB=16+angle*64,iG=abs(Y)*.9
  20.       const iAlpha = 128
  21.      
  22.       pset ((400+iX)  , (300-iY)  ), RGBA(iR, iG, iB, (1-fX)*(1-fY)*iAlpha)
  23.       pset ((400+iX)+1, (300-iY)  ), RGBA(iR, iG, iB, (  fX)*(1-fY)*iAlpha)
  24.       pset ((400+iX)  , (300-iY)-1), RGBA(iR, iG, iB, (1-fX)*(  fY)*iAlpha)
  25.       pset ((400+iX)+1, (300-iY)-1), RGBA(iR, iG, iB, (  fX)*(  fY)*iAlpha)
  26.      
  27.       pset ((400-iX)  , (300-iY)  ), RGBA(iR, iG, iB, (1-fX)*(1-fY)*iAlpha)
  28.       pset ((400-iX)-1, (300-iY)  ), RGBA(iR, iG, iB, (  fX)*(1-fY)*iAlpha)
  29.       pset ((400-iX)  , (300-iY)-1), RGBA(iR, iG, iB, (1-fX)*(  fY)*iAlpha)
  30.       pset ((400-iX)-1, (300-iY)-1), RGBA(iR, iG, iB, (  fX)*(  fY)*iAlpha)
  31.          
  32.   Next angle
  33.   sleep 30
  34. next S
  35.  
  36. Sleep
  37. End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement