Hilbert curve: Difference between revisions

Content deleted Content added
Line 429: Line 429:
-- Or the characters for ASCII line drawing
-- Or the characters for ASCII line drawing
function charor(c1, c2)
function charor(c1, c2)
local bits={
local bits={ [" "]=0x0, [""]=0x3, [""]=0x5, [""]=0x6, [""]=0x7, [""]=0x9,
[""]=0xa, [""]=0xb, [""]=0xc, [""]=0xd, [""]=0xe, [""]=0xf,}
[" "]=0x0, ["╷"]=0x1, [""]=0x2, [""]=0x3, [""]=0x4, [""]=0x5, [""]=0x6, [""]=0x7,
["╴"]=0x8, [""]=0x9, [""]=0xa, [""]=0xb, [""]=0xc, [""]=0xd, [""]=0xe, ["┼"]=0xf,}
local char={" ", "╷", "╶", "┌", "╵", "│", "└", "├", "╴", "┐", "─", "┬", "┘", "┤", "┴", "┼",}
local char={" ", "╷", "╶", "┌", "╵", "│", "└", "├", "╴", "┐", "─", "┬", "┘", "┤", "┴", "┼",}
local b1,b2=bits[c1] or 0,bits[c2] or 0
local b1,b2=bits[c1] or 0,bits[c2] or 0