我熟悉在 tikzcd 中绘制箭筒/AR 箭筒,但在 Ralf Schiffler 2014 年的文本中,他利用正多边形构造 An 或 Dn 类型的 AR 箭筒。我想知道是否有人对复制这些类型的图表有任何不错的见解。抱歉只有两张截图。第一张图片是 An 类型:
编辑:为了澄清我所寻找的内容,最好能得到完整的第一张图。如果有人知道如何制作第二张图,那也很好。我已将我目前对第一份文档的尝试附在下面。
\documentclass[]{standalone}
\usepackage{tikz}
\usetikzlibrary{cd}
\usetikzlibrary{shapes.geometric}
\def\oct{\draw(A) -- (B) -- (C) -- (D) -- (E) -- (F) -- (G) -- (H) --cycle;}
\newcommand{\slice}[1]{\oct \draw \foreach \x/\y in {#1} {(\x)--(\y)};}
\begin{document}
\[\begin{tikzpicture}[scale=0.25]
% define base octagon
\coordinate (A) at (1, 2.414213562);
\coordinate (B) at (-1, 2.414213562);
\coordinate (C) at (-2.414213562, 1);
\coordinate (D) at (-2.414213562, -1);
\coordinate (E) at (-1, -2.414213562);
\coordinate (F) at (1, -2.414213562);
\coordinate (G) at (2.414213562, -1);
\coordinate (H) at (2.414213562, 1);
% present octagons with respective diagonals, in the Auslander-Reiten quiver
\begin{tikzcd}[row sep=small, column sep=small, ampersand replacement=\&]
\&\& \slice{A/G} \&\& \slice{B/H} \&\& \\
\& \slice{A/F} \&\& \slice{B/G} \&\& \slice{C/H} \& \\
\&\& \slice{B/F} \&\& \slice{C/G} \&\& \slice{D/H} \\
\& \slice{B/E} \&\& \slice{C/F} \&\& \slice{D/G} \& \\
\slice{B/D} \&\& \slice{C/E} \&\& \slice{D/F} \&\& \slice{E/G}
\end{tikzcd}
\end{tikzpicture}\]
\end{document}
我应该提到,在上面绘制的 AR 箭筒中,我还没有画出八边形节点之间的箭头。
答案1
欢迎来到 TeX.SE!!!
这是您第一张图片的解决方案。它创建了一个\pic
绘制八边形并在其中放置一些坐标(顶点和基点)的图。然后在图中用tikzpicture
循环重复\foreach
八边形和连接它们的箭头。我还使用比例和旋转来简化数字。
像这样:
\documentclass[border=2mm,tikz]{standalone}
\tikzset
{% OCTAGON
pics/octa/.style n args={3}{% #1 name, #2 fist point, #3 second point
code={%
\def\l{0.5}
\draw (22.5:\l) coordinate (1) -- (67.5:\l) coordinate (2) -- (112.5:\l) coordinate (3) --
(157.5:\l) coordinate (4) -- (202.5:\l) coordinate (5) -- (247.5:\l) coordinate (6) --
(292.5:\l) coordinate (7) -- (337.5:\l) coordinate (8) -- cycle;
\draw (#2) -- (#3);
\coordinate (#1-NW) at (45:1.5*\l);
\coordinate (#1-NE) at (135:1.5*\l);
\coordinate (#1-SE) at (225:1.5*\l);
\coordinate (#1-SW) at (315:1.5*\l);
}},
}
\begin{document}
\begin{tikzpicture}[rotate=45,scale=2.5]
\foreach\i in {4}
\pgfmathtruncatemacro\j{mod(\i+3,8)+1}
\pic at (\i,1) {octa={1\i}{6}{\j}};
\foreach\i in {3,4,5}
\pgfmathtruncatemacro\j{mod(\i+3,8)+1}
\pic at (\i,2) {octa={2\i}{5}{\j}};
\foreach\i in {2,...,5}
\pgfmathtruncatemacro\j{mod(\i+3,8)+1}
\pic at (\i,3) {octa={3\i}{4}{\j}};
\foreach\i in {1,...,5}
\pgfmathtruncatemacro\j{mod(\i+3,8)+1}
\pic at (\i,4) {octa={4\i}{3}{\j}};
\foreach\i in {3,4}
\pgfmathtruncatemacro\j{mod(\i+3,8)+1}
\pic at (\i,5) {octa={5\i}{2}{\j}};
\foreach\i in {23,24,32,33,34,41,42,43,44,53}
\pgfmathtruncatemacro\j{\i+1}
\draw[-latex] (\i-NW) -- (\j-SE);
\foreach\i in {24,33,34,35,42,43,44,45,53,54}
\pgfmathtruncatemacro\j{\i-10}
\draw[-latex] (\i-SW) -- (\j-NE);
\end{tikzpicture}
\end{document}