This is a drawing of Totoro, the star of the Japanese animated fantasy film "My Neighbor Totoro".
The Koch snowflake fractal has been used to draw snow, repetitive tasks are done in "foreach" loops.
Do you have a question regarding this example, TikZ or LaTeX in general? Just ask in the
LaTeX Forum.
Oder frag auf Deutsch auf TeXwelt.de.
En français: TeXnique.fr.
% Totoro sitting in the snow
% By Noa Hoffmann and Pascal Günthner, 21.12.2020
\documentclass[tikz,11pt]standalone ?>
\usepackage{calligra}
\usepackage[T1]{fontenc}
\usetikzlibrary{%
shapes, shadows, patterns, calc,
decorations.shapes,
decorations.fractals,
decorations.markings,
decorations.pathmorphing
}
\colorlet{bodycolor}{black!35!gray!60!brown!98!green}
\colorlet{bellycolor}{yellow!70!white!92!green}
\tikzset{
furspot/.pic = {
\path [draw = black, thick, fill] (0,0)
.. controls +(0.3,0) and +(0.25,-0.05) .. ++(0.35,-.45)
.. controls +(-0.45,0.25) and +(0.1,0) .. ++(-0.85,-0.05)
.. controls +(-0.3,0.1) and +(-0.4, 0) .. cycle;
},
claw/.pic = {
\path [fill = bodycolor!70, draw] (0,0) arc (0:45:0.2 and 0.8)
arc (135:180:0.2 and 0.8)
arc (180:360:0.059) -- cycle;
},
whiskers/.pic = {
\path [fill = bodycolor!70,draw] (0,0) arc (0:45:0.05 and 2.3)
arc (135:180:0.3 and 2.3)
to[out=-90,in=-90] cycle;
},
snowflake/.pic = {
\fill [decoration = Koch snowflake, white] decorate{ decorate{
decorate{ (-0.5,-0.3) -- ++(60:1) -- ++(-60:1) -- cycle ?>};
\foreach \i in {30, 90, 150, 210, 270, 330} {
\draw[blue!50!white,very thin] (0,0) -- +(\i:0.3);
}
\draw[decoration = Koch snowflake, blue!50!white, very thin]
decorate{($(0,0)+(60:0.2)$) -- ($(0,0)+(300:0.2)$) --
($(0,0)+(180:0.2)$) -- cycle};
}
}
\tikzset{
snow/.style = {decoration = {random steps, segment length = 2mm,
amplitude = 0.4mm}, decorate},
plush/.style = {decoration = {random steps, segment length = 1mm,
amplitude = 0.5mm},decorate}
}
\begin{document}
\begin{tikzpicture}[color = bodycolor, draw = black, thick]
%---------------------background and tail----------------------
% blue sky
\fill[blue!30!white] (-8cm,-11cm) rectangle (8cm,10cm);
% random snowflakes
\foreach \i in {0.1,0.11,...,1}{
\pic [scale = \i, opacity = 0.9] at (rand*7.5, rnd*18-10.5) {snowflake};}
% more tiny snowflakes
\foreach \i in {0.1,0.11,...,0.5}{
\pic [scale = \i, opacity = 0.9] at (rand*7.5, rnd*18-10.5) {snowflake};}
% cloud with merry christmas
\node [cloud,aspect = 6.5, cloud puff arc = 120, cloud puffs = 12.9, fill = white,
color = white] at (0,7) {\Huge M \hspace{9.8cm}.};
\node [color = red] at (0,7) {\fontsize{50}{80}
\textbf{Merry Christmas \quad ?>;
% tail
\path [draw, fill, rotate = 50] (-4,-7.5) circle (1.5 and 2.2);
% snowhill
\fill [draw, gray!6, snow] (-8,-11) to[in=200, out=0] (-3,-7.5) to (3,-7.5)
to[out=-20, in=180] (8,-11);
%--------------------body-----------------------------------------
% right ear
\path [fill, draw] (0.6,2.3)+(-45:1) arc (-60:35:1 and 1.5)
arc (115:210:1 and 1.5);
% left ear
\path [fill, draw] (-0.6,2.3)+(-135:1) arc (-120:-215:1 and 1.5)
arc (65:-30:1 and 1.5);
% head
\path [draw, fill] ($(0,0)+(170等着你
:2.5 and 2)$) arc (170:10:2.5 and 2)
arc(35:-20: 3 and 2)
-- ($(0,-0.8)+(200:3 and 2)$) arc (200:145:3 and 2) -- cycle;
% body
\path[fill] ($(0,-4)+(200:4 and 4.5)$) arc (200:-20:4 and 4.5);
%----------------------face----------------------------------------
% left eye
\path [draw, fill = white] (-1.4,0.7) circle (0.45 and 0.4);
\fill [black] (-1.2,0.7) circle (0.16);
\fill [white] (-1.24,0.74) circle (0.03);
% right eye
\path [draw, fill = white, thick] (1.4,0.7) circle (0.4);
\fill [black] (1.25,0.7) circle (0.16);
\fill [white] (1.20,0.74) circle (0.03);
% nose
\path [draw] (0.35, 0.7) .. controls (0.2,0.8) and (-0.2, 0.8)
.. (-0.35, 0.7);
\path [fill = black] (0, 0.53) -- (0.25, 0.6)
.. controls (0.3,0.75) and (-0.3, 0.75)
.. (-0.25, 0.6) -- cycle;
\pic [scale = 0.3] at (0,0.8) {snowflake};
% mouth
\draw (-0.05,-0.5) arc (140:85:0.2 and 0.1);
% whiskers
\foreach \i/\j/\k/\l/\m in
{80/1/1.5/-2/0,
-90/-1/1.5/-2.2/-0.2,
-80/-0.8/1.5/-2.5/-0.5,
-80/1/1.3/2.2/0,
90/-1/1.3/2.4/-0.2,
80/-1/1.3/2.6/-0.4}
\pic [rotate = \i, scale = \j, yscale = \k] at (\l,\m) {whiskers};
%-----------------------------arms----------------------------------
% handclaws
\foreach \i in {-4,-3.8,-3.6,3.9,3.7,3.5} { \pic [rotate = 180]
at (\i,-6.5) {claw};}
% left arm
\path [draw, fill] (-3, -1) .. controls (-5.5,-3.5) and (-4.5,-7.5)
.. (-3.35,-6.45);
% right arm
\path [draw, fill] (3, -1) .. controls (5.5,-3.5) and (4.5,-7.5)
.. (3.35,-6.45);
%------------------------belly----------------------------------
\draw[fill = bellycolor] ($(0,-4.7)+(230:3.8 and 4)$)
to [out = -10,in = 190] ($(等着你
0,-4.7)+(-50:3.8 and 4)$)
to ($(0,-4)+(-50:4.5)$)
to [out = 60, in = -70] ($(0,-4.7)+(50:3.8 and 4)$)
arc (50:130:3.8 and 4)
to [out = -110, in = 120] ($(0,-4)+(-130:4.5)$)
to cycle;
% fur spots
\foreach \i/\j/\k in {0/0/-1.3, -15/1.6/-1.5, 15/-1.6/-1.5,
-8/0.7/-2.2, 8/-0.7/-2.2, -22/2.2/-2.5, 22/-2.2/-2.5} {
\pic [rotate = \i] at (\j, \k) {furspot};}
%------------------------legs and feet--------------------------
%legs
\path [draw, rotate = 32, fill] (-5.8,-5.2) circle (0.9 and 1.4);
\path [draw, rotate = -32, fill] (5.8,-5.2) circle (0.9 and 1.4);
% left feet
\path [draw, fill, rotate = 30] (-5.6,-6.1) circle (0.65 and 0.6);
\path [draw, fill, rotate = -30] (5.6,-6.1) circle (0.65 and 0.6);
% toe beans
\path [draw, fill = bodycolor!50!white, rotate = 45] (-7,-4.7)
circle (0.3 and 0.17);
\path [draw ,fill = bodycolor!50!white, rotate = -45] (7,-4.7)
circle (0.3 and 0.17);
% footclaws
\foreach \i/\j/\k in {50/-2.2/-7.9,40/-2/-7.7,30/-1.75/-7.55,
-50/2.3/-8,-40/2.1/-7.8,-30/1.85/-7.65} {
\pic [rotate = \i] at (\j,\k等着你
) {claw};}
% hat
\path [draw, fill = red] (43:2.5) to [in = -170, out = 130] ($(0.7,3)+(195:0.4)$)
to [in = 180, out = 90] (0.7,3.1) to [out = 150, in = 0] (0,3.3)
to [in = 50, out = 180] (137:2.5);
\fill [draw, plush, fill = white, thin] (145:2.5 and 2) to [in = 160, out = 20]
(35:2.5 and 2)
to [out = 80, in = -80] ++(0,0.5) to [out = 160, in = 20] ($(145:2.5 and 2) +(0,0.5)$)
to [in = 100, out = -100] cycle;
\fill [draw, plush, fill = white, thin] (0.7,3.1) circle (0.5);
\end{tikzpicture}
\end{document}
Comments
Adding comments is currently not enabled.