Could somebody give an idea how to create the following 3D commutative diagram?

Asked
Active
Viewed 483 times
2
PhysicsMath
- 155
2 Answers
5
A tikz based solution:
\documentclass{article}
\usepackage{amsfonts}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
\matrix (m) [matrix of math nodes,row sep=2em,column sep=4em]{
& S(n) & S(n) & \cdots\\
TM & & & \\
& \mathfrak{X}(n, n+q) & \mathfrak{X}(n, n+q+1) & \cdots\\
M & & & \\};
\path[-stealth]
(m-2-1) edge (m-1-2);
\path[-stealth]
(m-1-2) edge (m-1-3);
\path[-stealth]
(m-1-3) edge (m-1-4);
\path[-stealth]
(m-4-1) edge (m-3-2);
\path[-stealth]
(m-3-2) edge (m-3-3);
\path[-stealth]
(m-3-3) edge (m-3-4);
\path[-stealth]
(m-2-1) edge (m-4-1);
\path[-stealth]
(m-1-2) edge (m-3-2);
\path[-stealth]
(m-1-3) edge (m-3-3);
\end{tikzpicture}
\end{document}
Output:
You can simplify this even using one \path. See an example here.
[EDITED by Steven B. Segletes to add \slantbox feature from Shear transform a "box"
For 3-D effect, one can use Bruno's \slantbox. Note in this case, for the isometric effect, the optional argument to \slantbox is the tangent of the rotation angle.
\documentclass{article}
\usepackage{amsfonts}
\usepackage{tikz}
\usetikzlibrary{matrix}
\newsavebox\foobox
\newcommand{\slantbox}[2][.2]{\mbox{%
\sbox{\foobox}{#2}%
\hskip\wd\foobox
\pdfsave
\pdfsetmatrix{1 0 #1 1}%
\llap{\usebox{\foobox}}%
\pdfrestore
}}
\begin{document}
\begin{tikzpicture}
\matrix (m) [matrix of math nodes,row sep=2em,column sep=4em]{
& S(n) & S(n) & \cdots\\
\rotatebox{25}{\slantbox[.466]{TM}} & & & \\
& \mathfrak{X}(n, n+q) & \mathfrak{X}(n, n+q+1) & \cdots\\
\rotatebox{25}{\slantbox[.466]{M}} & & & \\};
\path[-stealth]
(m-2-1) edge (m-1-2);
\path[-stealth]
(m-1-2) edge (m-1-3);
\path[-stealth]
(m-1-3) edge (m-1-4);
\path[-stealth]
(m-4-1) edge (m-3-2);
\path[-stealth]
(m-3-2) edge (m-3-3);
\path[-stealth]
(m-3-3) edge (m-3-4);
\path[-stealth]
(m-2-1) edge (m-4-1);
\path[-stealth]
(m-1-2) edge (m-3-2);
\path[-stealth]
(m-1-3) edge (m-3-3);
\end{tikzpicture}
\end{document}
-
1I hope you don't mind that I added a 3-D supplement to your answer. If you don't like it, you or I can roll it back to your prior posting. – Steven B. Segletes Jul 27 '16 at 10:30
-
-
OMG, there is even 3D effect! That is more than what I am looking for! Many thanks for your answer and I am so impressed by your TeX skills! – PhysicsMath Jul 28 '16 at 02:19
3
The trick is to use four rows, reducing the spacing between rows.
Take your pick among Xy-pic and tikz-cd:
\documentclass{article}
\usepackage[all,cmtip]{xy}
\usepackage{tikz-cd}
\begin{document}
This is the diagram using Xy-pic
\[
\xymatrix@R-.8pc{
& S(n) \ar[rr] \ar[dd] && S(n) \ar[rr] \ar[dd] && \cdots \\
T(M) \ar[ur] \ar[dd] \\
& \mathcal{X}(n,n+q) \ar[rr] && \mathcal{X}(n,n+q+1) \ar[rr] && \cdots \\
M \ar[ur]
}
\]
This is the diagram using tikz-cd
\[
\begin{tikzcd}[row sep=4ex]
& S(n) \arrow[rr] \arrow[dd] && S(n) \arrow[rr] \arrow[dd] && \cdots \\
T(M) \arrow[ur] \arrow[dd] \\
& \mathcal{X}(n,n+q) \arrow[rr] && \mathcal{X}(n,n+q+1) \arrow[rr] && \cdots \\
M \arrow[ur]
\end{tikzcd}
\]
\end{document}
egreg
- 1,121,712
-
Looks great even though it is not really 3D diagram. But the trick greatly reduces the amount of coding! Many thanks! And I also appreciate very much the comparison! – PhysicsMath Jul 28 '16 at 02:21



xy-picespecially? – cfr Jul 27 '16 at 03:15xy-picsolution? – Jagath Jul 27 '16 at 03:22