Как сделать эту 3D-диаграмму с помощью Tikz?

Как сделать эту 3D-диаграмму с помощью Tikz?

Я хотел бы включить эту диаграмму в свою работу.

введите описание изображения здесь

Однако я не знаю, как начать, поскольку я никогда не использовал tikz, а только более скромный tikzcd для моих коммутативных диаграмм. Я должен указать на три вещи, о которых я абсолютно не имею представления, как их ввести в какую-либо диаграмму:

  • На диаграмме изображен круг с цифрой 1 внутри. Он должен быть там, где он есть, и таким, какой он есть.
  • Стрелки
  • Если вы заметили, элементы грани, которая встречается с обоими кубами, имеют некоторый наклон, так что они параллельны соответствующим линиям. Было бы круто эмулировать этот эффект.

Я знаю, что это обычное дело — выкладывать код того, что пытался сделать тот, кто задал вопрос, но в моем случае у меня нет абсолютно никакого опыта работы с tikz...

Извините за неудобства и спасибо.

решение1

Первая попытка. Не очень красивый код, но работает с использованием 3dбиблиотеки.

\documentclass{standalone}
\newcommand{\Tcall}{\mathcal{T}}
\newcommand{\Scall}{\mathcal{S}}
\usepackage{tikz}
\usetikzlibrary{3d,positioning}
\begin{document}
\begin{tikzpicture}[z={(10:10mm)},x={(-45:5mm)}]
\def\step{2cm}
\begin{scope}[canvas is zy plane at x=-2]
\node(fGs){$\Gamma(\overline{\Scall})$};
\node[right=\step of fGs,transform shape](H1MS) {$H^1(M,\Scall)$};
\node[right=\step of H1MS,transform shape] (f0) {$0$};
\node[right=\step of f0,transform shape] (v1) {};

\node[below=\step of fGs](fG) {$\Gamma(\Scall)$};
\node[right=\step of fG,transform shape](H1MSs) {$\tilde{H}^1(M,\Scall)$};
\node[right=\step of H1MSs,transform shape] (s0) {$0$};
\node[right=\step of s0,transform shape] (v2) {};

\draw[->,transform shape] (fGs) -- (H1MS);
\draw[->,transform shape] (H1MS) -- (f0);
\draw (f0) -- (v1);
\draw[->,transform shape] (fGs) -- (fG);

\draw[->,transform shape] (fG) -- (H1MSs);
\draw[->,transform shape] (H1MSs) -- (s0);
\draw (s0) -- (v2);
\draw[->,transform shape] (H1MS) -- (H1MSs);
\draw[->,transform shape] (f0) -- (s0);
\end{scope}

\begin{scope}[canvas is zy plane at x=2]
\node(fIs){$\Gamma(\overline{\Tcall})$};
\node[right=\step of fIs,transform shape](H1MI) {$H^1(M,\Tcall)$};
\node[right=\step of H1MI,transform shape] (t0) {$0$};
\node[right=\step of t0,transform shape] (v3) {};

\node[below=\step of fIs](fI) {$\Gamma(\Tcall)$};
\node[right=\step of fI,transform shape](H1MIs) {$\tilde{H}^1(M,\Tcall)$};
\node[right=\step of H1MIs,transform shape] (fo0) {$0$};
\node[right=\step of fo0,transform shape] (v4) {};

\draw[->,transform shape] (fIs) -- (H1MI);
\draw[->,transform shape] (H1MI) -- (t0);
\draw (t0) -- (v3);
\draw[->,transform shape] (fIs) -- (fI);

\draw[->,transform shape] (fI) -- (H1MIs);
\draw[->,transform shape] (H1MIs) -- (fo0);
\draw (fo0) -- (v4);
\draw[->,transform shape] (H1MI) -- (H1MIs);
\draw[->,transform shape] (t0) -- (fo0);
\end{scope}

\draw[->] (fGs) -- (fIs);
\draw[->] (fG) -- (fI);
\draw[->] (H1MS) -- (H1MI);
\draw[->] (H1MSs) -- (H1MIs);
\draw[->] (f0) -- (t0);
\draw[->] (s0) -- (fo0);


\path (H1MS) -- (H1MIs) node[midway, circle, inner sep=0pt,draw] {1}; 
\end{tikzpicture}
\end{document}

введите описание изображения здесь

Небольшое улучшение

\documentclass{standalone}
\newcommand{\Tcall}{\mathcal{T}}
\newcommand{\Scall}{\mathcal{S}}
\usepackage{tikz}
\usetikzlibrary{3d,positioning,decorations.markings}
\begin{document}
\begin{tikzpicture}[z={(10:10mm)},x={(-45:5mm)},
decoration={markings,
mark=at position .65 with {\arrow[transform shape]{latex}}},
conn/.style={thick,postaction={decorate}}]
\def\step{2cm}
\begin{scope}[canvas is zy plane at x=-2]
\node(fGs){$\Gamma(\overline{\Scall})$};
\node[right=\step of fGs,transform shape](H1MS) {$H^1(M,\Scall)$};
\node[right=\step of H1MS,transform shape] (f0) {$0$};
\node[right=\step of f0,transform shape] (v1) {};

