0

How to draw with TikZ multiple curved lines which are merged into one line? Below is an example how it should look like:

enter image description here

I tried the following code, but that looks ugly as hell:

\draw[] (2.4,5.4) .. controls (2.4,4.2) and (2.8,4.2) .. (7,8.5); 
\draw[] (2,7.6) .. controls (1.8,8.6) and(3,8.5) .. (7,8.5); 
\draw[] (1.55,7.6) .. controls (1.7,8.6) and(3,8.5) .. (7,8.5); 
\draw[] (9.8,4) .. controls (8.5,5) and (8,6) .. (7,8.5); 
\draw[] (7,8.5) .. controls (7,12) and (6,13.5) .. (5,13.5);

enter image description here

  • Welcome! Can you provide what you already tried? Maybe an MWE we can improve on? – Sango Jan 27 at 14:41
  • Draw them as bezier curves ( I normally use a series of (pkt1) .. controls ++(ang1:rad1) and ++(ang2:rad2) .. (pkt) ..., then make sure that the direction of the control point (the two polar coordinates I used) at the "convergens" is the same – daleif Jan 27 at 15:01
0

Welcome to TeX.SE. This kind of drawing can be done with the to path operation, its in and out options to specify incoming and outgoing angles at interesting points, the attach arrow style from Schrödinger's cat and... a bit of patience.

\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{decorations.markings, arrows.meta, bending}

% 'attach arrow' style from Schrödinger's cat:
% <https://tex.stackexchange.com/a/524935/73317>
\tikzset{%
    attach arrow/.style={
    decoration={
        markings,
         mark=at position 0 with {\pgfextra{%
         \pgfmathsetmacro{\tmpArrowTime}{\pgfkeysvalueof{/tikz/arc arrow/length}/(\pgfdecoratedpathlength)}%
         \xdef\tmpArrowTime{\tmpArrowTime}}},
        mark=at position {#1-3*\tmpArrowTime} with {\coordinate(@1);},
        mark=at position {#1-2*\tmpArrowTime} with {\coordinate(@2);},
        mark=at position {#1-1*\tmpArrowTime} with {\coordinate(@3);},
        mark=at position {#1+\tmpArrowTime/2} with {\coordinate(@4);
        \draw[-{Stealth[length=\pgfkeysvalueof{/tikz/arc arrow/length},bend]}]
          plot[smooth] coordinates {(@1) (@2) (@3) (@4)};},
        },
     postaction=decorate,
     },
     attach arrow/.default=0.5,
     arc arrow/length/.initial=2mm,
}

\begin{document}
\begin{tikzpicture}
  \draw[attach arrow=0.2, attach arrow=0.83]
    (-6,-2) to[out=45, in=180] (-4,-1) to[out=0, in=180] (-1.7,-1.8)
    to[out=0, in=-95] (0,0) to[out=85, in=0] (-3,2) to[out=180, in=70] (-5,1);
  \draw[attach arrow=0.5] (-6.5,-4) to[out=-30, in=180] (-5.5,-4.2)
    to[out=0, in=180] (-3,-3) to[out=0, in=205] (-1.1,-3)
    to[out=25, in=-95] (0,0);
  \draw[attach arrow=0.3] (-1.5,-8) to[out=110, in=260] (-0.2,-2.5)
    to[out=80, in=-95] (0,0);
\end{tikzpicture}
\end{document}

screenshot

| improve this answer | |
  • This solved my problem, thank you! – 19yc93 Jan 28 at 8:59

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.