Hilbert curve: Difference between revisions
Content added Content deleted
Line 429: | Line 429: | ||
for c in s:gmatch(".") do |
for c in s:gmatch(".") do |
||
if c=="F" then |
if c=="F" then |
||
if scr[y]==nil then |
if scr[y]==nil then scr[y]={} end |
||
scr[y][x]=char[dir+1][turn%#char[1]+1] |
scr[y][x]=char[dir+1][turn%#char[1]+1] |
||
dir = (dir+turn) % (#move) |
dir = (dir+turn) % (#move) |