SHOW:
|
|
- or go back to the newest paste.
| 1 | - | local component = require("component") |
| 1 | + | local component = require("component")
|
| 2 | - | local keyboard = require("keyboard") |
| 2 | + | local keyboard = require("keyboard")
|
| 3 | - | local shell = require("shell") |
| 3 | + | local shell = require("shell")
|
| 4 | - | local gpu = component.gpu |
| 4 | + | local hologram = component.hologram |
| 5 | - | local hologram = component.hologram |
| 5 | + | |
| 6 | - | local w, h = gpu.getResolution() |
| 6 | + | hologram.clear() |
| 7 | - | |
| 7 | + | |
| 8 | - | function round(num, idp) |
| 8 | + | h = 24 |
| 9 | - | local mult = 10^(idp or 0) |
| 9 | + | k = 17 |
| 10 | - | return math.floor(num * mult + 0.5 ) / mult |
| 10 | + | r = 12 |
| 11 | - | end |
| 11 | + | step = 1 -- not used |
| 12 | - | |
| 12 | + | |
| 13 | - | hologram.clear() |
| 13 | + | for theta = 1, 360 do |
| 14 | - | gpu.fill(1,1,w,h, " ") |
| 14 | + | x = h + r * math.cos(theta) |
| 15 | - | gpu.setForeground(0xFFFFFF) |
| 15 | + | y = k + r * math.sin(theta) |
| 16 | - | gpu.setBackground(0x000000) |
| 16 | + | --print("x: " .. x .. " y:" .. y)
|
| 17 | - | |
| 17 | + | hologram.set(x, y, h, 2) |
| 18 | - | --for x = 1, 48 do |
| 18 | + | end |