5

I want to make some diagrams that look like the following:

I have considered TikZ for this purpose, but it appears to be more involved than I would like for creating many diagrams like this that I'd change a lot. I don't really have the time to obsess over coordinates and so on. Is there some sensible way to use TikZ to produce a picture like this? Is there a high-level infrastructure that can produce TikZ images using a graphical interface? Is there some faster way of coding diagrams like this?

Here's what code for one unlabelled, uncolored cone might look like in TikZ:

\documentclass[tikz, border=10pt]{standalone}
\usetikzlibrary{calc}
\begin{document}

\begin{tikzpicture}
\draw[dashed] (0,0) arc (170:10:2cm and 0.4cm) coordinate[pos=0] (a);
\draw (0,0) arc (-170:-10:2cm and 0.4cm) coordinate (b);
\draw (a) -- ([yshift=4cm]$(a)!0.5!(b)$) -- (b);
\end{tikzpicture}

\end{document}

11

You can start with something like this:

\documentclass[tikz, border=10pt]{standalone}
\usetikzlibrary{calc}
\begin{document}

\tikzset{
pics/cone/.style args={#1}{
  code={
    \draw [fill=#1!10,thick,join=round](0,0) -- (3,-.5) -- (3,.5) --cycle;
    \draw [fill=#1!10,thick](3,0) ellipse (.25 and .5);
    \draw [thick,fill=#1!70](0,0)--(2.5,0);
    \path (2.5,0)[fill=#1!70] circle [radius=.2cm];
  }
}
}

\begin{tikzpicture}[thick]
\node [circle,minimum size=1cm,fill=yellow]{};
\draw (0,0)--(2,1) (0,0)--(-2,1)--(-4,0) (0,0)--(0,-2);

\path (2,1)  pic {cone=red};
\path (0,-2) pic [rotate=-60]{cone=red};
\path (0,-2) pic [rotate=-100]{cone=red};
\path (-2,1) pic [rotate=150]{cone=red};
\path (-4,0) pic [rotate=190,scale=.7]{cone=green};
\path (-4,0) pic [rotate=220,scale=.7]{cone=green};

\end{tikzpicture}    
\end{document}

enter image description here


EDIT: example extended

enter image description here

\documentclass[tikz, border=10pt]{standalone}
\usetikzlibrary{calc}
\begin{document}

\tikzset{
    pics/jet/.style args={#1}{
        % default rotation: 0 degrees (jet progressing to right)
        code={
            \draw [fill=#1!30, thick,join=round](0, 0) -- (3, -.5) -- (3, .5) --cycle;
            \draw [fill=#1!30, thick](3, 0) ellipse (.25 and .5);
            \draw [thick, fill=#1!90](0, 0)--(2.5, 0);
            \path (2.5, 0)[fill=#1!90] circle [radius=.2cm];
        }
    }
}

\begin{tikzpicture}[thick]

\node [circle, minimum size=1cm, fill=yellow]{};

\draw (0, 0)--(2, 1) (0, 0)--(-2, 1)--(-3, 0) (0, 0)--(0, -2) (2, 1)--(3, 3);

\node at (-3, 0) [circle, minimum size=0.7cm, fill=blue!60]{};
\node at (3, 3) [circle, minimum size=0.7cm, fill=blue!60]{};

\draw (3, 3)--(3.5, 4);

\node at (3.5, 4) [circle, minimum size=0.5cm, fill=orange]{};

\draw[dotted] (3, 3)--(4, 3.5);

\path (2, 1)  pic {jet=red};
\path (0, -2) pic [rotate=-60] {jet=red};
\path (0, -2) pic [rotate=-100] {jet=red};
\path (-2, 1) pic [rotate=140] {jet=red};
\path (-3, 0) pic [rotate=210, scale=.7]{jet=green};
\path (-3, 0) pic [rotate=240, scale=.7]{jet=green};

\node[label={\Large ${l^{-}}$}] at (3.5, 4) {};
\node[label={right:\Large ${\bar{\nu}}$}] at (4, 3.5) {};
\node[label={right:\Large ${W^{-}}$}, xshift=0.2cm, yshift=-0.2cm] at (3, 3) {};
\node[label={below:\Large ${\bar{b}}$}, yshift=-0.3cm] at (4, 1) {};
\node[label={right:\Large ${\bar{b}}$}, xshift=-0.3cm, yshift=0.3cm] at (2, -4) {};
\node[label={left:\Large ${b}$}, xshift=0.2cm] at (-1, -4) {};
\node[label={left:\Large ${\bar{q}}$}] at (-3, -2) {};
\node[label={left:\Large ${q}$}] at (-4, 0) {};
\node[label={above:\Large ${W^{+}}$}, yshift=0.3cm] at (-3, 0) {};
\node[label={left:\Large ${b}$}] at (-3, 3) {};
\node[label={left:\Large ${t}$}] at (-0.8, 1) {};
\node[label={left:\Large ${\bar{t}}$}] at (1.5, 1) {};
\node[label={left:\Large ${H}$}] at (0, -1) {};

\end{tikzpicture}
\end{document}
  • Thank you very, very much for your clear example code. The function for drawing the jets (cones) and the way it is used (rotating it and scaling it) is really the killer feature, isn't it? That was very useful and helpful. – d3pd Mar 10 '16 at 17:30
  • 1
    Glad I could help, and thanks for making this complete. – AboAmmar Mar 10 '16 at 18:36
3

I usually use Inkscape for this kind of sketches. You will probably need to draw the cones as a set of lines and arches but once you have done it you can group them and treat it as a single element which will be quite useful to rotate them. It has an extension called "Tex text" that allows you to include some tex labels .

I hope it helps!

  • Hey, thanks for your suggestion. Yes, this might be a faster approach if dealing with many diagrams. It might be interesting to look at using Inkscape to produce SVGs as intermediary data which then gets converted to TikZ somehow. – d3pd Mar 10 '16 at 17:32
  • 1
    @d3pd Have a look at svg2tikz: I haven't used it myself, but it seems to be the right tool in this case. – Massimo Ortolano Mar 10 '16 at 20:19

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.