On Jan 5, 2015, at 5:51 AM, Hans Hagen pra...@wxs.nl mailto:pra...@wxs.nl
wrote:
On 1/4/2015 6:04 AM, Akira Kakuto wrote:
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
On 1/4/2015 6:04 AM, Akira Kakuto wrote:
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
On Jan 4, 2015, at 6:00 AM, ntg-context-requ...@ntg.nl wrote:
Dear John,
How to make this a polygon?
An example:
Many thanks to you Akira.
Reading the file into lua tables is good sense, and thank you for the string
manipulations to pass to metafun().
From your teaching I changed this
I seek how to use context-lua to draw a path from ‘points’ in an external file.
Below is one way to plot points from an external file, call the file DATA with
contents:
1 3
-2 2
-3 -1
3 -2
\starttext
\startluacode
local metafun = context.metafun
metafun.start()
io.input(“DATA)
while true do
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