我想要一个虚线圆,其中基站通常处于块状,非虚线。
\documentclass[tikz]{standalone}
\usetikzlibrary{calc}
\usetikzlibrary{decorations.pathreplacing,decorations.markings,shapes.geometric}
\tikzset{naming/.style={align=center,font=\small}}
\tikzset{antenna/.style={insert path={-- coordinate (ant#1) ++(0,0.25) -- +(135:0.25) + (0,0) -- +(45:0.25)}}}
\tikzset{station/.style={naming,draw,shape=dart,shape border rotate=90, minimum width=1mm, minimum height=1mm,outer sep=0pt,inner sep=1mm}}
\tikzset{radiation/.style={{decorate,decoration={expanding waves,angle=90,segment length=4pt}}}}
\newcommand{\BS}[1]{%
\begin{tikzpicture}
\node[station] (base) {#1};
\draw[line join=bevel] (base.100) -- (base.80) -- (base.110) -- (base.70) -- (base.north west) -- (base.north east);
\draw[line join=bevel] (base.100) -- (base.70) (base.110) -- (base.north east);
\draw[line cap=rect] ([yshift=0pt]base.north) [antenna=1];
\end{tikzpicture}
}
\begin{document}
\begin{tikzpicture}
\node[draw, shape = circle, minimum size=1cm] at (0,2) {\BS{\tiny SBS}};
\end{tikzpicture}
\end{document}
答案1
您可以设置天线的solid
样式station
和命令的绘图\BS
。
\documentclass[tikz]{standalone}
\usetikzlibrary{calc}
\usetikzlibrary{decorations.pathreplacing,decorations.markings,shapes.geometric}
\tikzset{naming/.style={align=center,font=\small}}
\tikzset{antenna/.style={insert path={-- coordinate (ant#1) ++(0,0.25) -- +(135:0.25) + (0,0) -- +(45:0.25)}}}
\tikzset{station/.style={solid,naming,draw,shape=dart,shape border rotate=90, minimum width=1mm, minimum height=1mm,outer sep=0pt,inner sep=1mm}}
\tikzset{radiation/.style={{decorate,decoration={expanding waves,angle=90,segment length=4pt}}}}
\newcommand{\BS}[1]{%
\begin{tikzpicture}
\node[station] (base) {#1};
\draw[solid,line join=bevel] (base.100) -- (base.80) -- (base.110) -- (base.70) -- (base.north west) -- (base.north east);
\draw[solid,line join=bevel] (base.100) -- (base.70) (base.110) -- (base.north east);
\draw[solid,line cap=rect] ([yshift=0pt]base.north) [antenna=1];
\end{tikzpicture}
}
\begin{document}
\begin{tikzpicture}
\node[draw, shape = circle, minimum size=1cm,dashed] at (0,2) {\BS{\tiny SBS}};
\end{tikzpicture}
\end{document}