绘制无限图

绘制无限图

我想使用 tikz 段落绘制一个无限图形,如下图所示在此处输入图片描述

但我找不到类似的东西。

答案1

一个可能的解决方案是使用tikzpackage

在此处输入图片描述

代码

\documentclass[border=1cm]{standalone}
\usepackage{tikz,amsmath}
\usetikzlibrary{positioning,arrows,calc}
\begin{document}
\begin{tikzpicture}
\draw[<->,>=latex'] (0,1)--(9,1);
\draw[<->,>=latex'] (0,0)--(9,0);
\draw (4.5,3) node[circle,fill, inner sep=2pt](v){}node[above=1pt]{$v$};
\draw (5,-2) node[circle, draw, fill=white,inner sep=2pt](vv){};
\foreach \i in {1,2,...,8}{
\draw (\i,1) node [circle,fill, inner sep=2pt] {};
\draw (\i,0) node [circle,fill, inner sep=2pt] {};
\draw (\i,1)--(\i,0);
}
\foreach \i/\j in {0/1.2,1/1,2/1,3/1,4/1}{
\draw (v) edge[out=180,in=90] (\i,\j);
}
\foreach\i/\j in {5/1,6/1,7/1,8/1,9/1.3}{
\draw (v) edge[out=0,in=90] (\i,\j);
}
\draw (0.7,2) node(){$\mathbf\cdots$};
\draw (8.1,2) node(){$\mathbf\cdots$};
\begin{scope}[shift={(0.5,0.5)}]
\draw[<->,>={open triangle 45},dashed] (0,1)--(9,1);
\draw[<->,>={open triangle 45},dashed] (0,0)--(9,0);

\foreach \i/\j in {0/-1,1/0,2/0,3/0,4/0}{
\draw[dashed] (vv) edge[out=180,in=-90] (\i,\j);
}

\foreach\i/\j in {5/0,6/0,7/0,8/0,9/-1}{
\draw[dashed] (vv) edge[out=0,in=-90] (\i,\j);
}
\foreach \i in {1,2,...,8}{
\draw[dashed] (\i,1)--(\i,0);
\draw (\i,1) node [circle, draw, fill=white,inner sep=2pt] {};
\draw (\i,0) node [circle, draw, fill=white,inner sep=2pt] {};
}
\draw (0.7,-1.5) node(){$\mathbf\cdots$};
\draw (8.1,-1.5) node(){$\mathbf\cdots$};
\end{scope}
\end{tikzpicture}
\end{document}

相关内容