4

I am trying to construct a certain topological structure for my paper. Up until now my focus was primarily on typesetting (AKA I'm not very skilled at certain portions of tikz). I managed to break through and comprehend some of the more complex code given in this very helpful TEX.SX thread. This is my MWE so far:

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{tqft}
\usetikzlibrary{calc}

\begin{document}

\begin{tikzpicture}[every tqft/.append style={transform shape, rotate=0, tqft/circle x radius=7pt, tqft/circle y radius=3pt, tqft/boundary separation=1.3cm}]
\pic[   
tqft/pair of pants,
name=b,
every incoming upper boundary component/.style={draw},
every incoming  boundary component/.style={draw},
cobordism  edge/.style={draw}
];
\pic[
tqft/reverse pair of pants,
name=c,
every outgoing lower boundary component/.style={draw},
cobordism  edge/.style={draw},
at=(b-outgoing boundary 1),
];
\node at (0,-4.5) {$\vdots$};
\pic[   
tqft/pair of pants,
name=d,
every incoming upper boundary component/.style={draw},
every incoming  boundary component/.style={draw},
cobordism  edge/.style={draw}
];
\pic[
tqft/reverse pair of pants,
name=e,
every outgoing lower boundary component/.style={draw},
cobordism  edge/.style={draw},
at=(b-outgoing boundary 2),
% at=(0,-6.5),
];
\end{tikzpicture}

\end{document}

Which gives me this quazi-shape:

enter image description here

I am aware that this is due to the definitions of the boundaries, so I tried to switch to a coordinate approach, which you can see commented out underneath, and for a very good reason. If I were to compile my code with the commented line (of course the latter would replace at=(b-outgoing boundary 2),) the compilation itself would never be completed.

I ask you to show me a suitable method of positioning the compositions in the pic environment by coordinates, similar to my endeavour, of course. And I also warmly ask you to fix one more little detail: at the bottom of the topological construct we see the enter to the "tube"; I'd like another half of the ellipse behind the construct to denote that this particular part is covered and to give a sense of "3D" perspective. The "height" of the ellipse is accommodate by changing the y value in tikzpicture's preamble, but I have no idea how to achieve the dashed part.

Thank you in advance.

3

The package author has done something rather unhelpful in setting up a non-standard syntax for the package's pics. This breaks the usual pic syntax, including the \pic at ... which is usually used to place them. However, you can use coordinates with the non-standard syntax provided. You just need to surround the coordinate by curly brackets. For example,

\documentclass[border=10pt]{standalone}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{tqft}

\begin{document}

\begin{tikzpicture}
  [
    every tqft/.append style={%
      transform shape,
      rotate=0,
      tqft/circle x radius=7pt,
      tqft/circle y radius=3pt,
      tqft/boundary separation=1.3cm
    },
  ]
  \pic [
  tqft/pair of pants,
  name=b,
  every incoming upper boundary component/.style={draw},
  every incoming  boundary component/.style={draw},
  cobordism  edge/.style={draw}
  ];
  \pic[
  tqft/reverse pair of pants,
  name=c,
  every outgoing lower boundary component/.style={draw},
  cobordism  edge/.style={draw},
  at=(b-outgoing boundary 1),
  ];
  \node at (0,-4.5) {$\vdots$};
  \pic[
  tqft/pair of pants,
  name=d,
  every incoming upper boundary component/.style={draw},
  every incoming  boundary component/.style={draw},
  cobordism  edge/.style={draw}
  ];
  \pic[
  tqft/reverse pair of pants,
  name=e,
  every outgoing lower boundary component/.style={draw},
  cobordism  edge/.style={draw},
%   at=(b-outgoing boundary 2),
  at={(0,-6.5)},
  ];
\end{tikzpicture}
\end{document}

works fine.

placing deviant <code>pic</code> with coordinates

You can draw the other halves of the ellipses by using the every boundary component style. For example,

\documentclass[border=10pt]{standalone}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{tqft}

\begin{document}

\begin{tikzpicture}
  [
    every tqft/.append style={%
      transform shape,
      rotate=0,
      tqft/circle x radius=7pt,
      tqft/circle y radius=3pt,
      tqft/boundary separation=1.3cm,
      tqft/every boundary component/.style={draw, densely dashed, opacity=.5}
    },
  ]
  \pic [
  tqft/pair of pants,
  name=b,
  every incoming upper boundary component/.style={draw},
  every incoming  boundary component/.style={draw},
  cobordism  edge/.style={draw}
  ];
  \pic[
  tqft/reverse pair of pants,
  name=c,
  every outgoing lower boundary component/.style={draw},
  cobordism  edge/.style={draw},
  at=(b-outgoing boundary 1),
  ];
  \node at (0,-4.5) {$\vdots$};
  \pic[
  tqft/pair of pants,
  name=d,
  every incoming upper boundary component/.style={draw},
  every incoming  boundary component/.style={draw},
  cobordism  edge/.style={draw}
  ];
  \pic[
  tqft/reverse pair of pants,
  name=e,
  every outgoing lower boundary component/.style={draw},
  cobordism  edge/.style={draw},
%   at=(b-outgoing boundary 2),
  at={(0,-6.5)},
  ];
\end{tikzpicture}
\end{document}

with 3D gestures

9
  • All the praise to you, sir! I couldn't be more grateful. One big tick and an upvote can't even begin to express the gratitude I feel right now!
    – God bless
    Jun 7 '17 at 13:08
  • @GregorPerčič Thanks, but please don't make assumptions. My username is 'cfr'. What makes you so sure I'm male?
    – cfr
    Jun 7 '17 at 22:29
  • I hope I didn't offend you. I generally use the phrase "praise to you, sir" to express my gratitude. It's true though that most of my mathematics colleagues are male (for some reason every woman I know hates mathematics, but I won't blatantly generalise; surely there are women that have achieved academic peaks in mathematics; Mary Lucy Cartwright is one of them, for example).
    – God bless
    Jun 8 '17 at 13:47
  • 1
    @cfr \usepackage{crystalball} \polish{crystal} Jun 29 '18 at 22:01
  • 1
    @LoopSpace We need that package.
    – cfr
    Jun 30 '18 at 0:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.