Guest User

Untitled

a guest
Dec 27th, 2017
133
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. REM  *****  BASIC  *****
  2.  
  3. Dim Doc As Object
  4. Dim Sheet As Object
  5. Dim Cell As Object  
  6.  
  7. Sub Main
  8.     Doc = ThisComponent
  9.     Sheet = Doc.Sheets(0)
  10.     frequency = 0.3
  11.     For r = 0 To 38
  12.         For c = 0 to 10
  13.             cell = Sheet.getCellByPosition(c, r)
  14.            
  15.             cell_red = Sin(frequency*(r-c) + 0) * 127 + 128
  16.             cell_green = Sin(frequency*(r-c) + 2) * 127 + 128
  17.             cell_blue = Sin(frequency*(r-c) + 4) * 127 + 128
  18.            
  19.             cell.CellBackColor = RGB(cell_red,cell_green,cell_blue)
  20.         Next c
  21.     Next r
  22. End Sub
RAW Paste Data