Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
-- This file:
--   http://angg.twu.net/LATEX/2021repl-pict.lua.html
--   http://angg.twu.net/LATEX/2021repl-pict.lua
--           (find-angg "LATEX/2021repl-pict.lua")
-- Author: Eduardo Ochs <eduardoochs@gmail.com>
--
-- (defun e () (interactive) (find-LATEX "2021repl-pict.tex"))
-- (defun l () (interactive) (find-LATEX "2021repl-pict.lua"))
-- (find-esgrep "grep --color -nH --null -e 2021repl-pict *.e")


loaddednat6()
require "edrxpict" -- (find-LATEX "edrxpict.lua")

-- (find-LATEX "edrxpict.lua" "pictbounds")
LPicture.__index.pictbounds = function (lp, p1, p2, e)
    pictbounds(p1, p2, e)
    lp:addpoint(pictp0)
    lp:addpoint(pictp3)
    return lp
  end
-- (find-LATEX "edrxpict.lua" "pictaxes")
LPicture.__index.drawaxes = function (lp, p1, p2)
    lp.latex = lp.latex..pictaxes(p1, p2).."\n"
    return lp
  end
-- (find-LATEX "edrxpict.lua" "pictgrid")
LPicture.__index.drawgrid = function (lp, p1, p2)
    local grid = pictgrid(p1, p2).."\n"
    local grid = wr("{\\color{GrayPale}\n", "}\n") * grid
    lp.latex = lp.latex..grid
    return lp
  end
-- (find-LATEX "edrxpict.lua" "pictdots")
LPicture.__index.pictdots = function (lp, str)
    lp.latex = lp.latex..pictdots(str).."%\n"
    return lp
  end
-- (find-LATEX "edrxpict.lua" "Piecewise-tests")
LPicture.__index.pictpiecewise = function (lp, str)
    lp:addtex(pictpiecewise(str))
    return lp
  end
-- (find-LATEX "edrxtikz.lua" "Ellipse")
LPicture.__index.ellipse = function (lp, C0, uu, vv, n, a, b)
    if type(uu) == "number" then uu = v(uu, 0) end
    if type(vv) == "number" then vv = v(0, vv) end
    local e = Ellipse.new(C0, uu, vv)
    lp:addtex(e:pict(n or 48, a, b))
    return lp
  end


--[==[
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
dofile "2021repl-pict.lua"
lp = LPicture.new {scale="20pt", meta="b"}
lp = LPicture.new {scale="5pt", meta=""}
lp = LPicture.new {scale="20pt", meta=""}
lp:pictbounds(v(-1,-1), v(3,2))
lp:drawgrid()
lp:drawaxes()
lp:ellipse(v(2,1), v(2,0), v(0,1))
lp:ellipse(v(2,1), 0.5, 1)

metaopts["raw"] = {novcenter = 1}

lp2 = LPicture.new {scale="20pt", meta="raw"}
lp2:pictbounds(v(-0,0), v(0,0), 0)
lp2:ellipse(v(0,0), 0.1, 0.1)
= lp2:tolatex()
lp:rawput(v(1.0,0.0), lp2:tolatex())

= lp

repltexthis(lp:tolatex())
* (ce)


e = Ellipse.new(v(2,1), v(2,0), v(0,1))
= e:points(48)
= e:pict()
lp:addtex(e:pict(48))
= lp

repltexthis(lp:tolatex())
* (ce)

-- (find-es "tex" "pict2e")

--]==]



-- (c2m202somas2p 19 "exemplao")
-- (c2m202somas2     "exemplao")
-- (c2m202somas2     "exemplao" "\\polygon*")


--[==[
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
dofile "2021repl-pict.lua"
lp = LPicture.new {scale="20pt", meta="b"}
lp = LPicture.new {scale="5pt", meta=""}
lp = LPicture.new {scale="20pt", meta=""}
lp:pictbounds(v(-1,-1), v(3,2))
lp:drawgrid()
lp:drawaxes()
= lp
lp:pictdots("0,1 1,0 1,1")
= lp
lp:addtex [[{\color{red}]]
lp:pictdots("2,0")
lp:addtex [[}]]
= lp

repltexthis(lp:tolatex())
* (ce)

lp = LPicture.new {scale="5pt", meta=""}
lp:pictbounds(v(-1,-1), v(5,4))
lp:drawgrid()
lp:drawaxes()
lp:pictpiecewise "(0,1)o--(1,1)o (1,2)c (1,3)o--(2,3)c--(3,2)--(4,2)c"
= lp

repltexthis(lp:tolatex())
* (ce)

PPV(LPicture.__index)

--]==]




--[[
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
dofile "2021repl-pict.lua"
-- require "picture.lua"
lp = LPicture.new {cellfont="\\scriptsize"}
lp = LPicture.new {cellfont="\\scriptsize", meta="b"}
for l=0,2 do
  for r=0,3 do
    local pos=lr(l, r)
    lp:put(pos, pos:xy())
  end
end
= lp
= lp:tolatex()
repltexthis(lp:tolatex())

--]]