# [Tex/LaTex] Drawing a torso with a head (using \draw)

tikz-pgf

I am trying to draw some kind of person silhouette using tikz, similar to the following image:

I tried a few things like using \draw with ..control, but I find it very difficult to position the intermediate points in such a way that the curve does not have sudden bents or sharp corners. I also tired using the arc command of \draw but that did not work very well either. The best that I have come up with was using two circles:

\documentclass[tikz, border=2mm]{standalone}
\usetikzlibrary{shapes.geometric,positioning,calc}

\begin{document}
\pgfkeyssetvalue{/cfr/soul base dimension}{10pt}
\begin{tikzpicture}

\end{tikzpicture}
\end{document}


What I find particularly hard is computing (in my head) the control points that I have to place along the path. Especially since it seems that I must find consecutive controls points that such that the curve has the same incomming and outgoing angle or there will be a noticeable sharp corner between path segments.

The starting point is the head, here at (0,0), and the body a triangle with some bended lines and rounded corners. For simplicity I added some coordinates for the triangle as well.

\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
%%
\draw[rounded corners=1.5mm,fill=blue!30]
(top) to [out=-10,in=100]
(right) to [bend left=15]
(left) to [out=80,in=190]
(top);
\end{tikzpicture}
\end{document}


Edit

To get bended lines an easy way is to say to [bend left] instead of -- in the path. In this case the reference line is a straight line between the starting and ending coordinates. The drawn line starts 30 degrees left of the reference line and enter the target coordinate 30 degrees from left. See lines 1 and 2 below. You can change the default bending angle of 30 degrees by stating e.g. to [bend left] as in the figure above.

However, if you want different angles at the start and end of the line it is possible to assign any angles with to [out=30,in=30], where it is set to 30 degrees for both. As can be seen in line 3 below these angles are not relative the straight line as before, it is relative the unit circle. So 30 degrees point up to the left for both ends.

To get the same bend as before we need to derive the right values of the angles. As the outgoing angle of the straight line is 45 degrees (in this case) we need to add 30 degrees. The ending angle of straight line is 180+45=225 degrees, and having the line coming in from left gives 225-30. See line 4.

Then back to the silhouette figure. The bend of the lower line is just 15 degrees in each end, which is easiest done by stating to [bend left=15]. The others look better if they have different bending angles in start and end. For the left side of the triangle (the body) it set to 80 degrees at the start and 180+10 degrees at the end, that is in both ends 10 degrees from right angles.

\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[->] (0,0) -- (1,1) node [above]{1};
\draw[->,xshift=1cm] (0,0) to [bend left] (1,1) node [above]{2}; % bend 30 degree
\draw[->,xshift=2cm] (0,0) to [out=30,in=30] (1,1) node [above]{3};
\draw[->,xshift=3cm] (0,0) to [out=45+30,in=225-30] (1,1) node [above]{4};
\end{tikzpicture}
\end{document}