Kind help with two examples to do metapost and metaobj in latex running from Texicenter.
what packages to include and program two examples
I read through book not able to understand.
First
input metafun
draw fulldiamond scaled 1cm withcolor blue;
second
input metaobj
nczigzag(a)(b);
nczigzag(a)(b)
"angleA(-90)","angleB(120)",
"linetension(0.8)","coilwidth(2mm)",
"linearc(0.1mm)";
drawObj(a,b);
Below code not working help
\documentclass{article}
\usepackage{luamplib}
\begin{document}
\begin{mplibcode}
input test.mp
\end{mplibcode}
\end{document}
where test.mp
beginfig(1) ;
draw fulldiamond scaled 1cm withcolor blue ;
endfig ;
end ;
Then ran it in in LuLatex but errors and output not coming
second if in the above in above instead of test.mp as above code
if we have test.mp
as
input metaobj
beginfig(1) ;
newCircle.a(btex A etex) ;
newCircle.b(btex B etex) ;
a.c=origin ;
b.c=(3cm,2cm) ;
nczigzag(a)(b) ;
nczigzag(a)(b) "angleA(-90)","angleB(120)",
"linetension(0.8)",
"coilwidth(2mm)", "linearc(0.1mm)" ;
drawObj(a,b) ;
endfig ;
end ;
How to run without errors Kind help