TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on a paper and I need in the introduction to put a diagram. The diagram is the following (or something similar) and I was wondering how can I reproduce it in LaTeX code.Diagram of a string scattering process

share|improve this question
up vote 6 down vote accepted

Using Andrew Stacey's purpose-built tqft library:

\begin{tikzpicture}[tqft/cobordism/.style={draw},tqft/every boundary component/.style={draw}]
\pic [tqft/pair of pants];

enter image description here

There are many customization options as well as other shapes and connection methods, if you need a substantial number of these diagrams. You may refer to the manual for complete details.

share|improve this answer

A TikZ solution:

  \draw (0,0) ellipse (.5 and .25);
  \draw (-1,-2) ellipse (.5 and .25);
  \draw (1,-2) ellipse (.5 and .25);
  \draw (-.5,0) to[out=-90,in=90] (-1.5,-2);
  \draw (.5,0) to[out=-90,in=90] (1.5,-2);
  \draw (-.5,-2) to[out=90,in=90] (.5,-2);

enter image description here

With some pseudo-3D

  \draw (0,0,0) circle (.5);
  \draw (-1,0,-2) circle (.5);
  \draw (1,0,-2) circle (.5);
  \draw (-.5,0,0) to[out=-90,in=90] (-1.5,0,-2);
  \draw (.5,0,0) to[out=-90,in=90] (1.5,0,-2);
  \draw (-.5,0,-2) to[out=90,in=90] (.5,0,-2);

enter image description here

share|improve this answer
Thanks a lot. What if I want rotate it? like by 90°. Can Simply I change the coordinates in draw commands, right? – Oscar Jul 15 '14 at 14:31
Just add [rotate=90] to the tikzpicture environment like in \begin{tikzpicture}[rotate=90]. Also try reading the TikZ manual (At least chapters 2-7). It contains a vast amount of examples and tutorials. – Henri Menke Jul 15 '14 at 18:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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