Hilbert curve: Difference between revisions

m
Line 429:
-- Or the characters for ASCII line drawing
function charor(c1, c2)
local bits={
local bits={ [" "]=0x0, ["┌"]=0x3, ["│"]=0x5, ["└"]=0x6, ["├"]=0x7, ["┐"]=0x9,
[" "]=0x0, ["╷"]=0x1, [""]=0xa0x2, [""]=0xb0x3, [""]=0xc0x4, [""]=0xd0x5, [""]=0xe0x6, [""]=0xf0x7,}
local bits ["╴"]={0x8, [" "]=0x00x9, [""]=0x30xa, [""]=0x50xb, [""]=0x60xc, [""]=0x70xd, [""]=0x90xe, ["┼"]=0xf,}
local char={" ", "╷", "╶", "┌", "╵", "│", "└", "├", "╴", "┐", "─", "┬", "┘", "┤", "┴", "┼",}
local b1,b2=bits[c1] or 0,bits[c2] or 0