Similar to several other questions, I am trying to draw hypergraphs in tikz. I want to draw a directed hypergraph that looks something like those in this image from here:
As opposed to other questions, I do not want to draw an arc between the associated edges. Instead I want the edges to join for a segment and then split again.
I don't mind specifying the position of the join point, but I would rather not have to manually specify the angle of the incoming and outgoing edges. I would prefer that lines smoothly separate from the join point.
This is my poor attempt at recreating this figure:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz}
\begin{document}
\tikz{
\node [circle,draw] (v1) at (0,0) { $v_1$ };
\node [circle,draw] (v2) at (-1,-3) { $v_2$ };
\node [circle,draw] (v3) at (2,-2) { $v_3$ };
\node [circle,draw] (v4) at (1,-4) { $v_4$ };
\node [circle,draw] (v5) at (3,1) { $v_5$ };
\node [circle,draw] (v6) at (5,-1) { $v_6$ };
\node [circle,draw] (v7) at (4,-5) { $v_7$ };
\node [] (e1) at (1,-2) { $e_1$ };
\node [] (e2) at (2,0) { $e_2$ };
\node [] (e3) at (3,-3) { $e_3$ };
\node [] (e4) at (4,0) { $e_4$ };
%
\path
% edge 1
(v1) [-] edge node { } (e1)
(v2) [-] edge node { } (e1)
(e1) [->] edge node { } (v3)
(e1) [->] edge node { } (v4)
% edge 2
(v1) [-] edge node { } (e2)
(v3) [-] edge node { } (e2)
(e2) [->] edge node { } (v5)
% edge 3
(v7) [-] edge node { } (e3)
(e3) [->] edge node { } (v3)
(e3) [->] edge node { } (v4)
% edge 4
(v5) [-] edge node { } (e4)
(e4) [->] edge node { } (v6)
(e4) [->] edge node { } (v7)
;
}
\end{document}
This produces this figure:
Best Answer
Code
Output