我使用两种方法绘制了以下序列(a+(-1)^n/n
)tikz
:
第一种方式,有真实的视角,但它的输出很长 (scale = 60)
\documentclass[tikz,border=2mm]{standalone}
\begin{document}
\begin{tikzpicture}[scale=60]
\foreach \n in {5,6,...,15}
{
\pgfmathsetmacro{\mya}{1-1/(2*\n-1)}
\pgfmathsetmacro{\myb}{1+1/(2*\n)}
\draw({1-1/(2*\n+1)},0)node (a\n)[fill, circle, inner sep = 1pt]{};
\draw({1+1/(2*\n)},0)node(b\n)[fill, circle, inner sep = 1pt]{};
}
\draw(0,0)--(2,0)node[pos=0.5,fill, circle , inner sep = 1pt]{}node[pos=0.5,below]{$a$};
\draw (a5)node[below]{$a_{50}$};
\draw (a6)node[below]{$a_{52}$};
\draw (a7)node[below]{$a_{54}$};
\draw (b5)node[below]{$a_{51}$};
\draw (b6)node[below]{$a_{53}$};
\draw (b7)node[below]{$a_{55}$};
\end{tikzpicture}
\end{document}
第二种方法是通过在处添加非精确节点来绘制pos=t
:
\documentclass[tikz,border=2mm]{standalone}
\begin{document}
\draw (-5,0)node(a)[]{\Huge$($}-- (5,0)node(b)[]{\Huge$)$}node(a1)[pos=0.1,circle, fill, inner
sep = 1pt]{}
node(a2)[pos=0.2,circle, fill, inner sep = 1pt]{}node(a3)[pos=0.28,circle, fill, inner sep = 1pt]{}
node[pos=0.34,circle, fill, inner sep = 1pt]{}node[pos=0.38,circle, fill, inner sep = 1pt]{}
node(b1)[pos=0.9,circle, fill, inner sep = 1pt]{}
node(b2)[pos=0.8,circle, fill, inner sep = 1pt]{}node(b3)[pos=0.72,circle, fill, inner sep = 1pt]{}
node[pos=0.66,circle, fill, inner sep = 1pt]{}node[pos=0.62,circle, fill, inner sep = 1pt]{}node(c)[pos=0.5,circle, fill, inner sep = 1pt]{};
\draw (a1) node[below]{$a_{50}$}
(a2) node[below]{$a_{52}$}
(a3) node[below]{$a_{54}$}
(b1) node[below]{$a_{51}$}
(b2) node[below]{$a_{53}$}
(b3) node[below]{$a_{55}$}
(c) node[below]{$a$};
\end{tikzpicture}
\end{document}
是否有合适的方法来绘制这个序列?