Skip to content

Instantly share code, notes, and snippets.

@ibab
Created June 29, 2013 19:48
Show Gist options
  • Save ibab/5892412 to your computer and use it in GitHub Desktop.
Save ibab/5892412 to your computer and use it in GitHub Desktop.
A simple particle interaction diagram
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes}
\usetikzlibrary{trees}
\usetikzlibrary{matrix,arrows}
\usetikzlibrary{positioning}
\usetikzlibrary{calc,through}
\usetikzlibrary{decorations.pathreplacing}
\usepackage{pgffor}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.markings}
\tikzset{
% >=stealth', %% Uncomment for more conventional arrows
vector/.style={decorate, decoration={snake}, draw},
provector/.style={decorate, decoration={snake,amplitude=2.5pt}, draw},
antivector/.style={decorate, decoration={snake,amplitude=-2.5pt}, draw},
fermion/.style={draw=black, postaction={decorate},
decoration={markings,mark=at position .55 with {\arrow[draw=black]{>}}}},
fermionbar/.style={draw=black, postaction={decorate},
decoration={markings,mark=at position .55 with {\arrow[draw=black]{<}}}},
fermionnoarrow/.style={draw=black},
gluon/.style={decorate, draw=black,
decoration={coil,amplitude=4pt, segment length=5pt}},
scalar/.style={dashed,draw=black, postaction={decorate},
decoration={markings,mark=at position .55 with {\arrow[draw=black]{>}}}},
scalarbar/.style={dashed,draw=black, postaction={decorate},
decoration={markings,mark=at position .55 with {\arrow[draw=black]{<}}}},
scalarnoarrow/.style={dashed,draw=black},
electron/.style={draw=black, postaction={decorate},
decoration={markings,mark=at position .55 with {\arrow[draw=black]{>}}}},
bigvector/.style={decorate, decoration={snake,amplitude=4pt}, draw},
}
\begin{document}
\begin{tikzpicture}[line width=1.5 pt, scale=2]
\draw[fermion](145:1) -- (145:.3cm);
\node at (145:1.15) {$A$};
\draw[fermion](215:1) -- (215:.3cm);
\node at (215:1.2) {$B$};
\draw[fermionbar](35:1) -- (35:.3cm);
\node at (35:1.15) {$C$};
\draw[fermionbar](-35:1) -- (-35:.3cm);
\node at (-35:1.2) {$D$};
\draw[fill=black] (0,0) circle (.3cm);
\draw[fill=white] (0,0) circle (.29cm);
\begin{scope}
\clip (0,0) circle (.3cm);
\foreach \x in {-.9,-.8,...,.3}
\draw[line width=1 pt] (\x,-.3) -- (\x+.6,.3);
\end{scope}
\end{tikzpicture}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment