The TikZpingus package
Internals
C.9 The Wings¶
In contrast to the other selections, a wing consists of more than the drawing: the key for the wing, its color, the position of its tip and the angle of the items it holds. The helper \@pingu@wings@s registers all of it. Its six arguments are the name, the code for the left wing, the code for the right wing, \pingu@wi@above or \pingu@wi@below (whether the wing items are drawn above the wing), the angle of the wing items, and the angle with which the wing goes down. It creates the keys left wing <name>, right wing <name> and wings <name>. The position of the tips must be known to calculate the anchors, so they are registered separately with \pingu@wingend@add. This is the wave:
\@pingu@wings@s{wave}{%
\coordinate (\pingu@name-wing-left-start) at ([yshift=-5.85mm]\pingu@name-wings-side-left);
\scope[xshift=-\p@] % shift to avoid rounding errors in pdf viewers
\pgfinterruptboundingbox
\path[/pingu/@invclip] \pingu@path@lowerpingu;
\endpgfinterruptboundingbox
\pingu@block[rotate around={-39:(\pingu@name-wing-left-start)}]{\pingu@color@left@wing} (\pingu@name-wing-left-start) ellipse [x radius=2.2mm, y radius=9.35mm] +(90:.22cm and .935cm) coordinate (\pingu@name-wing-left-tip) +(150:.22cm and .935cm) coordinate (\pingu@name-wing-left-cap-up) +(-3:.22cm and .935cm) coordinate (\pingu@name-wing-left-cap-down) +(90:.175cm and .75cm) coordinate (\pingu@name-wing-left);
\pingu@wing@compensator{\pingu@block{\pingu@color@left@wing} (\pingu@name-wing-left-start)++(.03mm,4.6mm) to[out=-80,in=220] (\pingu@name-wing-left-cap-up) -- (\pingu@name-wing-left-start) -- cycle;
\pingu@block{\pingu@color@left@wing} (\pingu@name-wing-left-start)++(.085mm,-4.4mm) to[out=80,in=-131] (\pingu@name-wing-left-cap-down) -- (\pingu@name-wing-left-start) -- cycle;}
\endscope}{%
\coordinate (\pingu@name-wing-right-start) at ([yshift=-5.85mm]\pingu@name-wings-side-right);
\scope[xshift=\p@] % shift to avoid rounding errors in pdf viewers
\pgfinterruptboundingbox
\path[/pingu/@invclip] \pingu@path@lowerpingu;
\endpgfinterruptboundingbox
\pingu@block[rotate around={39:(\pingu@name-wing-right-start)}]{\pingu@color@right@wing} (\pingu@name-wing-right-start) ellipse [x radius=.22cm, y radius=.935cm] +(90:.22cm and .935cm) coordinate (\pingu@name-wing-right-tip) +(30:.22cm and .935cm) coordinate (\pingu@name-wing-right-cap-up) +(177:.22cm and .935cm) coordinate (\pingu@name-wing-right-cap-down) +(90:.175cm and .775cm) coordinate (\pingu@name-wing-right);
\pingu@wing@compensator{\pingu@block{\pingu@color@right@wing} (\pingu@name-wing-right-start)++(-.03mm,4.6mm) to[out=-100,in=-45] (\pingu@name-wing-right-cap-up) -- (\pingu@name-wing-right-start) -- cycle;
\pingu@block{\pingu@color@right@wing} (\pingu@name-wing-right-start)++(-.1mm,-4.4mm) to[out=100,in=-50] (\pingu@name-wing-right-cap-down) -- (\pingu@name-wing-right-start) -- cycle;}
\endscope}{\pingu@wi@above}{-10}{-110}
The wings have to start at the coordinate of \pingu@name-wing-left-start. The two paths with \pingu@path@lowerpingu and the shifts of one point exist to hide the seam between the wing and the body, as explained for the clips in the body.