Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local keyboard = require("keyboard")
- local shell = require("shell")
- local hologram = component.hologram
- hologram.clear()
- --hologram.set(x, y, 20, 2)
- local r = 10 -- radius
- local lats = 20 -- latitude
- local longs = 20 -- longitudee
- for i = 0, lats do
- lat0 = math.pi * (-0.5 + (i - 1) / lats)
- z0 = math.sin(lat0)
- zr0 = math.cos(lat0)
- lat1 = math.pi * (-0.5 + i / lats)
- z1 = math.sin(lat1)
- zr1 = math.cos(lat1)
- for j = 0, longs do
- lng = 2 * math.pi * (j - 1) / longs
- x = math.cos(lng)
- y = math.sin(lng)
- HologramSet(x * zr0, y * zr0, z0)
- HologramSet(x * zr1, y * zr1, z1)
- end
- end
- function HologramSet(x, y, z)
- hologram.set(x,y,z,2)
- print("x= " .. x .. " y= " .. y .. " z= " .. z)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement