Skip to main content
`pic` instead of tikzpicture in a box
Source Link
Alain Matthes
  • 99.9k
  • 9
  • 220
  • 360

Christmas tree with balls, candles and snowflakes

Now pic is very useful. An update was necessary

Instead of

\documentclass[11pt]{scrartcl} \usepackage[dvipsnames,svgnames]{xcolor} \usepackage{tikz} \usetikzlibrary{shapes,decorations.shapes} \newsavebox{\mycandle} \savebox{\mycandle}{ \begin{tikzpicture}[scale=.1] \shade[top color=yellow,bottom color=red] (0,0) .. controls (1,.2) and (1,.5) .. (0,2) .. controls (-1,.5) and (-1,.2) .. (0,0); \fill[yellow!90!black] (.8,0) rectangle (-.8,-5); \end{tikzpicture} } \tikzset{ paint/.style={draw=#1!50!black, fill=#1!50}, my star/.style={decorate,decoration={shape backgrounds,shape=star}, star points=#1} } \begin{document} \begin{tikzpicture} \draw[fill=Maroon,ultra thick] (.75,-1) .. controls (.5,.5) and (.5,3) .. (0.5,4) -- (-0.5,4) .. controls (-.5,3) and (-.5,.5) .. (-.75,-1) ; \draw[ultra thick,fill=green!50!black] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; \foreach \candle in {(2,5),(-2,5),(0.5,7.5),(-0.5,7.5),(-3,2.5), (3,2.5), (1.5,1.75),(-1.5,1.75)} \node at \candle {\usebox{\mycandle}} ; \node [star, star point height=.5cm, minimum size=.5cm, draw,fill=yellow,thick] at (0,10) {}; \begin{scope}[decoration={shape sep=.2cm, shape size=.25cm}] \draw [my star=6, paint=red] (-4,2) .. controls (0,2) and (1,3.5) .. (1,4.5) .. controls (1,6) and (0.5,6) .. (0.5,7.25); \draw [my star=6, paint=blue] (4,2) .. controls (0,2) and (-1,3.5) .. (-1,4.5) .. controls (-1,6) and (-0.5,6) .. (-0.5,7.25); \end{scope} \end{tikzpicture} \end{document}  

enter image description here\tikzset{ mycandle/.pic ...

Update version 2 : The snow arrives, I added some balls and a shade on the treecode

\documentclass[11pt]% !TEX TS-program = pdflatex \documentclass[border=2mm]{scrartclstandalone}  \usepackage[dvipsnames\usepackage[usenames,svgnames]dvipsnames]{xcolor}  \usepackage{tikz} \usetikzlibrary{% shapes, decorations.shapes, decorations.fractals, decorations.markings, shadows }  \newsavebox\usetikzlibrary{\mycandle shapes,decorations.shapes,decorations.fractals,decorations.markings,shadows} \savebox{\mycandle}{  \begin\tikzset{tikzpicture}[scale= mycandle/.1]pic={ \shade[top color=yellow,bottom color=red] (0,0) .. controls (1,.2) and (1,.5) .. (0,2) .. controls (-1,.5) and (-1,.2) .. (0,0); \fill[yellow!90!black] (.8,0) rectangle (-.8,-5);  \end{tikzpicture} }  \tikzset{ paint/.style={draw=#1!50!black, fill=#1!50}, my star/.style={decorate,decoration={shape backgrounds,shape=star}, star points=#1}  }      \begin{document} \begin{tikzpicture}[ ball[every redpic/.style={ decorate, decoration={ markings, mark=between positions scale=.2 and 1 step 3cm with { \pgfmathsetmacro{\sz}{2 + .5 *,transform randshape}  \path[shading=ball,ball color=red] (0,0) circle[radius=\sz mm]; }   }  } ,ball bluered/.style={ decorate,  decoration={  markings, mark=between positions 0.12 and .91 step 3cm with {  \pgfmathsetmacro{\sz}{2 + .5 * rand} \path[shading=ball,ball color=blue]color=red] (0,0) circle[radius=\sz mm]; }}}, }  ball blue/.style={decorate, }decoration={ markings, mark=between positions 0.1 and .9 step 3cm   with {\pgfmathsetmacro{\sz}{2 + .5 * rand}  \path[shading=ball,ball color=blue] (0,0) circle[radius=\sz mm]; }}}] \draw[fill=Maroon,ultra thick] (.75,-1) .. controls (.5,.5) and (.5,3) .. (0.5,4) -- (-0.5,4) .. controls (-.5,3) and (-.5,.5) .. (-.75,-1) ; \shade[ultra\draw[ultra thick, top color=green!90!black,bottom color=greenfill=green!1050!black] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; \foreach\pic foreach \candle in {(2,5),(-2,5),(0.5,7.5),(-0.5,7.5),(-3,2.5), (3,2.5), (1.5,1.75),(-1.5,1.75)} \node at \candle {\usebox{\mycandle}mycandle} ;    \node [star, star point height=.5cm, minimum size=.5cm,draw,fill=yellow,thick] at (0,10) {}; \begin{scope}[decoration={shape sep=.2cm, shape size=.25cm}] \draw [my star=6, paint=red] (-4,2) .. controls (0,2) and (1,3.5) .. (1,4.40); \draw [my star=6, paint=red] (-1.5,5.40) .. controls (0,5.40) and (0.5,6.5) .. (0.5,7); \draw [my star=6, paint=blue] (4,2) .. controls (0,2) and (-1,3.5) .. (-1,4.40); \draw [my star=6, paint=blue] (1.5,5.40) .. controls (0,5.40) and (-0.5,6.5) .. (-0.5,7); \end{scope} % the balls \path[ball red] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; \path[ball blue] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; % the snow \foreach \i in {0.5,0.6,...,1.6} \fill [white!80!blue,decoration=Koch snowflake,opacity=.9] [shift={(rand*5,rnd*8)},scale=\i] [double copy shadow={opacity=0.2,shadow xshift=0pt, shadow yshift=3*\i pt,fill=white,draw=none}] decorate { decorate { decorate { (0,0) -- ++(60:1) -- ++(-60:1) -- cycle } } }; \end{tikzpicture}   \end{document} 
\documentclass[11pt]{scrartcl} \usepackage[dvipsnames,svgnames]{xcolor} \usepackage{tikz} \usetikzlibrary{shapes,decorations.shapes} \newsavebox{\mycandle} \savebox{\mycandle}{ \begin{tikzpicture}[scale=.1] \shade[top color=yellow,bottom color=red] (0,0) .. controls (1,.2) and (1,.5) .. (0,2) .. controls (-1,.5) and (-1,.2) .. (0,0); \fill[yellow!90!black] (.8,0) rectangle (-.8,-5); \end{tikzpicture} } \tikzset{ paint/.style={draw=#1!50!black, fill=#1!50}, my star/.style={decorate,decoration={shape backgrounds,shape=star}, star points=#1} } \begin{document} \begin{tikzpicture} \draw[fill=Maroon,ultra thick] (.75,-1) .. controls (.5,.5) and (.5,3) .. (0.5,4) -- (-0.5,4) .. controls (-.5,3) and (-.5,.5) .. (-.75,-1) ; \draw[ultra thick,fill=green!50!black] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; \foreach \candle in {(2,5),(-2,5),(0.5,7.5),(-0.5,7.5),(-3,2.5), (3,2.5), (1.5,1.75),(-1.5,1.75)} \node at \candle {\usebox{\mycandle}} ; \node [star, star point height=.5cm, minimum size=.5cm, draw,fill=yellow,thick] at (0,10) {}; \begin{scope}[decoration={shape sep=.2cm, shape size=.25cm}] \draw [my star=6, paint=red] (-4,2) .. controls (0,2) and (1,3.5) .. (1,4.5) .. controls (1,6) and (0.5,6) .. (0.5,7.25); \draw [my star=6, paint=blue] (4,2) .. controls (0,2) and (-1,3.5) .. (-1,4.5) .. controls (-1,6) and (-0.5,6) .. (-0.5,7.25); \end{scope} \end{tikzpicture} \end{document}  

enter image description here

Update version 2 : The snow arrives, I added some balls and a shade on the tree

\documentclass[11pt]{scrartcl}  \usepackage[dvipsnames,svgnames]{xcolor}  \usepackage{tikz} \usetikzlibrary{% shapes, decorations.shapes, decorations.fractals, decorations.markings, shadows }  \newsavebox{\mycandle} \savebox{\mycandle}{  \begin{tikzpicture}[scale=.1] \shade[top color=yellow,bottom color=red] (0,0) .. controls (1,.2) and (1,.5) .. (0,2) .. controls (-1,.5) and (-1,.2) .. (0,0); \fill[yellow!90!black] (.8,0) rectangle (-.8,-5);  \end{tikzpicture} }  \tikzset{ paint/.style={draw=#1!50!black, fill=#1!50}, my star/.style={decorate,decoration={shape backgrounds,shape=star}, star points=#1}  }    \begin{document} \begin{tikzpicture}[ ball red/.style={ decorate, decoration={ markings, mark=between positions .2 and 1 step 3cm with { \pgfmathsetmacro{\sz}{2 + .5 * rand}  \path[shading=ball,ball color=red] (0,0) circle[radius=\sz mm]; }   }  } ,ball blue/.style={ decorate,  decoration={  markings, mark=between positions 0.1 and .9 step 3cm with {  \pgfmathsetmacro{\sz}{2 + .5 * rand} \path[shading=ball,ball color=blue] (0,0) circle[radius=\sz mm]; }  } } ] \draw[fill=Maroon,ultra thick] (.75,-1) .. controls (.5,.5) and (.5,3) .. (0.5,4) -- (-0.5,4) .. controls (-.5,3) and (-.5,.5) .. (-.75,-1) ; \shade[ultra thick, top color=green!90!black,bottom color=green!10!black] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; \foreach \candle in {(2,5),(-2,5),(0.5,7.5),(-0.5,7.5),(-3,2.5), (3,2.5), (1.5,1.75),(-1.5,1.75)} \node at \candle {\usebox{\mycandle}} ; \node [star, star point height=.5cm, minimum size=.5cm,draw,fill=yellow,thick] at (0,10) {}; \begin{scope}[decoration={shape sep=.2cm, shape size=.25cm}] \draw [my star=6, paint=red] (-4,2) .. controls (0,2) and (1,3.5) .. (1,4.40); \draw [my star=6, paint=red] (-1.5,5.40) .. controls (0,5.40) and (0.5,6.5) .. (0.5,7); \draw [my star=6, paint=blue] (4,2) .. controls (0,2) and (-1,3.5) .. (-1,4.40); \draw [my star=6, paint=blue] (1.5,5.40) .. controls (0,5.40) and (-0.5,6.5) .. (-0.5,7); \end{scope} % the balls \path[ball red] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; \path[ball blue] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; % the snow \foreach \i in {0.5,0.6,...,1.6} \fill [white!80!blue,decoration=Koch snowflake,opacity=.9] [shift={(rand*5,rnd*8)},scale=\i] [double copy shadow={opacity=0.2,shadow xshift=0pt, shadow yshift=3*\i pt,fill=white,draw=none}] decorate { decorate { decorate { (0,0) -- ++(60:1) -- ++(-60:1) -- cycle } } }; \end{tikzpicture}   \end{document} 

Christmas tree with balls, candles and snowflakes

Now pic is very useful. An update was necessary

Instead of

\newsavebox{\mycandle} \savebox{\mycandle}{ \begin{tikzpicture}[scale=.1] \shade[top color=yellow,bottom color=red] (0,0) .. controls (1,.2) and (1,.5) .. (0,2) .. controls (-1,.5) and (-1,.2) .. (0,0); \fill[yellow!90!black] (.8,0) rectangle (-.8,-5); \end{tikzpicture} } 

\tikzset{ mycandle/.pic ...

The code

% !TEX TS-program = pdflatex \documentclass[border=2mm]{standalone} \usepackage[usenames,dvipsnames]{xcolor} \usepackage{tikz} \usetikzlibrary{ shapes,decorations.shapes,decorations.fractals,decorations.markings,shadows} \tikzset{ mycandle/.pic={ \shade[top color=yellow,bottom color=red] (0,0) .. controls (1,.2) and (1,.5) .. (0,2) .. controls (-1,.5) and (-1,.2) .. (0,0); \fill[yellow!90!black] (.8,0) rectangle (-.8,-5); }} \tikzset{ paint/.style={draw=#1!50!black, fill=#1!50}, my star/.style={decorate,decoration={shape backgrounds,shape=star},star points=#1}}   \begin{document} \begin{tikzpicture}[every pic/.style={scale=.1,transform shape} , ball red/.style={ decorate, decoration={ markings,mark=between positions .2 and 1 step 3cm with { \pgfmathsetmacro{\sz}{2 + .5 * rand} \path[shading=ball,ball color=red] (0,0) circle[radius=\sz mm]; }}}, ball blue/.style={decorate, decoration={ markings, mark=between positions 0.1 and .9 step 3cm   with {\pgfmathsetmacro{\sz}{2 + .5 * rand}  \path[shading=ball,ball color=blue] (0,0) circle[radius=\sz mm]; }}}] \draw[fill=Maroon,ultra thick] (.75,-1) .. controls (.5,.5) and (.5,3) .. (0.5,4) -- (-0.5,4) .. controls (-.5,3) and (-.5,.5) .. (-.75,-1) ; \draw[ultra thick,fill=green!50!black] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; \pic foreach \candle in {(2,5),(-2,5),(0.5,7.5),(-0.5,7.5),(-3,2.5), (3,2.5), (1.5,1.75),(-1.5,1.75)} at \candle {mycandle} ;    \node [star, star point height=.5cm, minimum size=.5cm,draw,fill=yellow,thick] at (0,10) {}; \begin{scope}[decoration={shape sep=.2cm, shape size=.25cm}] \draw [my star=6, paint=red] (-4,2) .. controls (0,2) and (1,3.5) .. (1,4.40); \draw [my star=6, paint=red] (-1.5,5.40) .. controls (0,5.40) and (0.5,6.5) .. (0.5,7); \draw [my star=6, paint=blue] (4,2) .. controls (0,2) and (-1,3.5) .. (-1,4.40); \draw [my star=6, paint=blue] (1.5,5.40) .. controls (0,5.40) and (-0.5,6.5) .. (-0.5,7); \end{scope} % the balls \path[ball red] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; \path[ball blue] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; % the snow \foreach \i in {0.5,0.6,...,1.6} \fill [white!80!blue,decoration=Koch snowflake,opacity=.9] [shift={(rand*5,rnd*8)},scale=\i] [double copy shadow={opacity=0.2,shadow xshift=0pt, shadow yshift=3*\i pt,fill=white,draw=none}] decorate { decorate { decorate { (0,0) -- ++(60:1) -- ++(-60:1) -- cycle } } }; \end{tikzpicture} \end{document} 
added 52 characters in body
Source Link
Alain Matthes
  • 99.9k
  • 9
  • 220
  • 360

Update version 2 : The snow arrives and, I added some balls and a shade on the tree

\documentclass[11pt]{scrartcl} \usepackage[dvipsnames,svgnames]{xcolor} \usepackage{tikz} \usetikzlibrary{% shapes, decorations.shapes, decorations.fractals, decorations.markings, shadows } \newsavebox{\mycandle} \savebox{\mycandle}{ \begin{tikzpicture}[scale=.1] \shade[top color=yellow,bottom color=red] (0,0) .. controls (1,.2) and (1,.5) .. (0,2) .. controls (-1,.5) and (-1,.2) .. (0,0); \fill[yellow!90!black] (.8,0) rectangle (-.8,-5); \end{tikzpicture} } \tikzset{ paint/.style={draw=#1!50!black, fill=#1!50}, my star/.style={decorate,decoration={shape backgrounds,shape=star}, star points=#1} } \begin{document} \begin{tikzpicture}[ ball red/.style={ decorate, decoration={ markings, mark=between positions .2 and 1 step 3cm with { \pgfmathsetmacro{\sz}{2 + .5 * rand} \path[shading=ball,ball color=red] (0,0) circle[radius=\sz mm]; } } } ,ball blue/.style={ decorate, decoration={ markings, mark=between positions 0.1 and .9 step 3cm with { \pgfmathsetmacro{\sz}{2 + .5 * rand} \path[shading=ball,ball color=blue] (0,0) circle[radius=\sz mm]; } } } ] \draw[fill=Maroon,ultra thick] (.75,-1) .. controls (.5,.5) and (.5,3) .. (0.5,4) -- (-0.5,4) .. controls (-.5,3) and (-.5,.5) .. (-.75,-1) ; \draw[ultra\shade[ultra thick,fill=green top color=green!5090!black,bottom color=green!10!black] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; \foreach \candle in {(2,5),(-2,5),(0.5,7.5),(-0.5,7.5),(-3,2.5), (3,2.5), (1.5,1.75),(-1.5,1.75)} \node at \candle {\usebox{\mycandle}} ; \node [star, star point height=.5cm, minimum size=.5cm,draw,fill=yellow,thick] at (0,10) {}; \begin{scope}[decoration={shape sep=.2cm, shape size=.25cm}] \draw [my star=6, paint=red] (-4,2) .. controls (0,2) and (1,3.5) .. (1,4.40); \draw [my star=6, paint=red] (-1.5,5.40) .. controls (0,5.40) and (0.5,6.5) .. (0.5,7); \draw [my star=6, paint=blue] (4,2) .. controls (0,2) and (-1,3.5) .. (-1,4.40); \draw [my star=6, paint=blue] (1.5,5.40) .. controls (0,5.40) and (-0.5,6.5) .. (-0.5,7); \end{scope} % the balls \path[ball red] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; \path[ball blue] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; % the snow \foreach \i in {0.5,0.6,...,1.6} \fill [white!80!blue,decoration=Koch snowflake,opacity=.9] [shift={(rand*5,rnd*8)},scale=\i] [double copy shadow={opacity=0.2,shadow xshift=0pt, shadow yshift=3*\i pt,fill=white,draw=none}] decorate { decorate { decorate { (0,0) -- ++(60:1) -- ++(-60:1) -- cycle } } }; \end{tikzpicture} \end{document} 

enter image description hereenter image description here

Update version : The snow arrives and I added some balls

\documentclass[11pt]{scrartcl} \usepackage[dvipsnames,svgnames]{xcolor} \usepackage{tikz} \usetikzlibrary{% shapes, decorations.shapes, decorations.fractals, decorations.markings, shadows } \newsavebox{\mycandle} \savebox{\mycandle}{ \begin{tikzpicture}[scale=.1] \shade[top color=yellow,bottom color=red] (0,0) .. controls (1,.2) and (1,.5) .. (0,2) .. controls (-1,.5) and (-1,.2) .. (0,0); \fill[yellow!90!black] (.8,0) rectangle (-.8,-5); \end{tikzpicture} } \tikzset{ paint/.style={draw=#1!50!black, fill=#1!50}, my star/.style={decorate,decoration={shape backgrounds,shape=star}, star points=#1} } \begin{document} \begin{tikzpicture}[ ball red/.style={ decorate, decoration={ markings, mark=between positions .2 and 1 step 3cm with { \pgfmathsetmacro{\sz}{2 + .5 * rand} \path[shading=ball,ball color=red] (0,0) circle[radius=\sz mm]; } } } ,ball blue/.style={ decorate, decoration={ markings, mark=between positions 0.1 and .9 step 3cm with { \pgfmathsetmacro{\sz}{2 + .5 * rand} \path[shading=ball,ball color=blue] (0,0) circle[radius=\sz mm]; } } } ] \draw[fill=Maroon,ultra thick] (.75,-1) .. controls (.5,.5) and (.5,3) .. (0.5,4) -- (-0.5,4) .. controls (-.5,3) and (-.5,.5) .. (-.75,-1) ; \draw[ultra thick,fill=green!50!black] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; \foreach \candle in {(2,5),(-2,5),(0.5,7.5),(-0.5,7.5),(-3,2.5), (3,2.5), (1.5,1.75),(-1.5,1.75)} \node at \candle {\usebox{\mycandle}} ; \node [star, star point height=.5cm, minimum size=.5cm,draw,fill=yellow,thick] at (0,10) {}; \begin{scope}[decoration={shape sep=.2cm, shape size=.25cm}] \draw [my star=6, paint=red] (-4,2) .. controls (0,2) and (1,3.5) .. (1,4.40); \draw [my star=6, paint=red] (-1.5,5.40) .. controls (0,5.40) and (0.5,6.5) .. (0.5,7); \draw [my star=6, paint=blue] (4,2) .. controls (0,2) and (-1,3.5) .. (-1,4.40); \draw [my star=6, paint=blue] (1.5,5.40) .. controls (0,5.40) and (-0.5,6.5) .. (-0.5,7); \end{scope} % the balls \path[ball red] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; \path[ball blue] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; % the snow \foreach \i in {0.5,0.6,...,1.6} \fill [white!80!blue,decoration=Koch snowflake,opacity=.9] [shift={(rand*5,rnd*8)},scale=\i] [double copy shadow={opacity=0.2,shadow xshift=0pt, shadow yshift=3*\i pt,fill=white,draw=none}] decorate { decorate { decorate { (0,0) -- ++(60:1) -- ++(-60:1) -- cycle } } }; \end{tikzpicture} \end{document} 

enter image description here

Update version 2 : The snow arrives, I added some balls and a shade on the tree

\documentclass[11pt]{scrartcl} \usepackage[dvipsnames,svgnames]{xcolor} \usepackage{tikz} \usetikzlibrary{% shapes, decorations.shapes, decorations.fractals, decorations.markings, shadows } \newsavebox{\mycandle} \savebox{\mycandle}{ \begin{tikzpicture}[scale=.1] \shade[top color=yellow,bottom color=red] (0,0) .. controls (1,.2) and (1,.5) .. (0,2) .. controls (-1,.5) and (-1,.2) .. (0,0); \fill[yellow!90!black] (.8,0) rectangle (-.8,-5); \end{tikzpicture} } \tikzset{ paint/.style={draw=#1!50!black, fill=#1!50}, my star/.style={decorate,decoration={shape backgrounds,shape=star}, star points=#1} } \begin{document} \begin{tikzpicture}[ ball red/.style={ decorate, decoration={ markings, mark=between positions .2 and 1 step 3cm with { \pgfmathsetmacro{\sz}{2 + .5 * rand} \path[shading=ball,ball color=red] (0,0) circle[radius=\sz mm]; } } } ,ball blue/.style={ decorate, decoration={ markings, mark=between positions 0.1 and .9 step 3cm with { \pgfmathsetmacro{\sz}{2 + .5 * rand} \path[shading=ball,ball color=blue] (0,0) circle[radius=\sz mm]; } } } ] \draw[fill=Maroon,ultra thick] (.75,-1) .. controls (.5,.5) and (.5,3) .. (0.5,4) -- (-0.5,4) .. controls (-.5,3) and (-.5,.5) .. (-.75,-1) ; \shade[ultra thick, top color=green!90!black,bottom color=green!10!black] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; \foreach \candle in {(2,5),(-2,5),(0.5,7.5),(-0.5,7.5),(-3,2.5), (3,2.5), (1.5,1.75),(-1.5,1.75)} \node at \candle {\usebox{\mycandle}} ; \node [star, star point height=.5cm, minimum size=.5cm,draw,fill=yellow,thick] at (0,10) {}; \begin{scope}[decoration={shape sep=.2cm, shape size=.25cm}] \draw [my star=6, paint=red] (-4,2) .. controls (0,2) and (1,3.5) .. (1,4.40); \draw [my star=6, paint=red] (-1.5,5.40) .. controls (0,5.40) and (0.5,6.5) .. (0.5,7); \draw [my star=6, paint=blue] (4,2) .. controls (0,2) and (-1,3.5) .. (-1,4.40); \draw [my star=6, paint=blue] (1.5,5.40) .. controls (0,5.40) and (-0.5,6.5) .. (-0.5,7); \end{scope} % the balls \path[ball red] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; \path[ball blue] (0,10) .. controls (0,8) and (1,7) .. (1.5,7) .. controls (1,7) and (1,7) .. (0.5,7.25) .. controls (1.5,5) and (2.5,4) .. (3,4) .. controls (2,4) and (1.25,4) .. (1,4.5) .. controls (2,2) and (3.5,2) .. (4,2) .. controls (1,1) and (-1,1) .. (-4,2) .. controls (-3.5,2) and (-2,2) .. (-1,4.5) .. controls (-1.25,4) and (-2,4) .. (-3,4) .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25) .. controls (-1,7) and (-1,7) .. (-1.5,7) .. controls (-1,7) and (0,8) .. (0,10) ; % the snow \foreach \i in {0.5,0.6,...,1.6} \fill [white!80!blue,decoration=Koch snowflake,opacity=.9] [shift={(rand*5,rnd*8)},scale=\i] [double copy shadow={opacity=0.2,shadow xshift=0pt, shadow yshift=3*\i pt,fill=white,draw=none}] decorate { decorate { decorate { (0,0) -- ++(60:1) -- ++(-60:1) -- cycle } } }; \end{tikzpicture} \end{document} 

enter image description here

added 33 characters in body
Source Link
Alain Matthes
  • 99.9k
  • 9
  • 220
  • 360

Merry Christmas everyone!

Merry Christmas everyone!

added 5665 characters in body
Source Link
Alain Matthes
  • 99.9k
  • 9
  • 220
  • 360
Loading
Source Link
Alain Matthes
  • 99.9k
  • 9
  • 220
  • 360
Loading