我正在尝试寻找类型李代数的根系统的 TikZ 代码$G_2$
。
(参考:http://en.wikipedia.org/wiki/File:Root_system_G2.svg)
如果有人能给我提供代码或参考,我将非常感激。
答案1
\documentclass[tikz,border=4mm]{standalone}
\begin{document}
\begin{tikzpicture}
\foreach\ang in {60,120,...,360}{
\draw[->,blue!80!black,thick] (0,0) -- (\ang:2cm);
}
\foreach\ang in {30,90,...,330}{
\draw[->,blue!80!black,thick] (0,0) -- (\ang:3cm);
}
\draw[magenta,->](1,0) arc(0:150:1cm)node[pos=0.1,right,scale=0.5]{$5\pi/6$};
\node[anchor=south west,scale=0.6] at (2,0) {$\alpha$};
\node[anchor=north,scale=0.6] at (1,3) {$G_{2}$};
\end{tikzpicture}
\end{document}
答案2
另一个tikz
具有不同重点并带有一些评论的解决方案:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}% arrow tip library
\usetikzlibrary{bending}% better arrow head for bended lines
\begin{document}
\begin{tikzpicture}[
% arrow heads for all lines (with narrower arrow head width)
-{Straight Barb[bend,
width=\the\dimexpr10\pgflinewidth\relax,
length=\the\dimexpr12\pgflinewidth\relax]},
]
% straight arrows
\foreach \i in {0, 1, ..., 5} {
\draw[thick, blue] (0, 0) -- (\i*60:2);
\draw[thick, blue] (0, 0) -- (30 + \i*60:3.5);
}
% arc arrow
\draw[thin, red] (1.5, 0) arc[radius=1.5, start angle=0, end angle=5*30];
% annotations
\node[right] at (2, 0) {$\alpha$};
\node[above left, inner sep=.2em] at (5*30:3.5) {$\beta$};
\node[right] at (15:1.5) {$5\pi/6$};
\node at (1.5, 3) {$G_2$};
\end{tikzpicture}
\end{document}
答案3
PSTricks 解决方案:
\documentclass{article}
\usepackage{multido,pstricks}
\begin{document}
\begin{pspicture}(-2.85,-3)(2.6,3)
\SpecialCoor
\multido{\iA = 0+60, \iB = 30+60}{6}{%
{\psset{arrows = ->, linewidth = 1.5\pslinewidth, linecolor = blue}
\rput{\iA}(0,0){\psline(0,0)(2,0)}
\rput{\iB}(0,0){\psline(0,0)(3,0)}}}
\psarc[linecolor = red]{->}{1.5}{0}{150}
\rput(3;60){$G_{2}$}
{\small
\rput(2;15){$5\pi/6$}
\rput(2.2;0){$\alpha$}
\rput(3.2;150){$\beta$}}
\end{pspicture}
\end{document}