These produce rather different effects than the one envisaged in the question. I'm posting them because I couldn't find anything similar when I searched and I hope that they may be useful to somebody sometime. (Basically the answers here were the closest I got to what I was looking for.)
In terms of questions, LaTeX Cartooning asks for something of the kind I hoped to find. But that question requests a much more comprehensive package far beyond anything I was searching for.
So, for what it is worth, this code defines pics
which can be used a little like new node shapes but are much less flexible and powerful. I would love to have node shapes but have no idea how to make one.
People Pic I
I needed to be able to fill my people with spheres.So I wanted an outline rather than a filled picture. Moreover, I needed to be able to specify paths around the people in order to draw arrows, clip the background spheres etc. So, I needed nodes within the pic
which I could refer to later.
The pic
below let me do that. Perhaps it will help somebody else who wants to do something equally bizarre sometime.
Use \pgfkeyssetvalue{/cfr/soul base dimension}{}
to specify the size of the pic
but note that this size does not specify the final dimensions. Rather, it is the base unit used by the pic
code to calculate those dimensions. I used 10pt
for code designed for use in a beamer
presentation.
The pic
defines various nodes. If you give your pic
a name, you can refer to these nodes later. For example, if you write
\pic (harry) {person};
Then
harry-head
harry-right arm
harry-right leg
harry-torso
harry-left leg
harry-left arm
refer to Harry's head, arms, legs and torso respectively.
\documentclass[tikz]{standalone}
\usetikzlibrary{calc,positioning}
\begin{document}
\pgfkeyssetvalue{/cfr/soul base dimension}{10pt}
\begin{tikzpicture}
[
font=\sffamily\bfseries,
line width=0.1*\pgfkeysvalueof{/cfr/soul base dimension},
outer sep=0pt,
inner sep=0pt,
person/.pic={%
\node (-head) [circle, minimum size=4*\pgfkeysvalueof{/cfr/soul base dimension}] {};
\node (-torso) [below=0pt of -head, rectangle, rounded corners=.4*\pgfkeysvalueof{/cfr/soul base dimension}, minimum width=3.5*\pgfkeysvalueof{/cfr/soul base dimension}, minimum height=6*\pgfkeysvalueof{/cfr/soul base dimension}] {};
\node (-right arm) [right=0pt of -torso.north east, yshift=-3.1*\pgfkeysvalueof{/cfr/soul base dimension}, rectangle, minimum width=\pgfkeysvalueof{/cfr/soul base dimension}, minimum height=6*\pgfkeysvalueof{/cfr/soul base dimension}, rounded corners=.4*\pgfkeysvalueof{/cfr/soul base dimension}] {};
\node (-left arm) [left=0pt of -torso.north west, yshift=-3.1*\pgfkeysvalueof{/cfr/soul base dimension}, rectangle, minimum width=\pgfkeysvalueof{/cfr/soul base dimension}, minimum height=6*\pgfkeysvalueof{/cfr/soul base dimension}, rounded corners=.4*\pgfkeysvalueof{/cfr/soul base dimension}] {};
\node (-left leg) [below=0pt of -torso.south, rectangle, minimum width=1.5*\pgfkeysvalueof{/cfr/soul base dimension}, minimum height=6*\pgfkeysvalueof{/cfr/soul base dimension}, rounded corners=.2*\pgfkeysvalueof{/cfr/soul base dimension}, anchor=north east] {};
\node (-right leg) [below=0pt of -torso.south, rectangle, minimum width=1.5*\pgfkeysvalueof{/cfr/soul base dimension}, minimum height=6*\pgfkeysvalueof{/cfr/soul base dimension}, rounded corners=.2*\pgfkeysvalueof{/cfr/soul base dimension}, anchor=north west] {};
\draw [rounded corners=.2*\pgfkeysvalueof{/cfr/soul base dimension}] (-right leg.south) -- (-right leg.south west) -- (-left leg.south east) -- (-left leg.south west) -- (-torso.south west) [rounded corners=.4*\pgfkeysvalueof{/cfr/soul base dimension}] -- (-left arm.south east) -- (-left arm.south west) -- (-left arm.north west) -- (-torso.north west) -- ($(-head.south) - (.5*\pgfkeysvalueof{/cfr/soul base dimension},0)$) arc [start angle=255.5, end angle=-74.5, radius=2*\pgfkeysvalueof{/cfr/soul base dimension}] -- (-torso.north east) -- (-right arm.north east) -- (-right arm.south east) -- (-right arm.south west) [rounded corners=.2*\pgfkeysvalueof{/cfr/soul base dimension}] -- (-torso.south east) -- (-right leg.south east) -- (-right leg.south west);
}
]
\pic (human being) {person};
\pic (got the blues) [right=of human being-head, xshift=4*\pgfkeysvalueof{/cfr/soul base dimension}, blue] {person};
\pic (in the pink) [right=of got the blues-head, xshift=4*\pgfkeysvalueof{/cfr/soul base dimension}, magenta] {person};
\pic (half gone) [right=of in the pink-head, xshift=4*\pgfkeysvalueof{/cfr/soul base dimension},opacity=.5] {person};
\pgfkeyssetvalue{/cfr/soul base dimension}{5pt}
\pic (feeling small) [right=of half gone-right arm.east, xshift=4*\pgfkeysvalueof{/cfr/soul base dimension}, fill=red] {person};
\end{tikzpicture}
\end{document}
People Pic II
This is a similar idea to the first but also draws on the solutions others have posted for filled person shapes. It creates a person in the colour of your choice, rotated at the angle of your choice and labelled with the text of your choice. It could be adapted for various other permutations.
\documentclass[tikz]{standalone}
\usetikzlibrary{positioning,fit}
\begin{document}
\tikzset{
pobl/.style={
inner sep=0pt, outer sep=0pt, fill=#1,
},
pobl gron/.style n args={2}{
pobl=#1, rounded corners=#2,
},
pics/person/.style n args={3}{
code={
\node (-corff) [pobl=#1, minimum width=.25*#2, minimum height=.375*#2, rotate=#3, pic actions] {};
\node (-pen) [minimum width=.3*#2, circle, pobl=#1, outer sep=.01*#2, anchor=south, rotate=#3, pic actions] at (-corff.north) {};
\node (-coes dde) [pobl gron={#1}{1pt}, anchor=north west, minimum width=.12125*#2, minimum height=.25*#2, rotate=#3, pic actions] at (-corff.south west) {};
\node [pobl=#1, anchor=north, minimum width=.12125*#2, minimum height=.15*#2, rotate=#3, pic actions] at (-coes dde.north) {};
\node (-coes chwith) [pobl gron={#1}{1pt}, anchor=north east, minimum width=.12125*#2, minimum height=.25*#2, rotate=#3, pic actions] at (-corff.south east) {};
\node [pobl=#1, anchor=north, minimum width=.12125*#2, minimum height=.15*#2, rotate=#3, pic actions] at (-coes chwith.north) {};
\node (-braich dde) [pobl gron={#1}{.75pt}, minimum width=.075*#2, minimum height=.325*#2, outer sep=.0064*#2, anchor=north west, rotate=#3, pic actions] at (-corff.north east) {};
\node [pobl=#1, minimum width=.05*#2, minimum height=.2*#2, outer sep=.0064*#2, anchor=north west, rotate=#3, pic actions] at (-corff.north east) {};
\node (-braich chwith) [pobl gron={#1}{.75pt}, minimum width=.075*#2, minimum height=.325*#2, outer sep=.0064*#2, anchor=north east, rotate=#3, pic actions] at (-corff.north west) {};
\node [pobl=#1, minimum width=.0375*#2, minimum height=.2*#2, outer sep=.0064*#2, anchor=north east, rotate=#3, pic actions] at (-corff.north west) {};
\node (-fit person) [fit={(-pen.north) (-braich dde.east) (-coes chwith.south) (-braich chwith.west)}] {};
\node (-pwy) [below=25pt of -fit person, every pin] {\tikzpictext};
\draw [every pin edge] (-fit person) -- (-pwy);
},
},
}
\begin{tikzpicture}
[
every pin edge/.append style={latex-, shorten <=-2.5pt},
]
\draw pic (person) [pic text={A Person}] {person={blue}{25pt}{0}};
\draw pic (sleepy) [right=35pt of person-braich dde.east, pic text={Sleepy Person}] {person={green}{25pt}{90}};
\draw pic (gymnast) [right=70pt of person-braich dde.east, pic text={Gymnast}] {person={orange}{25pt}{180}};
\draw pic (giant) [right=50pt of gymnast-braich dde.south east, pic text={Sleepy Giant}] {person={pink}{75pt}{-90}};
\end{tikzpicture}
\end{document}