SHARE
TWEET

Untitled

a guest Oct 23rd, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. REM  *****  BASIC  *****
  2.  
  3. Sub Main
  4. Dim Doc As Object
  5. Dim Sheet As Object
  6. Dim Cell As Object  
  7. Dim s As String
  8.  
  9. Doc = ThisComponent
  10. Sheet = Doc.Sheets(0)
  11.  
  12. baseR = 6.28 * Rnd
  13. baseG = 6.28 * Rnd
  14. baseB = 6.28 * Rnd
  15. k0 = Rnd
  16. k1 = Rnd
  17. k2 = Rnd
  18. k3 = Rnd
  19.  
  20. FOR x = 0 TO 8
  21. FOR y = 0 TO 23
  22.   Cell = Sheet.getCellByPosition(x, y)
  23.   r = 128+127*Sin(baseR + y*k0+x*k1)
  24.   g = 80+79*Sin(baseG + y*k2)
  25.   b = 100+99*Sin(baseB + x*k3)
  26.   Cell.CellBackColor = RGB( r, g, b)
  27.   h = 1 + Rnd*Rnd*39
  28.   l = 1 + Int(50 / h)
  29.   s = ""
  30.   FOR t = 0 TO l
  31.     s = s & Mid(" ¯.°·¸´¨0123456789═╔╗╚╝╠╣╦╩╬█░▒▓", 1+Int(r/10+Rnd*6), 1)
  32.   NEXT t
  33.   Cell.String = s
  34.   Cell.CharHeight = h
  35.   Cell.CharColor = RGB(255-r, 255-g, 255-b)
  36. NEXT y
  37. NEXT x
  38. End Sub
RAW Paste Data
Top