4 Jan
2015
4 Jan
'15
5:04 a.m.
Dear John,
How to make this a polygon?
An example: \starttext \startluacode local metafun = context.metafun metafun.start() io.input("DATA") local i, j local x, y, s, t1, t2 i = 1 x={} y={} s="draw " while true do x[i], y[i] = io.read("*n", "*n") if not x[i] then break end metafun("filldraw fullcircle scaled 2mm shifted(%dcm,%dcm);",x[i],y[i]) i = i + 1 end i = i - 1 for j = 1, i do t1 = tostring(x[j]) t2 = tostring(y[j]) s = s.."("..t1.."cm,"..t2.."cm)--" end t1 = tostring(x[1]) t2 = tostring(y[1]) s = s.."("..t1.."cm,"..t2.."cm)" s = s.." withpen pencircle scaled 1bp;" metafun(s) metafun.stop() \stopluacode \stoptext Best, Akira