Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local scr_x, scr_y = term.getSize()
- local doit = function(move)
- if not move then move = 0 end
- local res1,res2
- for a = 1, scr_y do
- for b = 1, scr_x do
- local x = b+math.floor(scr_x/2)
- local y = a-math.ceil(scr_y/2)
- res1 = math.abs( math.floor(math.sin((x/7)+move)*6) - y ) <= 2
- term.setCursorPos(b,a)
- if res1 then
- term.blit(" ","7","7")
- else
- term.write(" ")
- end
- res2 = math.abs( math.floor(math.cos((x/4)+(move*4))*3) - y+2 ) <= 1
- term.setCursorPos(b,a)
- if res2 then
- term.blit(" ","8","8")
- else
- if not res1 then
- if (x % 2 == 0) and ((y+math.floor(move*-10)+(x % 5)) % 5 <= 1) then
- term.blit("|","7","f")
- else
- term.write(" ")
- end
- end
- end
- end
- end
- end
- while true do
- for a = 1, 900 do
- --term.clear()
- doit(a/10)
- sleep(0.05)
- end
- end
Add Comment
Please, Sign In to add comment