# Can I use the bend command in my coding?

\begin{tikzpicture}[scale=1, every node/.style={draw, shape=circle,fill,scale=0.5}]
\path (0,0) node (p1) {}
(-1.5,-1) node (p6) {}
(-1.5,-2.5) node (p5) {}
(1.5,-2.5) node (p3) {}
(1.5,-1) node (p2) {}
(0,-3.5) node (p4) {};
\draw (p1) -- (p2)
(p2) -- (p3)
(p3) -- (p4)
(p5) -- (p6)
(p6) -- (p1)
(p6) -- (p1);
\end{tikzpicture}


As you see I got two of the same edge (p6) -- (p1). I googled it and saw that in some codes different for this I can use a bend command is there some way that could work on this? If yes could you please tell me how?

-

You can use the to path command, which allows you to draw curved paths.

The simplest way to use this is to replace -- with to [bend left] or to [bend right]. This will curve the path at a 30° angle:

 \draw (0,0) to [bend left] (2,0);


You can also specify the curve angle, using bend left=<angle>:

\draw (0,0) to [bend left=90] (2,0);


Or you can specify the starting and ending angles, using in=<angle>, out=<angle>:

\draw (0,0) to [out=0, in=-90] (2,0);


More options are described in Section 51.3 Curves of the pgfmanual.

-
\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[dot/.style={fill,circle,minimum size=2mm,inner sep=0pt}]
\path
(0,0)       coordinate[dot] (p1)
(-1.5,-1)   coordinate[dot] (p6)
(-1.5,-2.5) coordinate[dot] (p5)
(1.5,-2.5)  coordinate[dot] (p3)
(1.5,-1)    coordinate[dot] (p2)
(0,-3.5)    coordinate[dot] (p4) ;
\draw (p1) -- (p2)
(p2) -- (p3)
(p3) -- (p4)
(p5) -- (p6)
(p6) -- (p1)
(p6) to[bend left] (p1);
\end{tikzpicture}

\end{document}


-