\node[below=\step of fGs](fG) {$\Gamma(\Scall)$};
\node[right=\step of fG,transform shape](H1MSs) {$\tilde{H}^1(M,\Scall)$};
\node[right=\step of H1MSs,transform shape] (s0) {$0$};
\node[right=\step of s0,transform shape] (v2) {};

\draw[conn] (fGs) -- (H1MS);
\draw[conn] (H1MS) -- (f0);
\draw[thick] (f0) -- (v1);
\draw[conn] (fGs) -- (fG);

\draw[conn] (fG) -- (H1MSs);
\draw[conn] (H1MSs) -- (s0);
\draw[thick] (s0) -- (v2);
\draw[conn] (H1MS) -- (H1MSs);
\draw[thick] (f0) -- (s0);
\end{scope}

\begin{scope}[canvas is zy plane at x=2]
\node(fIs){$\Gamma(\overline{\Tcall})$};
\node[right=\step of fIs,transform shape](H1MI) {$H^1(M,\Tcall)$};
\node[right=\step of H1MI,transform shape] (t0) {$0$};
\node[right=\step of t0,transform shape] (v3) {};

\node[below=\step of fIs](fI) {$\Gamma(\Tcall)$};
\node[right=\step of fI,transform shape](H1MIs) {$\tilde{H}^1(M,\Tcall)$};
\node[right=\step of H1MIs,transform shape] (fo0) {$0$};
\node[right=\step of fo0,transform shape] (v4) {};

\draw[conn] (fIs) -- (H1MI);
\draw[conn] (H1MI) -- (t0);
\draw[thick] (t0) -- (v3);
\draw[conn] (fIs) -- (fI);

\draw[conn] (fI) -- (H1MIs);
\draw[conn] (H1MIs) -- (fo0);
\draw[thick] (fo0) -- (v4);
\draw[conn] (H1MI) -- (H1MIs);
\draw[thick] (t0) -- (fo0);
\end{scope}

\draw[conn] (fGs) -- (fIs);
\draw[conn] (fG) -- (fI);
\draw[conn] (H1MS) -- (H1MI);
\draw[conn] (H1MSs) -- (H1MIs);
\draw[thick] (f0) -- (t0);
\draw[thick] (s0) -- (fo0);


\path (H1MS) -- (H1MIs) node[midway, circle, inner sep=0pt,draw] {1}; 
\end{tikzpicture}
\end{document}

введите описание изображения здесь

решение2

Возможность с pst-nodeи pst-arrow:

\documentclass{article}
\usepackage{fourier} 
\usepackage{pst-node, pst-arrow}
\usepackage{auto-pst-pdf}

\begin{document}

\[ \begin{psmatrix}[rowsep=0.6cm, colsep=1.7cm]
& & & [name=0E] 0 & \pnode[0,2.7ex]{IE}\\
    [name=GE]\Gamma(\bar{\mathcal{E}}) & & & & [name=0T] 0 &  \pnode[0,2.7ex]{IT}\\
    & [name=GT]\Gamma(\,\overline{\!\mathcal{T}\!}\,) \\
     & & & [name=0Eb] 0 &  \pnode[0,2.7ex]{IEb} \\
  [name=GEb] \Gamma(\bar{\mathcal{E}}) & & & & [name=0Tb]0 &  \pnode[0,2.7ex]{ITb} \\
    & [name=GTb] \Gamma(\,\overline{\!\mathcal{T}\!}\,)
    \end{psmatrix}
    {\psset{linestyle=none, nrot=:U}%
    \ncline{GE}{0E}\ncput*{\rnode{HE}{H^1(M, \mathcal{E})}}
    \ncline{GT}{0T}\ncput*{\rnode{HT}{H^1(M, \mathcal{T})}}
    \ncline{GEb}{0Eb}\ncput*{\rnode{HEb}{\tilde{H}^1(M, \mathcal{E})}}
    \ncline{GTb}{0Tb}\ncput*{\rnode{HTb}{\tilde{H}^1(M, \mathcal{T})}}
    }%
    \ncline{0E}{0T}\ncline{0T}{0Tb}\ncline{0Tb}{0Eb}\ncline{0E}{0Eb}
    {\psset{nodesepA=1pt} %
    \ncline{0E}{IE}\ncline{0T}{IT} \ncline{0Eb}{IEb}\ncline{0Tb}{ITb}}%
    {\psset{arrowinset=0.12, ArrowInside=->, nodesepB=3pt}%
    \ncline{HE}{0E}
    \ncline{HT}{0T}
    \ncline{HEb}{0Eb}
    \ncline{HTb}{0Tb}
    \psset{ArrowInsidePos=0.66, }
    \ncline{GE}{GEb}\ncline{GEb}{GTb}
    \ncline{GE}{GT}\ncline{GT}{GTb}
    \ncline{HE}{HT}\ncline{HT}{HTb}
    \ncline{HE}{HEb}\ncline{HEb}{HTb}
    }
    \psset{arrows=->}
    \ncline{GE}{HE}\ncline{GT}{HT}
    \ncline{GEb}{HEb}\ncline{GTb}{HTb}
    %
    \]

    \end{document} 

введите описание изображения здесь

Связанный контент