Advertisement
Guest User

lj.lua

a guest
Sep 27th, 2015
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. local component = require("component")
  2. local keyboard = require("keyboard")
  3. local shell = require("shell")
  4. local gpu = component.gpu
  5. local hologram = component.hologram
  6. local w, h = gpu.getResolution()
  7.  
  8. function round(num, idp)
  9.   local mult = 10^(idp or 0)
  10.   return math.floor(num * mult + 0.5 ) / mult
  11. end
  12.  
  13. hologram.clear()
  14. gpu.fill(1,1,w,h, " ")
  15. gpu.setForeground(0xFFFFFF)
  16. gpu.setBackground(0x000000)
  17.  
  18. --for x = 1, 48 do
  19. --  for z = 1, 48 do
  20. --    for y = 19, 20 do
  21. --      hologram.set(20, 20, 20, 2)
  22. --    end
  23. --  end
  24. --end
  25.  
  26. h = 24
  27. k = 17
  28. r = 15
  29. step = 1
  30.  
  31. --hologram.fill(1,1,1,48,2)
  32.  
  33. for theta = 1, 360, step do
  34.   x = h + r * math.cos(theta)
  35.   y = k + r * math.sin(theta)
  36.   --print("x: " .. x .. " y:" .. y)
  37.   --gpu.set(x, y, "X")
  38.   hologram.set(x, y, 20, 2)
  39.  
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement