我想将 tikzlibrary math 与 mercatormap 包结合起来,但这不再起作用了。下面的代码运行良好(实际上编写函数是有意义的。它是动画的一部分。)但是当你取消注释 mercatormap 时,它就会挂断 pdflatex。
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{math}
%\usepackage{mercatormap}
%\mrcactivatescript% activates Python script
\begin{document}
\tikzmath{
real \x, \y, \z, \xr, \yr, \zr, \xp, \yp, \zp;
\x=0;
\y=0.25;
\z=0.25;
function xrot(\ix,\iy,\iz,\ang){
return cos(\ang)*\ix+sin(\ang)*\iy;
};
function yrot(\ix,\iy,\iz,\ang){
return -sin(\ang)*\ix+cos(\ang)*\iy;
};
function zrot(\ix,\iy,\iz,\ang){
return \iz;
};
function xproj(\ix,\iy,\iz){
return -3;
};
function yproj(\ix,\iy,\iz){
return -4/(\ix-1)*\iy;
};
function zproj(\ix,\iy,\iz){
return -4/(\ix-1)*\iz;
};
}
\begin{tikzpicture}
\tikzmath{
\xr = xrot(\x,\y,\z,6);
\yr = yrot(\x,\y,\z,6);
\zr = zrot(\x,\y,\z,6);
\xp = xproj(\xr,\yr,\zr);
\yp = yproj(\xr,\yr,\zr);
\zp = zproj(\xr,\yr,\zr);
}
\draw (-2,-2) -- (-2,2) -- (2,2) -- (2,-2) -- cycle;
\node (pppp) at (\yp,\zp) {};
\filldraw [blue] (pppp) circle [radius=1.5pt];
\node (t) at (3.11,0) {};
\end{tikzpicture}
\end{document}
我在其他地方使用 mercatormap。有什么想法吗?