| 1 |
% !TeX root = ./examples/coati.tex |
| 2 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 3 |
%% |
| 4 |
%% This package is part of the TikZlings package |
| 5 |
%% A package to bring cute little animals and other beings into tikz |
| 6 |
%% Maintained by samcarter |
| 7 |
%% |
| 8 |
%% Project repository and bug tracker: |
| 9 |
%% https://github.com/samcarter/tikzlings |
| 10 |
%% |
| 11 |
%% Released under the LaTeX Project Public License v1.3c or later |
| 12 |
%% See https://www.latex-project.org/lppl.txt |
| 13 |
%% |
| 14 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 15 |
\ProvidesPackage{tikzlings-coatis}[2025/12/11 version v2.5 Drawing coatis in TikZ] |
| 16 |
|
| 17 |
\RequirePackage{tikz} |
| 18 |
\RequirePackage{tikzlings-addons} |
| 19 |
|
| 20 |
\newcommand*{\coati}[1][]{% |
| 21 |
\begin{scope}% |
| 22 |
\tikzset{/coati/.cd,#1}% |
| 23 |
\coati@draw% |
| 24 |
\end{scope}% |
| 25 |
\thing[#1]% |
| 26 |
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 27 |
\UseHook{tikzlings/coati/foreground} |
| 28 |
\UseHook{tikzlings/foreground} |
| 29 |
\csname coatihookforeground\endcsname |
| 30 |
\csname tikzlinghookforeground\endcsname |
| 31 |
} |
| 32 |
|
| 33 |
\newif\ifcoati@threeD |
| 34 |
\newif\ifcoati@sideward |
| 35 |
\newif\ifcoati@leftstep |
| 36 |
\newif\ifcoati@rightstep |
| 37 |
\newif\ifcoati@back |
| 38 |
\newif\ifcoati@contour |
| 39 |
|
| 40 |
\NewHook{tikzlings/coati/background} |
| 41 |
\NewHook{tikzlings/coati/belly} |
| 42 |
\NewHook{tikzlings/coati/body} |
| 43 |
\NewHook{tikzlings/coati/foreground} |
| 44 |
|
| 45 |
\tikzset{ |
| 46 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 47 |
% |
| 48 |
% Pass unknown keys on to tikz |
| 49 |
% |
| 50 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 51 |
/coati/.search also={/tikz,/pgf,/thing}, |
| 52 |
/coati/.cd, |
| 53 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 54 |
% |
| 55 |
% body |
| 56 |
% |
| 57 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 58 |
body/.store in = \coati@body, |
| 59 |
body = brown!50!darkgray!97!yellow!50!darkgray, |
| 60 |
eyes/.store in = \coati@eyes, |
| 61 |
eyes = coati@bodybright!50!black, |
| 62 |
eye/.forward to = /coati/eyes, |
| 63 |
rotatehead/.store in = \coati@rotatehead, |
| 64 |
rotate head/.forward to = /coati/rotatehead, |
| 65 |
rotatehead = 0, |
| 66 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 67 |
% |
| 68 |
% options |
| 69 |
% |
| 70 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 71 |
3D/.code = \coati@threeDtrue, |
| 72 |
sideward/.code = \coati@sidewardtrue, |
| 73 |
leftstep/.code = \coati@leftsteptrue, |
| 74 |
left step/.forward to = /coati/leftstep, |
| 75 |
rightstep/.code = \coati@rightsteptrue, |
| 76 |
right step/.forward to = /coati/rightstep, |
| 77 |
back/.code = \coati@backtrue, |
| 78 |
contour/.code = \coati@contourtrue |
| 79 |
\def\coati@contour{#1}, |
| 80 |
contour/.default = black, |
| 81 |
outline/.forward to = /coati/contour, |
| 82 |
} |
| 83 |
|
| 84 |
\def\coati@draw{% |
| 85 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 86 |
% |
| 87 |
% minimal bounding box size |
| 88 |
% |
| 89 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 90 |
\path (-0.84,0.1) rectangle (1.63,2.26); |
| 91 |
% |
| 92 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 93 |
% |
| 94 |
% store the current scale factor |
| 95 |
% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494 |
| 96 |
% |
| 97 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 98 |
\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}% |
| 99 |
\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}% |
| 100 |
\pgfmathsetmacro{\xscalefactor}{\tmpscaleA} |
| 101 |
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD} |
| 102 |
% |
| 103 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 104 |
% |
| 105 |
% switch between 2D, 3D and contours, from |
| 106 |
% https://chat.stackexchange.com/transcript/message/45991801#45991801 |
| 107 |
% |
| 108 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 109 |
\ifcoati@threeD |
| 110 |
\def\coati@part@draw[##1]{\shade[ball color=##1]} |
| 111 |
\else% 3D |
| 112 |
\ifcoati@contour |
| 113 |
\def\coati@part@draw[##1]{\draw[##1,\coati@contour,fill=white,line width=\scalingfactor*0.4pt]} |
| 114 |
\else% contour |
| 115 |
\def\coati@part@draw[##1]{\fill[##1]} |
| 116 |
\fi% contour |
| 117 |
\fi% 3D |
| 118 |
% |
| 119 |
% |
| 120 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 121 |
% |
| 122 |
% generating saturated version of body colour |
| 123 |
% |
| 124 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 125 |
\extractcolorspecs{\coati@body}{\coati@model}{\coati@colorspec} |
| 126 |
\convertcolorspec{\coati@model}{\coati@colorspec}{hsb}{\coati@hsbcolorspec} |
| 127 |
\pgfmathsetmacro{\coati@hue}{(array({\coati@hsbcolorspec},0))} |
| 128 |
\pgfmathsetmacro{\coati@sat}{(array({\coati@hsbcolorspec},1)+0.1)} |
| 129 |
\pgfmathsetmacro{\coati@bright}{(array({\coati@hsbcolorspec},2))+0.13} |
| 130 |
\definecolor{coati@bodybright}{hsb}{\coati@hue,\coati@sat,\coati@bright} |
| 131 |
% |
| 132 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 133 |
% |
| 134 |
% Body parts |
| 135 |
% |
| 136 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 137 |
% |
| 138 |
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 139 |
\UseHook{tikzlings/coati/background} |
| 140 |
\UseHook{tikzlings/background} |
| 141 |
\csname coatihookbackground\endcsname |
| 142 |
\csname tikzlinghookbackground\endcsname |
| 143 |
% |
| 144 |
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 145 |
\ifcoati@leftstep |
| 146 |
\coati@part@draw[coati@bodybright!80!white] (-0.255,0.25) ellipse[x radius=0.23, y radius=0.09]; |
| 147 |
\else% step |
| 148 |
\coati@part@draw[coati@bodybright!80!white] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09]; |
| 149 |
\fi% step |
| 150 |
\ifcoati@rightstep |
| 151 |
\coati@part@draw[coati@bodybright!80!white] (0.255,0.25) ellipse[x radius=0.23, y radius=0.09]; |
| 152 |
\else% step |
| 153 |
\coati@part@draw[coati@bodybright!80!white] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09]; |
| 154 |
\fi% step |
| 155 |
% |
| 156 |
% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 157 |
\unless\ifcoati@back |
| 158 |
\coati@part@draw[\coati@body,overlay] (0.2845, 0.5595) .. controls (0.6382, 0.8326) and (0.7302, 1.5138) .. (1.0504, 1.6639) .. controls (1.3206, 1.7840) and (1.7609, 1.3537) .. (1.5608, 1.3437) .. controls (0.9203, 2.0442) and (0.8642, 0.6247) .. (0.5001, 0.3831) .. controls (0.3214, 0.2645) and (-0.1764, 0.1117) .. (-0.1408, 0.3245) .. controls (-0.1082, 0.5191) and (0.0508, 0.3791) .. (0.2845, 0.5595) -- cycle; |
| 159 |
\coati@part@draw[coati@bodybright!45!white!95!orange] (1.48, 1.554) -- (1.4139, 1.4752).. controls (1.4389, 1.4583) and (1.4649, 1.4375) .. (1.492, 1.4127) -- (1.5537, 1.4862).. controls (1.5333, 1.5087) and (1.5084, 1.5318) .. (1.48, 1.554) -- cycle; |
| 160 |
\coati@part@draw[coati@bodybright!45!white!95!orange] (1.2166, 1.6794) -- (1.2121, 1.5329).. controls (1.2432, 1.5385) and (1.2764, 1.5364) .. (1.3119, 1.5258) -- (1.3158, 1.6501).. controls (1.2832, 1.6633) and (1.2498, 1.6736) .. (1.2166, 1.6794) -- cycle; |
| 161 |
\coati@part@draw[coati@bodybright!45!white!95!orange] (1.0093, 1.6405).. controls (0.9821, 1.6229) and (0.9566, 1.6014) .. (0.9325, 1.5765) -- (1.0545, 1.4296).. controls (1.0777, 1.4572) and (1.1021, 1.4801) .. (1.1281, 1.4976) -- (1.0093, 1.6405) -- cycle; |
| 162 |
\coati@part@draw[coati@bodybright!45!white!95!orange](0.8327, 1.4466).. controls (0.8154, 1.4193) and (0.7988, 1.3901) .. (0.7823, 1.3602) -- (0.9497, 1.2635).. controls (0.9655, 1.2946) and (0.9818, 1.3236) .. (0.9987, 1.3507) -- (0.8327, 1.4466) -- cycle; |
| 163 |
\coati@part@draw[coati@bodybright!45!white!95!orange] (0.7253, 1.2508).. controls (0.7107, 1.2213) and (0.6961, 1.1912) .. (0.6814, 1.1607) -- (0.859, 1.0582).. controls (0.8717, 1.0897) and (0.8844, 1.1212) .. (0.8975, 1.1514) -- (0.7253, 1.2508) -- cycle; |
| 164 |
\coati@part@draw[coati@bodybright!45!white!95!orange] (0.5972, 0.9882).. controls (0.5821, 0.9583) and (0.5665, 0.9288) .. (0.5505, 0.8997) -- (0.7501, 0.7845).. controls (0.7627, 0.8154) and (0.7754, 0.8463) .. (0.7878, 0.8781) -- (0.5972, 0.9882) -- cycle; |
| 165 |
\coati@part@draw[coati@bodybright!45!white!95!orange] (0.464, 0.7574).. controls (0.4448, 0.7293) and (0.4248, 0.7022) .. (0.4037, 0.6767) -- (0.6357, 0.5427).. controls (0.6519, 0.5703) and (0.6676, 0.5997) .. (0.6828, 0.6311) -- (0.464, 0.7574) -- cycle; |
| 166 |
\coati@part@draw[coati@bodybright!45!white!95!orange](0.2881, 0.5624).. controls (0.2869, 0.5615) and (0.2857, 0.5604) .. (0.2845, 0.5595).. controls (0.2564, 0.5378) and (0.2295, 0.521) .. (0.2036, 0.5074) -- (0.3683, 0.3141).. controls (0.4022, 0.3288) and (0.4337, 0.3442) .. (0.461, 0.3595) -- (0.2881, 0.5624) -- cycle; |
| 167 |
\coati@part@draw[coati@bodybright!45!white!95!orange] (0.0822, 0.4628).. controls (0.0453, 0.4543) and (0.0123, 0.4501) .. (-0.0164, 0.445) -- (0.039, 0.2211).. controls (0.0701, 0.2242) and (0.1034, 0.23) .. (0.1379, 0.2379) -- (0.0822, 0.4628) -- cycle; |
| 168 |
\fi% back |
| 169 |
% |
| 170 |
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 171 |
\coati@part@draw[coati@bodybright!80!white] (-0.625,1) ellipse[x radius=0.42, y radius=0.13, rotate=70]; |
| 172 |
\coati@part@draw[coati@bodybright!80!white] (0.625,1) ellipse[x radius=0.42, y radius=0.13, rotate=-70]; |
| 173 |
% |
| 174 |
% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 175 |
\coati@part@draw[\coati@body] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle; |
| 176 |
% |
| 177 |
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 178 |
\UseHook{tikzlings/coati/belly} |
| 179 |
\UseHook{tikzlings/belly} |
| 180 |
\csname coatihookbelly\endcsname |
| 181 |
\csname tikzlinghookbelly\endcsname |
| 182 |
% |
| 183 |
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 184 |
\begin{scope}[rotate around={\coati@rotatehead:(0,1.68)}] |
| 185 |
% |
| 186 |
% Sidewards head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 187 |
\ifcoati@sideward |
| 188 |
% |
| 189 |
% Left Ear %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 190 |
\coati@part@draw[coati@bodybright!45!white!95!orange] (-0.212, 2.135) ellipse[x radius=0.09, y radius=0.12, rotate=-16]; |
| 191 |
\unless\ifcoati@back |
| 192 |
\coati@part@draw[coati@bodybright!80!white] (-0.212, 2.135) ellipse[x radius=0.065, y radius=0.09, rotate=-16]; |
| 193 |
\fi% back |
| 194 |
% |
| 195 |
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 196 |
\ifcoati@back |
| 197 |
\coati@part@draw[coati@bodybright!45!white!95!orange,overlay] (0.4569, 1.5608) .. controls (0.3680, 1.3594) and (0.0005, 1.2699) .. (-0.1826, 1.3507) .. controls (-0.3657, 1.4315) and (-0.5475, 1.7632) .. (-0.4587, 1.9646) .. controls (-0.1103, 2.3578) and (0.5123, 2.0832) .. (0.4569, 1.5608) -- cycle; |
| 198 |
\else% back |
| 199 |
\coati@part@draw[coati@bodybright!45!white!95!orange,overlay] (0.4808, 1.7911) .. controls (0.5682, 1.2837) and (-0.3468, 1.3575) .. (-0.6360, 1.3679) .. controls (-0.7582, 1.4729) and (-0.5198, 1.7911) .. (-0.5198, 1.7911) .. controls (-0.3597, 2.2914) and (0.3207, 2.2914) .. (0.4808, 1.7911) -- cycle; |
| 200 |
\fi% back |
| 201 |
% |
| 202 |
% Cheek %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 203 |
\unless\ifcoati@back |
| 204 |
\coati@part@draw[coati@bodybright!80!white] (0.30, 1.4552) .. controls (0.30, 1.4552) and (0.1016, 1.7565) .. (-0.0005, 1.7581) -- (-0.6360, 1.3679) .. controls (-0.3083, 1.3437) and (0.0283, 1.332) .. (0.30, 1.4552) -- cycle (-0.4166, 1.9824) .. controls (-0.4166, 1.9824) and (-0.2413, 1.9758) .. (-0.2226, 1.9112) -- (-0.6875, 1.4906) .. controls (-0.6875, 1.4906) and (-0.5712, 1.7549) .. (-0.4166, 1.9824) -- cycle; |
| 205 |
\fi% back |
| 206 |
% |
| 207 |
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 208 |
\unless\ifcoati@back |
| 209 |
\coati@part@draw[coati@bodybright!50!black] (-0.605, 1.453) circle[radius=0.09]; |
| 210 |
\fi% back |
| 211 |
% |
| 212 |
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 213 |
\unless\ifcoati@back |
| 214 |
\coati@part@draw[\coati@eyes] (0.007, 1.624) ellipse[x radius=0.04, y radius=0.06]; |
| 215 |
\coati@part@draw[\coati@eyes] (-0.38, 1.865) ellipse[x radius=0.035, y radius=0.055]; |
| 216 |
\fi% back |
| 217 |
% |
| 218 |
% Right Ear %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 219 |
\coati@part@draw[coati@bodybright!45!white!95!orange] (0.417, 1.875) ellipse[x radius=0.1, y radius=0.14, rotate=-16]; |
| 220 |
\unless\ifcoati@back |
| 221 |
\coati@part@draw[coati@bodybright!80!white] (0.417, 1.875) ellipse[x radius=0.07, y radius=0.10, rotate=-16]; |
| 222 |
\fi% back |
| 223 |
% |
| 224 |
% Normal Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 225 |
\else% sidewards |
| 226 |
% |
| 227 |
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 228 |
\ifcoati@back |
| 229 |
\coati@part@draw[coati@bodybright!45!white!95!orange,overlay] (0.5, 1.8) .. controls (0.5, 1.58) and (0.2, 1.35) .. (0, 1.35) .. controls (-0.2, 1.35) and (-0.5, 1.58) .. (-0.5, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.5, 1.8) -- cycle; |
| 230 |
\else% back |
| 231 |
\coati@part@draw[coati@bodybright!45!white!95!orange,overlay] (0.5, 1.8) .. controls (0.5, 1.58) and (0.2, 1.25) .. (0, 1.16) .. controls (-0.2, 1.25) and (-0.5, 1.58) .. (-0.5, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.5, 1.8) -- cycle; |
| 232 |
\fi% back |
| 233 |
% |
| 234 |
% Cheeks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 235 |
\unless\ifcoati@back |
| 236 |
\coati@part@draw[coati@bodybright!80!white] (-0.4935, 1.7443) .. controls (-0.4935, 1.7443) and (-0.1917, 1.7798) .. (-0.1371, 1.7333) .. controls (-0.07, 1.2) and (-0.07, 1.2) .. (-0.07, 1.2) .. controls (-0.259, 1.3169) and (-0.46, 1.5665) .. (-0.4935, 1.7443) -- cycle (0.4935, 1.7443) .. controls (0.4935, 1.7443) and (0.1917, 1.7798) .. (0.1371, 1.7333) .. controls (0.07, 1.2) and (0.07, 1.2) .. (0.07, 1.2) .. controls (0.259, 1.3169) and (0.46, 1.5665) .. (0.4935, 1.7443) -- cycle; |
| 237 |
\fi% back |
| 238 |
% |
| 239 |
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 240 |
\unless\ifcoati@back |
| 241 |
\coati@part@draw[coati@bodybright!50!black] (0, 1.248) circle[radius=0.09]; |
| 242 |
\fi% back |
| 243 |
% |
| 244 |
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 245 |
\unless\ifcoati@back |
| 246 |
\coati@part@draw[\coati@eyes] (0.23, 1.62) circle[radius=0.05]; |
| 247 |
\coati@part@draw[\coati@eyes] (-0.23, 1.62) circle[radius=0.05]; |
| 248 |
\fi% back |
| 249 |
% |
| 250 |
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 251 |
\coati@part@draw[coati@bodybright!45!white!95!orange] (0.44, 2.02) circle[radius=0.12]; |
| 252 |
\coati@part@draw[coati@bodybright!45!white!95!orange] (-0.44, 2.02) circle[radius=0.12]; |
| 253 |
\unless\ifcoati@back |
| 254 |
\coati@part@draw[coati@bodybright!80!white] (0.44, 2.02) circle[radius=0.09]; |
| 255 |
\coati@part@draw[coati@bodybright!80!white] (-0.44, 2.02) circle[radius=0.09]; |
| 256 |
\fi% back |
| 257 |
% |
| 258 |
\fi% sidewards |
| 259 |
\end{scope} |
| 260 |
% |
| 261 |
% Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 262 |
\ifcoati@back |
| 263 |
\coati@part@draw[\coati@body] (0.2845, 0.5595) .. controls (0.6382, 0.8326) and (0.7302, 1.5138) .. (1.0504, 1.6639) .. controls (1.3206, 1.7840) and (1.7609, 1.3537) .. (1.5608, 1.3437) .. controls (0.9203, 2.0442) and (0.8642, 0.6247) .. (0.5001, 0.3831) .. controls (0.3214, 0.2645) and (-0.1764, 0.1117) .. (-0.1408, 0.3245) .. controls (-0.1082, 0.5191) and (0.0508, 0.3791) .. (0.2845, 0.5595) -- cycle; |
| 264 |
\coati@part@draw[coati@bodybright!45!white!95!orange] (1.48, 1.554) -- (1.4139, 1.4752).. controls (1.4389, 1.4583) and (1.4649, 1.4375) .. (1.492, 1.4127) -- (1.5537, 1.4862).. controls (1.5333, 1.5087) and (1.5084, 1.5318) .. (1.48, 1.554) -- cycle; |
| 265 |
\coati@part@draw[coati@bodybright!45!white!95!orange] (1.2166, 1.6794) -- (1.2121, 1.5329).. controls (1.2432, 1.5385) and (1.2764, 1.5364) .. (1.3119, 1.5258) -- (1.3158, 1.6501).. controls (1.2832, 1.6633) and (1.2498, 1.6736) .. (1.2166, 1.6794) -- cycle; |
| 266 |
\coati@part@draw[coati@bodybright!45!white!95!orange] (1.0093, 1.6405).. controls (0.9821, 1.6229) and (0.9566, 1.6014) .. (0.9325, 1.5765) -- (1.0545, 1.4296).. controls (1.0777, 1.4572) and (1.1021, 1.4801) .. (1.1281, 1.4976) -- (1.0093, 1.6405) -- cycle; |
| 267 |
\coati@part@draw[coati@bodybright!45!white!95!orange](0.8327, 1.4466).. controls (0.8154, 1.4193) and (0.7988, 1.3901) .. (0.7823, 1.3602) -- (0.9497, 1.2635).. controls (0.9655, 1.2946) and (0.9818, 1.3236) .. (0.9987, 1.3507) -- (0.8327, 1.4466) -- cycle; |
| 268 |
\coati@part@draw[coati@bodybright!45!white!95!orange] (0.7253, 1.2508).. controls (0.7107, 1.2213) and (0.6961, 1.1912) .. (0.6814, 1.1607) -- (0.859, 1.0582).. controls (0.8717, 1.0897) and (0.8844, 1.1212) .. (0.8975, 1.1514) -- (0.7253, 1.2508) -- cycle; |
| 269 |
\coati@part@draw[coati@bodybright!45!white!95!orange] (0.5972, 0.9882).. controls (0.5821, 0.9583) and (0.5665, 0.9288) .. (0.5505, 0.8997) -- (0.7501, 0.7845).. controls (0.7627, 0.8154) and (0.7754, 0.8463) .. (0.7878, 0.8781) -- (0.5972, 0.9882) -- cycle; |
| 270 |
\coati@part@draw[coati@bodybright!45!white!95!orange] (0.464, 0.7574).. controls (0.4448, 0.7293) and (0.4248, 0.7022) .. (0.4037, 0.6767) -- (0.6357, 0.5427).. controls (0.6519, 0.5703) and (0.6676, 0.5997) .. (0.6828, 0.6311) -- (0.464, 0.7574) -- cycle; |
| 271 |
\coati@part@draw[coati@bodybright!45!white!95!orange](0.2881, 0.5624).. controls (0.2869, 0.5615) and (0.2857, 0.5604) .. (0.2845, 0.5595).. controls (0.2564, 0.5378) and (0.2295, 0.521) .. (0.2036, 0.5074) -- (0.3683, 0.3141).. controls (0.4022, 0.3288) and (0.4337, 0.3442) .. (0.461, 0.3595) -- (0.2881, 0.5624) -- cycle; |
| 272 |
\coati@part@draw[coati@bodybright!45!white!95!orange] (0.0822, 0.4628).. controls (0.0453, 0.4543) and (0.0123, 0.4501) .. (-0.0164, 0.445) -- (0.039, 0.2211).. controls (0.0701, 0.2242) and (0.1034, 0.23) .. (0.1379, 0.2379) -- (0.0822, 0.4628) -- cycle; |
| 273 |
\fi% back |
| 274 |
% |
| 275 |
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 276 |
\UseHook{tikzlings/coati/body} |
| 277 |
\UseHook{tikzlings/body} |
| 278 |
\csname coatihookbody\endcsname |
| 279 |
\csname tikzlinghookbody\endcsname |
| 280 |
% |
| 281 |
} |
| 282 |
|
| 283 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 284 |
%% |
| 285 |
%% Documentation |
| 286 |
%% |
| 287 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 288 |
%\clearpage |
| 289 |
%\section[Coati]{007, the coati} |
| 290 |
% |
| 291 |
%\emph{Named after a coati living in the zoo of M\"onchengladbach} |
| 292 |
% |
| 293 |
%\subsection{Package name} |
| 294 |
% |
| 295 |
%\begin{tcolorbox}[title={Package usage}] |
| 296 |
%\begin{samcode} |
| 297 |
%\usepackage{tikzlings-coatis} |
| 298 |
%\end{samcode} |
| 299 |
%\end{tcolorbox} |
| 300 |
% |
| 301 |
%\subsection{Basic Usage} |
| 302 |
% |
| 303 |
%\begin{tcblisting}{title={Basic coati}} |
| 304 |
%\coati |
| 305 |
%\end{tcblisting} |
| 306 |
% |
| 307 |
%\subsection{Options} |
| 308 |
% |
| 309 |
%The basic coati can be modified by changing its colour: |
| 310 |
%\begin{tcblisting}{title={Body colour}} |
| 311 |
%\coati[body=blue] |
| 312 |
%\end{tcblisting} |
| 313 |
% |
| 314 |
%In addition to the colour of the body, the colour of the eyes can be adjusted: |
| 315 |
%\begin{tcblisting}{title={Eye colour}} |
| 316 |
%\coati[eyes=red] |
| 317 |
%\end{tcblisting} |
| 318 |
% |
| 319 |
%The head of the coati can be rotated, but please don't overdo this, otherwise his neck might break! |
| 320 |
%\begin{tcblisting}{title={Rotate head}} |
| 321 |
%\coati[rotatehead=-15] |
| 322 |
%\end{tcblisting} |
| 323 |
% |
| 324 |
%For the head an alternative sidewards facing head is available. It can be combined with the \saminline|rotatehead| option. |
| 325 |
%\begin{tcblisting}{title={Sidewards head}} |
| 326 |
%\coati[sideward] |
| 327 |
%\end{tcblisting} |
| 328 |
% |
| 329 |
%And the coati can lift its legs: |
| 330 |
%\begin{tcblisting}{title={Walking}} |
| 331 |
%\coati[leftstep] |
| 332 |
%\coati[rightstep,xshift=2cm] |
| 333 |
%\end{tcblisting} |
| 334 |
% |
| 335 |
%To view the coati from behind: |
| 336 |
%\begin{tcblisting}{title={Back view}} |
| 337 |
%\coati[back] |
| 338 |
%\end{tcblisting} |
| 339 |
% |
| 340 |
%The key \saminline|3D| will make the coati 3-dimensional: |
| 341 |
%\begin{tcblisting}{title={3D view}} |
| 342 |
%\coati[3D] |
| 343 |
%\end{tcblisting} |
| 344 |
% |
| 345 |
%And finally the \saminline|contour| key will only draw the outlines: |
| 346 |
%\begin{tcblisting}{title={Contours}} |
| 347 |
%\coati[contour=black] |
| 348 |
%\end{tcblisting} |