0
\node[circle, draw] (v1) at (0,0) {$v_1$};
\node[circle, draw] (v2) at (2,0) {$v_2$};
\draw (v1) to [bend right=30] (v2);

The above code draws a bended line between two nodes v1 and v2. How can i move the center of the bended curve (red arrow) slightly upwards while keeping the in- and out-going coordinates on the nodes (red circles)?

the tikz picture with illustration of the requirments

1
  • 1
    Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for the users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. Commented Sep 20 at 10:13

3 Answers 3

2

You can specify the looseness:

\documentclass[border=5mm]{standalone}
\usepackage{tikz}

\begin{document}
  \begin{tikzpicture}
    \node[circle, draw] (v1) at (0,0) {$v_1$};
    \node[circle, draw] (v2) at (2,0) {$v_2$};
    \draw (v1) to [bend right=30] (v2);
    \draw[blue, dotted] (v1) to [bend right=30,looseness=.5] (v2);
  \end{tikzpicture}
\end{document}

enter image description here

3

You could explicitly state the position of the start and end point on the edge of the nodes:

\documentclass{standalone}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
\node[circle, draw] (v1) at (0,0) {$v_1$};
\node[circle, draw] (v2) at (2,0) {$v_2$};
\draw (v1) to [bend right=30] (v2);
\draw[red] (v1.-30) to [bend right=10] (v2.210);
\end{tikzpicture}

\end{document}

enter image description here

2
\documentclass[tikz, border=1cm]{standalone}
\begin{document}
\begin{tikzpicture}
\node[circle, draw] (v1) at (0,0) {$v_1$};
\node[circle, draw] (v2) at (2,0) {$v_2$};
\draw (v1) to [bend right=30] (v2);
\draw[red] (v1) to [bend right=30, looseness=0.5] (v2);
\end{tikzpicture}
\end{document}

Two circle nodes connected with curves

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .