Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to use TikZ for drawing a christmas tree. Here's a start, I used the lindenmayersystems library for drawing a tree:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{lindenmayersystems}
\begin{document}
\begin{tikzpicture}
\draw [color=green!50!black, l-system={rule set={S -> [+++G][---G]TS,
  G -> +H[-G]L, H -> -G[+H]L, T -> TL, L -> [-FFF][+FFF]F}, step=4pt, angle=18,
 axiom=+++++SLFFF, order=11}] lindenmayer system -- cycle;
\end{tikzpicture}
\end{document}

Fractal tree

I found the tree in "The Science of fractal images" by Peitgen and Saupe.

Who can help to decorate it? Or to draw another tree with Christmas decorations, such as tinsel garland (lametta), candles, baubles (Christmas balls), a tree topper? Perhaps add a shading to the green?

For celebrating Christmas, I would like to put the tree on our blog, and on the TikZ example gallery.

share|improve this question
1  
I don't know if I'll get a chance to figure out the details of this so I'll record the idea as inspiration for domeone else to realise: for tinsel, try a curve with the snake decoration and rounded corners as in tex.stackexchange.com/q/38989/86 by adjusting the parameters then you get quite a variety of tinsel-like effects –  Loop Space Dec 23 '11 at 6:18
    
(Botheration. The iPad keyboard strikes again: "someone". And I haven't the accuracy to hit the "edit" link.) –  Loop Space Dec 23 '11 at 6:20
4  
I'm very happy Kjell accepts your offer to become the new maintainer of TeXample.net. It's a very good news ! Happy christmas Stephan !! –  Alain Matthes Dec 24 '11 at 10:30
4  
+1 for the {trees} tag :D –  doncherry Dec 24 '11 at 12:32
add comment

12 Answers

up vote 108 down vote accepted

Merry Christmas everyone!

\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} 

enter image description here

share|improve this answer
9  
I love the elegance of this one. –  Loop Space Dec 23 '11 at 21:45
1  
Beautiful! I put this one to our blog right now. –  Stefan Kottwitz Dec 24 '11 at 14:48
3  
I like the Koch snowflakes! Great idea. –  Harold Cavendish Dec 24 '11 at 21:22
    
The output is nice, but the input didn't look very christmasy so I optimised it a bit in an answer below. –  David Carlisle Oct 26 '12 at 9:16
    
@AlainMatthes I want to support 'Tents and Trees' puzzle in my logicpuzzle package and need some kind of tree. I've modified your tree a bit. May I kindly ask you for a waiver (based on cc-wiki) to use your code in logicpuzzle.sty and license it under LPPL? –  Josef May 3 '13 at 13:04
show 1 more comment

Christmas Tree

Just in case the code isn't clear from behind the picture, here it is in full:

\documentclass{article}
\usepackage{listings}
\usepackage{tikz}
\usetikzlibrary{%
  lindenmayersystems,
  decorations.pathmorphing,
  decorations.markings,
  shapes.geometric,
  calc%
}
\tikzset{
  tinsel/.style={
    #1,
    rounded corners=10mm,
    ultra thin,
    decorate,
    decoration={
      snake,
      amplitude=.1mm,
      segment length=10,
    }
  },
  baubles/.style={
    decorate,
    decoration={
      markings,
      mark=between positions .3 and 1 step 2cm
      with
      {
        \pgfmathsetmacro{\brad}{2 + .5 * rand}
        \path[shading=ball,ball color=#1] (0,0) circle[radius=\brad mm];
      }
    }
  },
  lights/.style={
    decorate,
    decoration={
      markings,
      mark=between positions 0 and 1 step 1cm
      with
      {
        \pgfmathparse{rand > 0 ? "dart" : "kite"}
        \let\lshape\pgfmathresult
         \pgfmathsetmacro{\tint}{100*rnd}
        \node[rotate=90,\lshape,shading=ball,inner sep=1pt,ball color=red!\tint!yellow] {};
      }
    }
  }
}

\begin{document}
\begin{center}
\tikz[remember picture,overlay] \coordinate (star) at (0,-1);
\end{center}

\lstinputlisting[
  breaklines=true,
  language=TeX,
  basicstyle=\tiny,
  firstline=63,
  lastline=103]{\jobname.tex}

\begin{tikzpicture}[overlay,remember picture]
\path (star) +(-50:7) coordinate (rhs) +(-130:7) coordinate (lhs);
\draw[brown!50!black,line width=5mm,line cap=round] (star) ++(-90:6.8) -- ++(0,-1) coordinate (base);
\node[scale=-1,trapezium,fill=black,minimum size=1cm] at (base) {};
\foreach \height/\colour in {%
  .2/blue,
  .4/yellow,
  .6/red,
  .8/orange,
  1/pink%
} {
  \draw[tinsel=\colour] ($(star)!\height!(lhs)$) to[bend right] ($(star)!\height!(rhs)$);
}
\path (star);
\pgfgetlastxy{\starx}{\stary}
\begin{scope}[xshift=\starx,yshift=\stary,yshift=-7cm]
\draw[color=green!50!black, l-system={rule set={S -> [+++G][---G]TS,  G -> +H[-G]L, H -> -G[+H]L, T -> TL, L -> [-FFF][+FFF]F}, step=4pt, angle=18, axiom=+++++SLFFF, order=11}] lindenmayer system -- cycle;
\end{scope}
\foreach \height/\colour in {%
  .1/pink,
  .3/red,
  .5/yellow,
  .7/blue,
  .9/orange%
} {
  \draw[tinsel=\colour] ($(star)!\height!(lhs)$) to[bend right] ($(star)!\height!(rhs)$);
}
\foreach \height in {.15,.35,...,1} {
  \draw[lights]  ($(star)!\height!(lhs)$) to[bend right] ($(star)!\height!(rhs)$);
}
\foreach \angle/\colour in {
  -50/red,
  -70/yellow,
  -90/blue,
  -110/pink,
  -130/purple%
} {
  \draw[baubles=\colour] (star) -- ++(\angle:7);
}
\node[star,star point ratio=2.5,fill=yellow,minimum size=1cm] at (star) {};
\end{tikzpicture}
\end{document}
share|improve this answer
1  
Thanks Andrew, posted to texample.net/tikz/examples/christmas-tree-2 ! Kindly tell me if I should change something. –  Stefan Kottwitz Dec 24 '11 at 16:15
    
@StefanKottwitz Looks great. The only change I'd make would be to put the (star) coordinate at (0,0) - it is at (0,-1) to put it at the right place with respect to the code listing. It just looks a little odd to put it at (0,-1) (but you should check that all the other pieces position correctly - I had quite a time with positioning the original tree). –  Loop Space Dec 24 '11 at 18:40
add comment

Another tree that can be decorated:

Merry Christmas, everybody!

\documentclass[border=5mm]{standalone}
\usepackage{pgfplots}

\begin{document}
%
\begin{tikzpicture}
\begin{axis}[
    hide axis, clip=false,
    y domain=0:2*pi,
    samples=30,axis equal, view={45}{20}]

\addplot3 [domain=0:4,surf,shader=flat,z buffer=sort,fill=green!50!brown, draw=green!50!black, line join=bevel] 
    ({(1.3*x-floor(x))*x^0.5*cos(deg(y))},
     {(1.3*x-floor(x))*x^0.5*sin(deg(y))},
     {-5*x});

\addplot3 [domain=0:4.5, samples=10, samples y=0, fill=yellow!85!red, draw=yellow!55!red] ({0},{sin(x/5*360) * (1 - x + floor(x)) },{cos(x/5*360) * (1 - x + floor(x) )  + 0.5}) -- cycle;
\end{axis}
\end{tikzpicture}%
%
\end{document}
share|improve this answer
3  
Haha! This is fantastic! Merry Christmas indeed! –  user2473 Dec 23 '11 at 1:50
2  
A great idea to use pgfplots for this drawing! –  Stefan Kottwitz Dec 24 '11 at 14:46
    
@StefanKottwitz wonder if you drawing gurus are willing to help with this fun idea: tex.stackexchange.com/questions/139733/… Thanks! –  Farticle Pilter Oct 20 '13 at 16:50
add comment

Here's mine:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{scopes,svg.path,shapes.geometric,shadows}
\begin{document}
\begin{tikzpicture}[
  mystar/.style={star, minimum size=2cm, star point ratio=2.5, shade, thick,
    line join=round, color=yellow!80!black, draw=red!20!black,
    top color=yellow!80!white, bottom color=yellow!60!black},
  mytree/.style={scale=0.5, rotate=180, draw=green!60!black, thick,
    line join=round, inner color=green!60!yellow, outer color=green!50!black},
  myball/.style={shade, ball color=#1, circular drop shadow={
    shadow xshift=0pt, shadow yshift=-.5ex, fill=green!40!black}}
  ]
  {[mytree]
  \shadedraw svg "M355,430
    q90,10 105,-85 30,0 50,-30 20,30 50,30 50,-20 100,0 10,88 105,85
    -45,90 -205,25 Q400,520 355,430";
  \shadedraw svg "M380,325
    q83,10 105,-80 25,0 35,-30 20,25 40,30 20,-10 35,-25 20,20 40,25
    25,90 105,82 -15,50 -120,15 -30,-2 -60,12 -30,0 -52,-28
    C490,370 380,360 380,325";
  \shadedraw svg "M435,225
    q65,-8 90,-70 35,40 70,0 25,60 90,70 -30,52 -90,5 -36,48 -73,-3
    C520,254 445,265 435,225";
  \shadedraw svg "M470,139
    q50,5 90,-80 50,90 90,80 -30,30 -50,20 -40,45 -78,0
    Q500,170 470,139";
  }
  %\shadedraw svg[scale=0.5,rotate=180]
  %"M460,532 q50,-8 q77,-45 v-20 a20,13 0 1 1 48,0 v20 q30,40 77,45";
  %pgf/tikz doesn't like the arc operation, as stated in manual

  \node[mystar] at (-9.85,-1) {$\lambda$};

  \shade[myball=blue]   (-9.7,-2.2)   circle (.2cm);
  \shade[myball=red]    (-9.2,-3.8)   circle (.2cm);
  \shade[myball=green]  (-10.3,-4)    circle (.4cm);
  \shade[myball=yellow] (-8.95,-5.4)  circle (.4cm);
  \shade[myball=red]    (-10.7,-6.1)  circle (.4cm);
  \shade[myball=blue]   (-10.8,-5)    circle (.2cm);
  \shade[myball=yellow] (-9.5,-6.7)   circle (.2cm);
  \shade[myball=green]  (-8.3,-7.6)   circle (.4cm);
  \shade[myball=yellow] (-11.7,-7.6)  circle (.4cm);
  \shade[myball=blue]   (-10.5,-7.8)  circle (.2cm);
\end{tikzpicture}
\end{document}

which looks like:

christmastree

Merry Christmas!

share|improve this answer
6  
So beautiful with only a few lines! –  Stefan Kottwitz Dec 24 '11 at 14:50
1  
I am curious—why did you put a lambda inside the star? –  Harold Cavendish Dec 24 '11 at 22:50
2  
@Harrold: It was just a small easter egg (for lambda calculus). –  morbusg Dec 25 '11 at 8:23
5  
Easter egg at Christmas. Ha ha ha. (Or "ho ho ho") –  Loop Space Dec 26 '11 at 18:46
1  
@GarbageCollector: Heh, you are absolutely right. However, I get an error with plain which seems to relate to svgpath. –  morbusg Nov 8 '12 at 4:51
show 4 more comments

Having been having fun with straight-edge-and-compass constructions (thanks to What is the simplest way to draw this triangle exactly?), I thought I'd try my hand at a Christmas tree constructed using straight-edge and compass.

Static image of Christmas tree

(The animated version is about 5Mb. I'll have to stick it somewhere other than imgur and link to it.)

\documentclass[
%  handout, % use this to see the final construction
  xcolor=svgnames
]{beamer}
%\url{http://tex.stackexchange.com/q/142210/86}
%\url{http://tex.stackexchange.com/q/39149/86}
\usepackage{tikz}

\usetikzlibrary{decorations.text}

\usepackage[
%  draft
]{rulercompass}

\setbeamertemplate{navigation symbols}{}
\setbeamercolor{background canvas}{bg=Beige}

\pgfdeclarelayer{picture}
\pgfdeclarelayer{points}
\pgfsetlayers{picture,main,points}

\begin{document}
\begin{frame}[plain]
\hfill%
\begin{tikzpicture}[
    stop jumping,
    max size={\textwidth}{\textheight},
    pot/.style={
      draw=brown,
      on layer=picture,
      ultra thick
    },
    trunk/.style={
      draw=brown!50!black,
      on layer=picture,
      ultra thick
    },
    tree/.style={
      draw=green!50!black,
      on layer=picture,
      ultra thick
    },
    bauble/.style={
      fill=yellow,
      ultra thick,
      on layer=picture,
    },
    star/.style={
      draw=yellow,
      fill=red!50!black,
      on layer=picture
    },
    ruler compass,
    draft label/.style={
      reset label anchor,
      above,
      font=\tiny
    },
    every segment/.style={
    },
    every compass/.style={
      overlay,
    },
    every point/.style={
      node on layer=points,
      minimum size=1mm,
    },
    every arc/.style={
      on layer=picture,
      ultra thick
    },
    construction in use/.style={
      draw=gray!50,
    },
    construction not in use/.style={
      draw=gray!50,
    },
  ]
\path (0,0) node[name=0,ruler compass/point=red];
\path (0,1) node[name=1,ruler compass/point=red];
\pause
\ruler<+->[ruler compass/ruler length=40]{0}{1}
\compass<+->{0}{1}
\point<.->{r-0-1}{c-0-1}{2}
\compass<+->{1}{a}
\point<.->{r-0-1}{c-1-a}{1}
\compass<+->{a}{1}
\point<.->{c-a-1}{c-1-a}{1}
\point<.->{c-a-1}{c-1-a}{2}
\compass<+->{b}{c}
\compass<+->{b}{a}
\point<.->{c-b-a}{r-0-1}{1}
\compass<+->{e}{b}
\point<.->{c-e-b}{c-b-a}{1}
\point<.->{c-e-b}{c-b-a}{2}
\point<.->{c-e-b}{r-0-1}{1}
\ruler<+->{c}{g}
\ruler<.->{d}{f}
\compass<+->{h}{g}
\compass<+->{a}{g}
\ruler<+->{c}{d}
\point<.->{r-c-d}{c-0-1}{1}
\point<.->{r-c-d}{c-0-1}{2}
\compass<+->{b}{1}
\point<.->{c-b-1}{r-0-1}{1}
\compass<+->{b}{0}
\point<.->{c-b-0}{r-0-1}{1}
\ruler<+->{f}{g}
\compass<+->{k}{l}
\point<.->{c-k-l}{r-f-g}{1}
\point<.->{c-k-l}{r-f-g}{2}
\ruler<+->{i}{m}
\ruler<+->{j}{n}
\point<.->{r-j-n}{c-h-g}{2}
\point<.->{r-i-m}{c-h-g}{2}
\point<.->{r-j-n}{c-a-g}{1}
\point<.->{r-i-m}{c-a-g}{1}
\compass<+->{q}{o}
\compass<.->{r}{p}
\point<.->{c-q-o}{r-j-n}{1}
\point<.->{c-r-p}{r-i-m}{1}
\draw<.->[pot] (g) arc[centred arc to={a}{q}]
 (f) arc[arc flip,centred arc to={a}{r}];
\draw<.->[trunk] (o) -- (s) (p) -- (t);
\draw<.->[pot] (d) arc[centred arc to={b}{c}] -- (g) arc[arc flip,centred arc to={h}{f}] -- cycle;
\point<.->{c-h-g}{r-0-1}{1}
\compass<+->{u}{s}
\point<.->{c-u-s}{r-0-1}{1}
\compass<+->{v}{s}
\compass<+->{v}{u}
\point<.->{c-v-u}{r-0-1}{1}
\compass<+->{u}{w}
\compass<+->{w}{u}
\point<.->{c-u-w}{c-w-u}{1}
\point<.->{c-u-w}{c-w-u}{2}
\compass<+->{x}{v}
\compass<+->{y}{v}
\point<.->{c-x-v}{c-v-s}{2}
\point<.->{c-y-v}{c-v-s}{2}
\draw<.->[tree]
  (v)
  arc[centred arc to={x}{z}]
  arc[arc flip,centred arc to={v}{aa}]
  arc[centred arc to={y}{v}]
;
\compass<+->{v}{h}
\point<.->{c-v-h}{c-y-v}{2}
\point<.->{c-v-u}{c-y-v}{2}
\point<.->{c-v-u}{c-x-v}{2}
\point<.->{c-v-h}{c-x-v}{2}
\ruler<+->{ab}{ad}
\compass<+->{ab}{ad}
\compass<+->{ad}{ab}
\point<.->{c-ab-ad}{c-ad-ab}{1}
\compass<+->{af}{ab}
\point<.->{c-v-h}{r-i-m}{2}
\compass<+->{h}{ag}
\point<.->{c-v-h}{c-h-ag}{2}
\compass<+->{ag}{h}
\point<.->{c-v-h}{c-ag-h}{1}
\compass<+->{ai}{ag}
\point<.->{c-v-h}{c-ai-ag}{1}
\foreach[remember=\tpt as \ppt (initially i)] \tpt in {j,...,o}
{
  \compass<+->{a\tpt}{a\ppt}
  \point<.->{c-v-h}{c-a\tpt-a\ppt}{1}
}
\compass<+->{ah}{h}
\point<.->{c-v-h}{c-ah-h}{2}
\compass<+->{aq}{ah}
\point<.->{c-v-h}{c-aq-ah}{1}
\foreach[remember=\tpt as \ppt (initially q)] \tpt in {r,...,w}
{
  \compass<+->{a\tpt}{a\ppt}
  \point<.->{c-v-h}{c-a\tpt-a\ppt}{1}
}
\point<.->{c-v-u}{r-i-m}{2}
\compass<+->{u}{ay}
\compass<.->{ay}{u}
\point<.->{c-v-u}{c-ay-u}{1}
\compass<+->{az}{ay}
\point<.->{c-v-u}{c-az-ay}{1}
\point<.->{c-v-u}{c-u-ay}{2}
\compass<+->{bb}{u}
\point<.->{c-v-u}{c-bb-u}{2}
\compass<+->{bc}{bb}
\point<.->{c-v-u}{c-bc-bb}{1}
\compass<+->{bd}{bc}
\point<.->{c-bd-bc}{c-af-ab}{2}
\foreach[remember=\tpt as \ppt (initially d)] \tpt in {e,...,n}
{
  \compass<+->{b\tpt}{b\ppt}
  \point<.->{c-af-ab}{c-b\tpt-b\ppt}{2}
}
\foreach \bctr/\brad in {
  h/ag,
  aj/ai,
  am/al,
  ap/ao,
  ar/aq,
  au/at,
  ax/aw,
  ba/az,
  u/ay,
  bd/bc,
  bg/bf,
  bj/bi,
  bm/bl%
}
{
  \path<.->[bauble] (\bctr) to[circle through] (\brad);
}
\point<.->{c-ad-ab}{r-0-1}{1}
\compass<+->{v}{bp}
\compass<+->{bp}{v}
\point<.->{c-v-bp}{r-0-1}{2}
\compass<+->{bq}{v}
\point<.->{c-v-bp}{c-bp-v}{1}
\point<.->{c-v-bp}{c-bp-v}{2}
\point<.->{c-v-bp}{c-bq-v}{1}
\point<.->{c-v-bp}{c-bq-v}{2}
\fill<.->[star] (bp) -- (bu) -- (bt) -- cycle (bs) -- (br) -- (bq) -- cycle;
\compass<+->{b}{y}
{\huge
\path<+->[decorate,decoration={text along path,text align=center,text={Have a Constructive Christmas}}] (y) arc[arc flip,centred arc to={b}{x}];
}
\end{tikzpicture}%
\hspace*{\fill}%
\end{frame}
\end{document}

You also need the style file (save as rulercompass.sty) which also incorporates quite a few things from other questions and answers on this site:

\ProvidesPackage{rulercompass}
\usepackage{alphalph}
\usetikzlibrary{intersections,calc}

\newif\ifrc@draft
\newif\ifrc@beamer
\newif\ifrc@fliparc

\@ifclassloaded{beamer}{%
  \rc@beamertrue
}{}

\DeclareOption{draft}{%
  \rc@drafttrue
}

\DeclareOption{beamer}{%
  \rc@beamertrue
}

\ProcessOptions

\newcounter{pointlabels}
\setcounter{pointlabels}{0}
\resetcounteronoverlays{pointlabels}

\ifrc@beamer
\tikzset{
  onslide/.code args={<#1>#2}{%
    \only<#1>{\pgfkeysalso{#2}}%
  },
  alt/.code args={<#1>#2#3}{%
    \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}%
  },
  alt if exist/.code args={#1#2#3}{%
    \@ifundefined{path@#1}{%
      \pgfkeysalso{#2}%
    }{
      \alt<.-\csname path@#1\endcsname>{%
        \pgfkeysalso{#2}%
      }{
        \pgfkeysalso{#3}%
      }%
    }%
  },
  intersection/save/.code={%
    \begingroup
    \only<.>{%
    \tikz@intersect@path@names@parse#1\tikz@stop
    \protected@write\pgfutil@auxout{}{%
        \string\global\string\@namedef{path@\tikz@intersect@path@a}{\the\beamer@slideinframe}%
        \string\global\string\@namedef{path@\tikz@intersect@path@b}{\the\beamer@slideinframe}%
    }%
    }%
    \endgroup
  }
}

\newcommand<>\compass[3][]{%
  \draw#4[#1,ruler compass/compass={#2}{#3}];
}

\newcommand<>\ruler[3][]{%
  \draw#4[#1,ruler compass/ruler={#2}{#3}];
}

\newcommand<>\point[4][]{%
  \path#5 [name intersections={use=#2 and #3}] (intersection-#4) node[ruler compass/point,#1];
}

\else

\tikzset{
  alt if exist/.code args={#1#2#3}{%
    \pgfkeysalso{#2}%
  },
  onslide/.code args={<#1>#2}{%
    \pgfkeysalso{#2}%
  },
  intersection/save/.code={%
    \begingroup
    \tikz@intersect@path@names@parse#1\tikz@stop
    \protected@write\pgfutil@auxout{}{%
        \string\global\string\@namedef{path@\tikz@intersect@path@a}{\the\beamer@slideinframe}%
        \string\global\string\@namedef{path@\tikz@intersect@path@b}{\the\beamer@slideinframe}%
    }%
    \endgroup
  }
}

\newcommand\compass[2]{%
  \draw[ruler compass/compass={#1}{#2}];
}

\newcommand\ruler[2]{%
  \draw[ruler compass/ruler={#1}{#2}];
}

\newcommand\point[4][]{%
  \path [name intersections={use=#2 and #3}] (intersection-#4) node[ruler compass/point,#1];
}

\fi    

\tikzset{
  intersection/use/.style={%
    of=#1,
    save=#1,
  },
  circle through/.style={
    to path={
      \pgfextra{
        \tikz@scan@one@point\pgfutil@firstofone(\tikztostart)\relax
        \pgf@xa=\pgf@x
        \pgf@ya=\pgf@y
        \tikz@scan@one@point\pgfutil@firstofone(\tikztotarget)\relax
        \pgfmathsetmacro\rc@radius{veclen(\pgf@x - \pgf@xa,\pgf@y - \pgf@ya)}%
      }
      circle[radius=\rc@radius pt] (\tikztotarget)
    }
  },
  arc flip/.is if=
rc@fliparc,
  centred arc to/.code 2 args={%
    \tikz@scan@one@point\pgfutil@firstofone(#1)\relax
    \pgfmathsetmacro\rc@radius{veclen(\tikz@lastx-\pgf@x,\tikz@lasty-\pgf@y)}%
    \pgfmathsetmacro\rc@sangle{atan2(\tikz@lasty - \pgf@y,\tikz@lastx - \pgf@x)}%
    \pgf@xa=\pgf@x
    \pgf@ya=\pgf@y
    \tikz@scan@one@point\pgfutil@firstofone(#2)\relax
    \pgfmathsetmacro\rc@eangle{atan2(\pgf@y - \pgf@ya,\pgf@x - \pgf@xa)}%
    \pgfmathsetmacro\rc@eangle{\rc@eangle < \rc@sangle ? \rc@eangle +       360 : \rc@eangle}%
    \ifrc@fliparc
    \pgfmathsetmacro\rc@eangle{\rc@eangle - 360}%
    \fi
    \pgfkeysalso{start angle=\rc@sangle, end angle=\rc@eangle, radius=\rc@radius pt}
  },
  ruler compass/.is family,
  ruler compass/.cd,
  construction in use/.style={
    draw=blue
  },
  construction not in use/.style={
    draw=gray!75,
  },
  compass/.style 2 args={
    alt if exist={c-#1-#2}{
      ruler compass/construction in use/.try,
    }{
      ruler compass/construction not in use/.try
    },
    name path=c-#1-#2,
    ruler compass/every construction path/.try,
    ruler compass/every compass/.try,
    insert path={
      (#1) to[circle through] (#2)
      node[name=c-#1-#2-centre,ruler compass/aux point={#1}]
      node[name=c-#1-#2-rim,ruler compass/aux point={#2}]
    },
  },
  ruler/.style 2 args={
    overlay,
    alt if exist={r-#1-#2}{
      ruler compass/construction in use/.try
    }{
      ruler compass/construction not in use/.try
    },
    name path=r-#1-#2,
    ruler compass/every construction path/.try,
    ruler compass/every ruler/.try,
    insert path={
      ($(#1)!\pgfkeysvalueof{/tikz/ruler compass/ruler length}!(#2)$) -- ($(#2)!\pgfkeysvalueof{/tikz/ruler compass/ruler length}!(#1)$)
      node[name=r-#1-#2-start,ruler compass/aux point={#1}]
      node[name=r-#1-#2-end,ruler compass/aux point={#2}]
    },
  },
  ruler length/.initial=20,
  aux point/.style={
    circle,
    minimum width=4mm,
    onslide=<.|handout:0>{draw=red},
    node contents={},
    at={(#1)},
    ruler compass/every aux point/.try
  },
  point/.style={
    ruler compass/name it,
    coordinate,
    node contents={},
    ruler compass/every point/.try,
    insert path={
      node[
        fill=#1,
        circle,
        minimum width=1mm,
        inner sep=0mm,
        reset label anchor,
        anchor=center,
        node contents={}
        ]
    }
  },
  name it/.code={%
    \ifx\tikz@fig@name\pgfutil@empty
    \stepcounter{pointlabels}%
    \pgfkeysalso{name=\alphalph{\value{pointlabels}}}%
    \ifrc@draft
    \pgfkeysalso{label={[ruler compass/draft label/.try]\alphalph{\value{pointlabels}}}}%
    \fi
    \fi
  },
  point/.default=black,
}

\newcounter{jumping}
\resetcounteronoverlays{jumping}
\def\rc@scale{1}

\def\jump@setbb#1#2#3{%
  \@ifundefined{jump@#1@maxbb}{%
    \expandafter\gdef\csname jump@#1@maxbb\endcsname{#3}%
  }{%
    \csname jump@#1@maxbb\endcsname
    \pgf@xa=\pgf@x
    \pgf@ya=\pgf@y
    #3
    \pgfmathsetlength\pgf@x{max(\pgf@x,\pgf@xa)}%
    \pgfmathsetlength\pgf@y{max(\pgf@y,\pgf@ya)}%
    \expandafter\xdef\csname jump@#1@maxbb\endcsname{\noexpand\pgfpoint{\the\pgf@x}{\the\pgf@y}}%
  }
  \@ifundefined{jump@#1@minbb}{%
    \expandafter\gdef\csname jump@#1@minbb\endcsname{#2}%
  }{%
    \csname jump@#1@minbb\endcsname
    \pgf@xa=\pgf@x
    \pgf@ya=\pgf@y
    #2
    \pgfmathsetlength\pgf@x{min(\pgf@x,\pgf@xa)}%
    \pgfmathsetlength\pgf@y{min(\pgf@y,\pgf@ya)}%
    \expandafter\xdef\csname jump@#1@minbb\endcsname{\noexpand\pgfpoint{\the\pgf@x}{\the\pgf@y}}%
  }
}

\tikzset{
  stop jumping/.style={
    execute at end picture={%
      \stepcounter{jumping}%
      \pgfmathsetlength\pgf@xa{\pgf@picminx/\rc@scale}%
      \pgfmathsetlength\pgf@ya{\pgf@picminy/\rc@scale}%
      \pgfmathsetlength\pgf@xb{\pgf@picmaxx/\rc@scale}%
      \pgfmathsetlength\pgf@yb{\pgf@picmaxy/\rc@scale}%
      \immediate\write\pgfutil@auxout{%
        \noexpand\jump@setbb{\the\value{jumping}}{\noexpand\pgfpoint{\the\pgf@xa}{\the\pgf@ya}}{\noexpand\pgfpoint{\the\pgf@xb}{\the\pgf@yb}}
      },
      \csname jump@\the\value{jumping}@maxbb\endcsname
      \path (\the\pgf@x,\the\pgf@y);
      \csname jump@\the\value{jumping}@minbb\endcsname
      \path (\the\pgf@x,\the\pgf@y);
    },
  },
  max size/.code 2 args={%
    \addtocounter{jumping}{1}%
    \pgfutil@ifundefined{jump@\the\value{jumping}@maxbb}{}{%
      \csname jump@\the\value{jumping}@maxbb\endcsname
      \pgf@xa=\pgf@x
      \pgf@ya=\pgf@y
      \csname jump@\the\value{jumping}@minbb\endcsname
      \advance\pgf@xa by -\pgf@x
      \advance\pgf@ya by -\pgf@y
      \pgfmathsetmacro\rc@xratio{\pgf@xa > #1 ? \pgf@xa/#1 : 1}%
      \pgfmathsetmacro\rc@yratio{\pgf@ya > #2 ? \pgf@ya/#2 : 1}%
      \pgfmathsetmacro\rc@scale{1/max(\rc@xratio,\rc@yratio)}%
      \pgfkeysalso{scale=\rc@scale}%
    }
    \addtocounter{jumping}{-1}%
  }
}

\tikzset{
  on layer/.code={
    \pgfonlayer{#1}\begingroup
    \aftergroup\endpgfonlayer
    \aftergroup\endgroup
  },
  node on layer/.code={
    \gdef\node@@on@layer{%
      \setbox\tikz@tempbox=\hbox\bgroup\pgfonlayer{#1}\unhbox\tikz@tempbox\endpgfonlayer\egroup}
    \aftergroup\node@on@layer
  },
  reset label anchor/.code={%
    \let\tikz@auto@anchor=\pgfutil@empty
    \def\tikz@anchor{#1}
  },
  reset label anchor/.default=center
}

\def\node@on@layer{\aftergroup\node@@on@layer}

\endinput
share|improve this answer
    
+1 as it can be used for Hanukkah as well :) –  Xoff Dec 10 '13 at 11:53
    
Very charming, but I'm getting an error: ./CompassRulerChristmasTree.tex:79: Package pgfkeys Error: I do not know the key '/tikz/node contents' and I am going to ignore it. Perhaps you misspelled it. I'm using MacTeX TeXLive 2013. –  sgmoye Dec 10 '13 at 12:28
    
Sometimes, with gifsicle -O3 anim.gif > anim_opt.gif one may get the file size optimized by factors up to 1000 and beyond. –  AlexG Dec 10 '13 at 12:31
    
@sgmoye I use the CVS version of PGF and the node contents is in there. The solution is a bit annoying, but doable: remove every node contents={} line and after every node[...] put an empty brace pair {}. –  Loop Space Dec 10 '13 at 12:57
    
@AlexG In the end, I made it into a proper video and uploaded it to YouTube: youtu.be/b83GoT62MHI –  Loop Space Dec 10 '13 at 12:59
add comment

Previous solutions don't really use the fact that the tree can be completely generated procedurally (I think this is what the OP originally intended):

And the picture will change every year! :)

Tree for 2012:

Fractal Christmas Tree

Tree for 2013:

Fractal Christmas Tree

The solution added a new rule to the L-system, that collected some "good" points where decorations might be added. (good points are found on the main branches). From this list values are selected randomly, and baubles or lights are added to these points.

Code:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc, lindenmayersystems,shapes,decorations,decorations.shapes}
\begin{document}

\def\pointlistleft{}
\def\pointlistright{}
\pgfmathsetseed{\year * 6}
\makeatletter
\pgfdeclarelindenmayersystem{Christmas tree}{
    \symbol{C}{\pgfgettransform{\t} \expandafter\g@addto@macro\expandafter\pointlistleft\expandafter{\expandafter{\t}}}
    \symbol{c}{\pgfgettransform{\t} \expandafter\g@addto@macro\expandafter\pointlistright\expandafter{\expandafter{\t}}}
    \rule{S -> [+++G][---g]TS}
    \rule{G -> +H[-G]CL}
    \rule{H -> -G[+H]CL}
    \rule{g -> +h[-g]cL}
    \rule{h -> -g[+h]cL}
    \rule{T -> TL}
    \rule{L -> [-FFF][+FFF]F}
}
\makeatother

\begin{tikzpicture}[rotate=90]
\draw [color=brown!50!black,line width=2.5pt] (0,0) -- (170pt,0);
\draw [color=green!50!black,l-system={Christmas tree,step=4pt,angle=16,axiom=LLLLLLSLFFF,order=10,randomize angle percent=20}] lindenmayer system -- cycle;

\pgfmathdeclarerandomlist{pointsleft}{\pointlistleft}
\pgfmathdeclarerandomlist{pointsright}{\pointlistright}
\pgfmathdeclarerandomlist{colors}{{red}{blue}{yellow}}

\foreach \i in {0,1,...,5}
{
    \pgfmathrandomitem{\c}{pointsleft}
    \pgfsettransform{\c}
    \pgfgettransformentries{\a}{\b}{\c}{\d}{\xx}{\yy}
    \pgfmathrandomitem{\c}{pointsright}
    \pgfsettransform{\c}
    \pgfgettransformentries{\a}{\b}{\c}{\d}{\XX}{\YY}
    \pgftransformreset

    \pgfmathsetmacro\calcy{min(\yy,\YY)-max((abs(\yy-\YY))/3,25pt)}

    \draw[draw=orange!50!black, fill=orange!50, decorate, decoration={shape backgrounds, shape=star, shape sep=3pt, shape size=4pt}, star points=5] (\xx,\yy) .. controls (\xx,\calcy pt) and (\XX,\calcy pt) .. (\XX,\YY);
}

\foreach \i in {0,1,...,15}
{
    \pgfmathrandomitem{\c}{pointsleft}
    \pgfsettransform{\c}
    \pgftransformresetnontranslations
    \draw[color=black] (0,0) -- (0,-4pt);
    \pgfmathrandomitem{\c}{colors}
    \shadedraw[ball color=\c] (0,-8pt) circle [radius=4pt];
}

\foreach \i in {0,1,...,15}
{
    \pgfmathrandomitem{\c}{pointsright}
    \pgfsettransform{\c}
    \pgftransformresetnontranslations
    \draw[color=black] (0,0) -- (0,-4pt);
    \pgfmathrandomitem{\c}{colors}
    \shadedraw[ball color=\c] (0,-8pt) circle [radius=4pt];
}

\end{tikzpicture}
\end{document}
share|improve this answer
add comment
{\let~\catcode~`A0 AgdefAs.#1.{Acsname#1Aendcsname}AdefAq#1#2#3#4#5#6#7#8#9{%#######################
AdefAy##1###1##3##4##5###3###2##8##9{AdefAw####1#####1####3####4####5#####3#####2####8####9{%#######
AdefAz########1#########1########3########4########5#########3#########2########8########9{Aegroup%#
As.d####9cum##5ntc#6##9ss.[11pt]{scr####4tc#6}%#####################################################
As.##3p##9c#4##9g##5.[dv##1psn##9m##5s#8svgn##9m##5s]{xc####9#6####9r}%#############################
As.##3p##9c#4##9g##5.{t##8z}As.##3t##8z#6ibr##9r#9.{%###############################################
sh##9p##5s#8########4##1####9ns.sh##9p##5s#8########4##1####9ns.#5r##9ct##9#6s#8%###################
########4##1####9ns.m####4#4##1ngs#8#########3####9ws}%#############################################
As.n##5ws##9v##5b####9x.{Amycd}%####################################################################
As.s##9v##5b####9x.{Amycd}{#####2###1{####1}[sc##9#6##5=.1]%########################################
Ashade[t####9p#####2c####9#6####9r=#9##5#6#6####9w#8b####9tt####9m#####2c####9#6####9r=r##5d]%######
#####2(####8#8####8###2#########1########1#####3#8.########8#####2########5#####2%##################
#####3#8####3###2#########1#####2(####8#8########8#########1########1#########21#8####3###2%########
#####2########5#####2#########21#8.########8#########1#####2(####8#8####8###2;%#####################
#7[#9##5#6#6####9w!9####8!b#6##9c#4]#####2(.8#8####8###2#####2r##5ct##9ng#6##5#####2%###############
#########2.8#8-5###2;%##############################################################################
###3{####1}#####2}As.t##8zs##5t.{p####5nt/.st#9#6##5={dr##9w=################1!5####8!b#6##9c#4%####
#8#####2#5##1#6#6=################1!5####8}#8%######################################################
m#9#####2st####4/.st#9#6##5={########4##5#8########4##1####9n={sh##9p##5#####2b##9c#4gr####9unds#8%#
sh##9p##5=st####4}#8st####4#####2p####9##1nts=################1}}%##################################
###1{d####9cum##5nt}%###############################################################################
###1{####1}[#####2b##9#6#6#####2r##5d/.st#9#6##5={%#################################################
########4##5#8#####2########4##1####9n={m####4#4##1ngs#8m####4#4=b##5tw##5##5n#####2%###############
p####9s##1t##1####9ns#####2.#1#####2########5#####21#####2st##5p#####23cm%##########################
w##1th#####2{As.pg##4hs##5tm##9cr####9.{Asz}{#1#####2+#####2####3#####2*#####2r########5}%##########
#####1[#########3##1ng=b##9#6#6#8b##9#6#6#####2c####9#6####9r=r##5d]#####2(####8#8####8###2#####2%##
c##1rc#6##5[r##9d##1us=Asz#####2mm];%###############################################################
}}}#####2#8b##9#6#6#####2b#6u##5/.st#9#6##5={########4##5#8########4##1####9n=%#####################
{m####4#4##1ngs#8m####4#4=b##5tw##5##5n#####2p####9s##1t##1####9ns#####2####8.1#####2########5%#####
#####2.9#####2st##5p#####23cm%######################################################################
w##1th#####2{As.pg##4hs##5tm##9cr####9.{Asz}{#1#####2+#####2####3#####2*#####2r########5}%##########
#####1[#########3##1ng=b##9#6#6#8b##9#6#6#####2c####9#6####9r=b#6u##5]#####2%#######################
(####8#8####8###2#####2c##1rc#6##5[r##9d##1us=Asz#####2mm];%########################################
}}}]Adraw[#5##1#6#6=M####4####9####9n#8u#6tr##9#####2th##1c#4]%#####################################
(.#25#8-1###2#####2########3#####2########1(####3#8####3###2#####2########5#####2(%#################
####3#83###2#####2########3#####2(####8####3#84###2%################################################
--#####2#########2####8####3#84###2#####2########3#####2########1#########2####3#83###2#####2%######
########5#####2#########2####3#8####3###2#####2########3#####2#########2.#25#8-1###2#####2;%########
Ashade[u#6tr##9#####2th##1c#4#8#####2t####9p#####2c####9#6####9r=gr##5##5n!9####8!b#6##9c#4#8%######
b####9tt####9m#####2c####9#6####9r=gr##5##5n!1####8!b#6##9c#4]%#####################################
(####8#81####8###2#####2########3########1#####2(####8#88###2#####2########5#####2#####3########9%##
#####2########3#####2#####3####3########9%##########################################################
########3#####2########1#####3########9#####2########5#####2#####3########9#####2########3#####2(%##
####8####3#8#2.#15###2%#############################################################################
########3#####2########1#####3####3#85###2#####2########5#####2(#1####3#84###2#####2########3#####2%
(3#84###2%##########################################################################################
########3#####2########1(#1#84###2#####2########5#####2#####3.#15#84###2#####2########3#####2%######
#####3#84####3###2%#################################################################################
########3#####2########1(#1#8########8#####2########5#####2(3####3#8########8#####2########3#####2(%
4#8########8%#######################################################################################
########3#####2########1#####3#81###2#####2########5#####2#########21#81###2#####2########3#####2%##
#########24#8########8%#############################################################################
########3#####2########1#########23####3#8########8#####2########5#####2#########2#1#8########8%####
#####2########3#####2#########21#84####3###2%#######################################################
########3#####2########1#########21.#15#84###2#####2########5#####2#########2#1#84###2#####2%#######
########3#####2#########23#84###2%##################################################################
########3#####2########1#########2#1####3#84###2#####2########5#####2#########21####3#85###2#####2%#
########3#####2#########2####8####3#8#2.#15###2%####################################################
########3#####2########1#####2#########21########9#####2########5#####2#########21########9#####2%##
########3#####2#########21####3########9%###########################################################
########3#####2########1#####2#########21########9#####2########5#####2(####8#88###2#####2########3%
#####2(####8#81####8###2;%##########################################################################
As.#5####9r##5##9ch.#####2Acd#####2##1n#####2{(#1#85###2#8#########2#1#85###2#8(####8####3#8#2####3%
###2#8#########2####8####3#8#2####3###2#8#########23#8#1####3###2#8#####2(3#8#1####3###2#8%#########
#####3####3#81.#25###2#8#########21####3#81.#25###2}%###############################################
Anode#####2##9t#####2Acd#####2{As.##3b####9x.{Amycd}}#####2;%#######################################
Anode#####2[st####4#8#####2st####4#####2p####9##1nt#####2h##5##1ght=####3cm#8#####2m##1n##1mum%#####
#####2s##1z##5=####3cm#8dr##9w#8#5##1#6#6=#9##5#6#6####9w#8th##1c#4]%###############################
##9t#####2(####8#81####8###2#####2{};###1{sc####9p##5}[########4##1####9n={sh##9p##5#####2s##5p=.#1%
cm#8#####2sh##9p##5#####2s##1z##5=.#15cm}]%#########################################################
Adraw#####2[m#9#####2st####4=#3#8#####2p####5nt=r##5d]#####2#########24#8########8%#################
########3#####2########1(####8#8########8#####2########5#####2#####3#83####3###2#####2########3%####
#####2#####3#84.4####8###2;%########################################################################
Adraw#####2[m#9#####2st####4=#3#8#####2p####5nt=r##5d]#####2#########21####3#85.4####8###2%#########
########3#####2########1(####8#85.4####8###2#####2########5#####2(####8####3#8#3####3###2#####2%####
########3#####2(####8####3########9;%###############################################################
Adraw#####2[m#9#####2st####4=#3#8#####2p####5nt=b#6u##5]#####2(4#8########8%########################
########3#####2########1#####2(####8#8########8#####2########5#####2#########21#83####3###2#####2%##
########3#####2#########21#84.4####8###2;%##########################################################
Adraw#####2[m#9#####2st####4=#3#8#####2p####5nt=b#6u##5]#####2#####3####3#85.4####8###2%############
########3#####2########1(####8#85.4####8###2#####2########5#####2#########2####8####3#8#3####3###2%#
#####2########3#####2#########2####8####3########9;%################################################
###3{sc####9p##5}#####1[b##9#6#6#####2r##5d](####8#81####8###2#####2########3########1#####2(####8%#
#88###2#####2########5#####2#####3########9#####2########3#####2#####3####3########9%###############
########3#####2########1#####3########9#####2########5#####2#####3########9#####2########3#####2(%##
####8####3#8#2.#15###2%#############################################################################
########3#####2########1#####3####3#85###2#####2########5#####2(#1####3#84###2#####2########3#####2%
(3#84###2%##########################################################################################
########3#####2########1(#1#84###2#####2########5#####2#####3.#15#84###2#####2########3#####2#####3%
#84####3###2%#######################################################################################
########3#####2########1(#1#8########8#####2########5#####2(3####3#8########8#####2########3#####2(%
4#8########8%#######################################################################################
########3#####2########1#####3#81###2#####2########5#####2#########21#81###2#####2########3#####2%##
#########24#8########8%#############################################################################
########3#####2########1#########23####3#8########8#####2########5#####2#########2#1#8########8%####
#####2########3#####2#########21#84####3###2%#######################################################
########3#####2########1#########21.#15#84###2#####2########5#####2#########2#1#84###2#####2%#######
########3#####2#########23#84###2%##################################################################
########3#####2########1#########2#1####3#84###2#####2########5#####2#########21####3#85###2#####2%#
########3#####2#########2####8####3#8#2.#15###2%####################################################
########3#####2########1#####2#########21########9#####2########5#####2#########21########9#####2%##
########3#####2#########21####3########9%###########################################################
########3#####2########1#####2#########21########9#####2########5#####2(####8#88###2#####2########3%
#####2(####8#81####8###2;%##########################################################################
#####1[b##9#6#6#####2b#6u##5](####8#81####8###2#####2########3########1#####2(####8#88###2#####2%###
########5#####2#####3########9#####2########3#####2#####3####3########9%############################
########3#####2########1#####3########9#####2########5#####2#####3########9#####2########3#####2(%##
####8####3#8#2.#15###2%#############################################################################
########3#####2########1#####3####3#85###2#####2########5#####2(#1####3#84###2#####2########3#####2%
(3#84###2%##########################################################################################
########3#####2########1(#1#84###2#####2########5#####2#####3.#15#84###2#####2########3#####2#####3%
#84####3###2%#######################################################################################
########3#####2########1(#1#8########8#####2########5#####2(3####3#8########8#####2########3#####2(%
4#8########8%#######################################################################################
########3#####2########1#####3#81###2#####2########5#####2#########21#81###2#####2########3#####2%##
#########24#8########8%#############################################################################
########3#####2########1#########23####3#8########8#####2########5#####2#########2#1#8########8%####
#####2########3#####2#########21#84####3###2%#######################################################
########3#####2########1#########21.#15#84###2#####2########5#####2#########2#1#84###2#####2%#######
########3#####2#########23#84###2%##################################################################
########3#####2########1#########2#1####3#84###2#####2########5#####2#########21####3#85###2#####2%#
########3#####2#########2####8####3#8#2.#15###2%####################################################
########3#####2########1#####2#########21########9#####2########5#####2#########21########9#####2%##
########3#####2#########21####3########9%###########################################################
########3#####2########1#####2#########21########9#####2########5#####2(####8#88###2#####2########3%
#####2(####8#81####8###2;%##########################################################################
As.#5####9r##5##9ch.#####2Ai#####2##1n#####2{####8####3#8####8.#3#8########3.#81.#3}%###############
#7#####2[wh##1t##5!8####8!b#6u##5#8########4##1####9n=K####9ch#####2sn####9w#5#6##9#4##5#8####9p%###
##9c##1t#9=.9]%#####################################################################################
[sh##1#5t={(r########5*5#8rnd*8###2}#8sc##9#6##5=Ai]%###############################################
[d####9ub#6##5#####2c####9p#9#####2#########3####9w={####9p##9c##1t#9=####8.#1#8#########3####9w%###
#####2xsh##1#5t=####8pt#8%##########################################################################
#########3####9w#####2#9sh##1#5t=3*Ai#####2pt#8#5##1#6#6=wh##1t##5#8dr##9w=n####9n##5}]%############
########4##5#####2{########4##5#####2{########4##5#####2{(####8#8####8###2#####2--#####2++(#3####8:%
1###2#####2--#####2++#########2#3####8:1###2#####2--#####2c#9c#6##5%################################
}}};###3{####1}###3{d####9cum##5nt}}Az{#####2c####9ntr####9#6s#####2}{#####2..}{..}{d##5c####9r##9t%
}{##9nd}{sh##9d}{(-}{#1###2}{#8#2###2}}Aw{t##8zp##1ctur##5}Apath{.5}{##9r}{##9##1}{(1}{ }0o}%#######
Ay iAbegin{use}{#5mat}eAend){i#4}a}Aq276kflAfill,y%#################################################
share|improve this answer
14  
Looks like a duplicate :) –  topskip Oct 26 '12 at 9:28
10  
Awesome!!I plan to use this as a showcase as to how easy TeX is to use... –  Peter Grill Oct 26 '12 at 16:21
12  
If you look at this code without blinking for 5 minutes, you start to see a christmas tree. :) –  Paulo Cereda Oct 27 '12 at 20:57
1  
Some code is just so transparently obvious that additional documentation is clearly unnecessary. –  David Carlisle Oct 27 '12 at 21:01
3  
save it as tree.tex and pdflatex tree –  David Carlisle Oct 27 '12 at 22:34
show 10 more comments

I have learned a couple of new things in TikZ and created an own minimalistic version loosely based on Altermundus' first creation (and a beautiful one it is). Hopefully he does not mind. Merry Christmas to all of you!

\documentclass[border=2mm]{standalone}
\usepackage[dvipsnames]{xcolor}  
\usepackage{tikz}
\usetikzlibrary{shapes,decorations.shapes}
\newsavebox{\ball}
\savebox{\ball}{ 
\begin{tikzpicture}[scale=.1]
\draw (0,0) -- (0, 5);
\shadedraw[ball color=red] (0,0) circle (60pt);
\end{tikzpicture}
} 
\begin{document}
\begin{tikzpicture} 
   \draw[fill=RawSienna] 
   (-.5,-1)  -- (.5,-1) -- (.5,4) -- (-.5,4) -- (-.5,-1) ;
\draw[fill=green!50!black] 
(-3.5,2) -- (3.5, 2) -- (1.5,4) -- (3, 4) -- (1, 6) -- (2, 6) -- (0,9) -- (-2,6) -- (-1,6) -- (-3,4) -- (-1.5,4) -- (-3.5,2);
\foreach\deco in {(1.5,5.65),(-1.5,5.65),(0.75,7.5),(-0.75,7.5),(-2,3.65), (2,3.65), (2.6,1.65),(-2.6,1.65)}
\node at \deco {\usebox{\ball}} ; 
 \node [star, star point height=.3cm, minimum size=1.2cm, draw,fill=yellow] at (0,9.1) {};
\end{tikzpicture}
\end{document}

Christmas tree.

share|improve this answer
add comment

Merry Christmast everyone!

animation

\documentclass{beamer}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}

\usepackage{animate}
\usepackage{hyperref}
\hypersetup{pdfpagemode=FullScreen}
\usepackage{ifthen}
\newcounter{mycount}
\setcounter{mycount}{0}

\begin{document}

\begin{frame}[fragile]{}
\begin{center}
\resizebox{5cm}{!}{%
    \begin{animateinline}[loop, poster = first,controls]{10}
    \whiledo{\themycount<10}{
        \begin{tikzpicture}[ballstyle/.style={circle,draw=blue!50,fill=\c,thick, minimum size=6mm}]
             \pgfmathdeclarerandomlist{color}{{red}{blue}{yellow}{white}{purple}}
             \pgfmathrandomitem{\c}{color}
             \foreach\ycoord in {-3,0,3}{
                \draw[fill=green,draw=green] (-3,\ycoord)--(3,\ycoord)--(0,\ycoord+3)--cycle;
                \node at (3,\ycoord) [ballstyle] {};
                \node at (-3,\ycoord) [ballstyle] {};}
             \node at (0,6) [star,fill =yellow,minimum size=2cm] {};
             \draw[fill=brown,draw=black] (-1,-3)--(1,-3)--(1,-5)--(-1,-5)--cycle;
        \end{tikzpicture}
        \stepcounter{mycount}
        \ifthenelse{\themycount<10}{
                \newframe
        }{
                \end{animateinline}
        }
        }
    }
\end{center}
\end{frame}

\end{document}
share|improve this answer
2  
For slightly more realistic trees you could use the one here: tex.stackexchange.com/a/34676/2693 –  Alan Munn Dec 24 '11 at 18:36
    
@AlanMunn Thanks, I was looking for that post! I was mainly concentrating on the animation. –  cmhughes Dec 24 '11 at 18:40
add comment

Here's an invisible tree.

\documentclass[border=0.125cm]{standalone}
\usepackage{tikz}
\pagecolor{black}
\usetikzlibrary{shapes.geometric,decorations}
\pgfmathdeclarerandomlist{colors}{{red}{yellow}{pink}{green}{orange}{purple}{blue}{white}}

\newcommand\drawstar[1][]{%
  \pgfmathsetmacro\s{rnd*2+2}
    \pgfmathsetmacro\t{rnd*.5cm+0.5cm}
    \pgfmathsetmacro\y{rand*0.125cm}
    \pgfmathsetmacro\r{rand*180}
    \pgfmathrandomitem{\c}{colors}
    \node [star, fill=\c, star point ratio=\s, rotate=\r, minimum size=\t, inner sep=0pt, every star/.try, #1] at (0cm,\y pt) {};
}
\pgfdeclaredecoration{stars}{start}{
  \state{start}[width=rnd*.5cm+.25cm]{\drawstar}
  \state{final}{\drawstar}
}

\begin{document}

\begin{tikzpicture}[line cap=round, x=1cm,y=1cm,]

\draw [every star/.style={opacity=0.125}, decoration=stars, decorate] 
  \foreach \i in {0,...,5}{ 
 plot [domain=\i*360:\i*360+180, samples=100] (\x/300*cos \x, -\x/150+\x/900*sin \x) };


\draw [every star/.style={opacity=0.5}, decoration=stars, decorate] 
\foreach \i in {0,...,5}{ 
  plot [domain=\i*360+180:\i*360+360, samples=100] (\x/300*cos \x, -\x/150+\x/900*sin \x) };

\drawstar[fill=yellow, minimum size=1.5cm]

\end{tikzpicture}

\end{document}

enter image description here

And another:

\documentclass[tikz, border=0.25cm]{standalone}
\usepackage{tikz}
\pagecolor{black}
\usetikzlibrary{decorations.pathreplacing}
\makeatletter
\newcount\tikzjointhedotsnumber


\pgfdeclaredecoration{join the dots}{initial}{%
  \state{initial}[width=0pt, next state=do dots, persistent precomputation={\global\tikzjointhedotsnumber=1}]{}
  %
  \state{do dots}[width=\pgfdecoratedinputsegmentlength, persistent postcomputation={\global\advance\tikzjointhedotsnumber by1}]{%
    \pgfcoordinate{@dot-\the\tikzjointhedotsnumber}{\pgfpointorigin}%
  }
  %
  \state{final}{%
    % Is the last point the same as the first?
      \pgfpointdiff{\pgfpointdecoratedpathlast}{\pgfpointdecoratedpathfirst}%
      \pgfmathveclen{\the\pgf@x}{\the\pgf@y}%
      \ifdim\pgfmathresult pt=0pt\relax%
        \global\advance\tikzjointhedotsnumber by-1\relax
      \else
        \pgftransformshift{\pgfpointdecoratedpathlast}%
        \pgfcoordinate{@dot-\the\tikzjointhedotsnumber}{\pgfpointorigin}%
      \fi
      % Ok, now we do everything. Draw the dots and place the numbers.
      %
      \c@pgf@counta=\tikzjointhedotsnumber%
      \c@pgf@countb=2\relax%
      \edef\lastdot{\the\tikzjointhedotsnumber}%
      \def\nextdot{2}%
      \pgftransformreset%
      \pgfmathloop%
      \ifnum\pgfmathcounter>\tikzjointhedotsnumber
      \else%
        % Draw the dot.
        \edef\tmp{\the\tikzjointhedotsnumber}%
                \tikzjointhedotsnumber=\pgfmathcounter\relax%
        \path [shift={(@dot-\pgfmathcounter)}, every dot/.try, dot \pgfmathcounter/.try]; 
         \tikzjointhedotsnumber=\tmp% 
        %
        % Calculate the dot number node anchor
        \pgfmathanglebetweenpoints{\pgfpointanchor{@dot-\pgfmathcounter}{center}}{\pgfpointanchor{@dot-\the\c@pgf@counta}{center}}%
        \pgf@xc=\pgfmathresult pt\relax%
        \ifdim0pt>\pgf@xc%
          \advance\pgf@xc by360pt\relax%
        \fi%
        \pgfmathanglebetweenpoints{\pgfpointanchor{@dot-\pgfmathcounter}{center}}{\pgfpointanchor{@dot-\the\c@pgf@countb}{center}}%
        \pgf@yc=\pgfmathresult pt\relax%
        \ifdim0pt>\pgf@yc%
          \advance\pgf@yc by360pt\relax%
        \fi%
        \ifdim\pgf@xc>\pgf@yc%
          \pgf@x=360pt\relax%
        \else%
          \pgf@x=0pt\relax%
        \fi%
        \advance\pgf@x by-\pgf@xc%
        \advance\pgf@x by\pgf@yc%
        \divide\pgf@x by2\relax%
        \advance\pgf@x by\pgf@xc%
        \advance\pgf@x by180pt\relax%
        \edef\dotnumberanchor{\the\pgf@x}%
        \node [anchor=\dotnumberanchor, every dot number/.try, dot number \pgfmathcounter/.try] 
          at (@dot-\pgfmathcounter)
          {\tikzjointhedotsnumber=\pgfmathcounter\relax\tikzjointhedotstypesetnumber{\tikzjointhedotsnumber}};
        \c@pgf@counta=\pgfmathcounter\relax%
            \advance\c@pgf@countb by1\relax%
            \ifnum\c@pgf@countb>\tikzjointhedotsnumber%
              \c@pgf@countb=1\relax%
            \fi%
        \repeatpgfmathloop%
  }
}

% Command for typesetting dot number
% #1 - a count register holding the current dot number
%
\def\tikzjointhedotstypesetnumber#1{\the#1}
\makeatletter
% Keys for setting dot number styles
\tikzset{%
  syle dot number range/.code args={#1 to #2 with #3}{%
    \c@pgf@counta=#1
    \pgfmathloop
    \ifnum\c@pgf@counta>#2\relax%
    \else%
      \tikzset{dot number \the\c@pgf@counta/.style={#3}}%
      \advance\c@pgf@counta by1
    \repeatpgfmathloop%
  },
    style dot number list/.code args={#1 with #2}{%
      \pgfutil@for\tmp:=#1\do{%
        \tikzset{dot number \tmp/.style={#2}}%
      }%
    }
}
\makeatother

\tikzset{%
  % Executed for every dot
  every dot/.style={fill=white,
    insert path={  circle [radius=1mm] coordinate [alias=dot-last] (dot-\the\tikzjointhedotsnumber)  }
  },
  % Executed for every dot number
  every dot number/.style={
   shape=circle,
   font=\sf,
   scale=2,
   text=white
  },
  join the dots/.style={
    decoration=join the dots, decorate
  },
  lines/.style={
    ultra thick,
    line join=round,
    line cap=round
  },
  crayon/.style={
    draw=#1,
    line join=round,
    line cap=round,
    line width=1mm
  },
  sketch/.style={
    bend right, out=rand*10, in=180-rand*10
  }
}

\pgfdeclarelayer{background}
\pgfsetlayers{background,main}
\begin{document}

\foreach \n in {1,...,40}{
\begin{tikzpicture}[line cap=round]



\draw [decoration=join the dots, decorate,x=10cm,y=10cm,
  dot number 16/.style={anchor=south},
  dot number 25/.style={anchor=south},
  dot 1/.style={fill=black}, dot number 1/.append style={text=black, anchor=south east},
  dot 40/.style={fill=black}, dot number 40/.append style={text=black, anchor=south west}] 
 (0,0) \foreach \i in {1,...,3} { -- ++(-1/8,-1/3) -- ++(-1/4,-1/3) -- ++(-3/8,-1/3) -- ++(\i/6,0) -- ++(\i/6,1/16) }
 -- ++(1/8,0)
 -- ++(0,-1/4)  -- ++(-1/2,0) -- ++(1/4,-1/2)  -- ++(6/8,0) -- ++(1/4, 1/2) -- ++(-1/2,0) -- ++(0,1/4)
 -- ++(1/8,0)
 \foreach \i in {3,...,1} { -- ++(\i/6,-1/16) -- ++(\i/6,0) -- ++(-3/8,1/3) -- ++(-1/4,1/3) -- ++(-1/8,1/3) };

\begin{pgfonlayer}{background}

\foreach \d in {4,9,14,27,32,37}{% 
  \tikzset{shift=(dot-\d), yshift=1pt}%
  \pgfmathsetseed{99+\d*50}%
  % Candle
  \fill [lines, fill=purple!80, rounded corners=0.125cm]
    (-1/3,0) to [sketch] (-1/3,2) -- (1/3,2)  to [sketch] (1/3,0);
  % Wick
  \draw [lines] (0,2) -- ++(0,1/4);
    \pgfmathsetseed{99+\n*50+\d*25}%
  \tikzset{shift={(0,2+1/8)}, xscale=round(rnd)*2-1,yscale=1+rand/8}
  \foreach \s/\c in {1/yellow,.5/red}
    \path [lines, fill=\c!50!orange, scale=\s]  
      (0,0) 
      arc (270:180:3/8) 
      .. controls ++(0,1/4) and ++(0,-1/4) .. (0,3/2)
      arc (90:0:3/8 and 1) arc (360:270:3/8 and 1/2);
} 

\path [fill=yellow!75!white, shift=(dot-1), rotate=22.5] (0:1.25)
  \foreach \i [evaluate={\j=mod(\i,2); \k=mod(\i+1,4)==0; \r=\j+1.25+\k+(\i==11);}] in {0,...,15}{
    -- (\i*22.5:\r)
  } -- cycle;
\end{pgfonlayer}

\pgfmathsetseed{99}
\draw [crayon=green!50!black, line width=1cm/8, sketch]
  (dot-1) \foreach \m in {1,...,\n}{ to [sketch] (dot-\m) };

\end{tikzpicture}
}
\end{document}

enter image description here

share|improve this answer
    
I get ! Package tikz Error: Giving up on this path. Did you forget a semicolon?. on line 26 of the first code? –  fuenfundachtzig Dec 20 '13 at 9:37
    
I don't know why that would be. It works for me although I am using the latest CVS version. –  Mark Wibrow Dec 20 '13 at 12:15
    
I could make it work with a few changes. In any case +1 and Merry Xmas :) –  fuenfundachtzig Dec 20 '13 at 13:31
add comment

Just a tree

tree

with extremely ugly code(I do not know how to do it corectly?! -ovelay and center):

\documentclass{article}
\usepackage{overpic}
\usepackage{graphicx} 
\begin{document}
\begin{overpic}[unit=1cm, width=8cm, height=12cm]{ttt}
\put(14.5,0){\includegraphics[width=4cm,height=12cm]{ttt}}
\put(23,0){\includegraphics[width=1.5cm,height=12cm]{ttt}}
\end{overpic}
\end{document}

ttt.pdf is the compiled tree from the question.

share|improve this answer
1  
I don't see how this answers the original question. –  Werner Feb 9 '12 at 2:16
6  
@werner: It doesn't, and I would never expect it to be accepted as an answer. I consider it to be a contribution never the less. –  Hans-Peter E. Kristiansen Feb 9 '12 at 4:47
add comment

I'm starting my Christmas decorating early, very early.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{lindenmayersystems}
\usepackage{stackengine}
\usepackage{simpsons}
\newcommand\ball[4][]{\stackinset{c}{}{c}{#1}{#4}{\textcolor{#2}{\scalebox{#3}{$\bullet$}}}}
\newlength\tmplen
\newcommand\rb[2]{\tmplen=#1\baselineskip\relax\tmplen=.07\tmplen\relax%
  \raisebox{\tmplen}{#2}}
\begin{document}
\setbox0=\hbox{
\begin{tikzpicture}
\draw [color=green!50!black, l-system={rule set={S -> [+++G][---G]TS,
  G -> +H[-G]L, H -> -G[+H]L, T -> TL, L -> [-FFF][+FFF]F}, step=4pt, angle=18,
 axiom=+++++SLFFF, order=11}] lindenmayer system -- cycle;
\end{tikzpicture}
}
\centering
\stackinset{c}{.6in}{b}{.8in}  {\ball[1pt] {green!15}{3}  {\P}}{%
\stackinset{c}{-1.2in}{b}{1in}  {\ball[.6pt]{red}     {4}  {\textcolor{white}{\S}}}{%
\stackinset{c}{0in}{b}{2.5in}   {\ball      {red!30}  {5}  {\tiny\LaTeX{}}}{%
\stackinset{c}{.2in}{b}{2in}    {\ball[1pt] {green!60}{3}  {@}}{%
\stackinset{c}{-.6in}{b}{1.3in} {\ball[.5pt]{yellow}  {2.5}{\footnotesize A}}{%
\stackinset{c}{1.4in}{b}{.8in}  {\ball[.5pt]{yellow}  {2.5}{\footnotesize $\Omega$}}{%
\stackinset{c}{.7in}{b}{1.1in}  {\ball[1pt] {blue!50} {4.3}{\scalebox{.42}{\Bart}}}{%
\stackinset{c}{-.24in}{b}{.8in} {\ball[1pt] {cyan!20} {4.3}{\scalebox{.42}{\Homer}}}{%
\stackinset{c}{-.3in}{b}{1.75in}{\ball[1pt] {cyan!40} {4.3}{\scalebox{.33}{\Marge}}}{%
\stackinset{c}{-0.7in}{b}{.75in}{\ball[1pt] {green!40}{4.3}{\scalebox{.42}{\Lisa}}}{%
\stackinset{c}{0.2in}{b}{1.4in} {\ball[1pt] {blue!10} {4.3}{\scalebox{.42}{\Maggie}}}{%
\hspace{5.8ex}\box0
}}}}}}}}}}}\par
\vspace{-.7in}\bfseries\noindent\hspace{5.8ex}%
\rb{12}{\ball[-2pt]{red}{3.4}{\smash{\textcolor{white}{M}}}\kern-2pt}%
\rb{7}{\ball[-2pt]{red}{3.4}{\smash{\textcolor{white}{e}}}\kern-2pt}%
\rb{3}{\ball[-2pt]{red}{3.4}{\smash{\textcolor{white}{r}}}\kern-2pt}%
\rb{1}{\ball[-2pt]{red}{3.4}{\smash{\textcolor{white}{r}}}\kern-2pt}%
\rb{0}{\ball[-2pt]{red}{3.4}{\smash{\textcolor{white}{y}}}\kern-2pt}%
\rb{1}{\ball[-2pt]{red}{3.4}{\smash{\textcolor{white}{ }}}\kern-2pt}%
\rb{4}{\ball[-2pt]{red}{3.4}{\smash{\textcolor{white}{C}}}\kern-2pt}%
\rb{9}{\ball[-2pt]{red}{3.4}{\smash{\textcolor{white}{h}}}\kern-2pt}%
\rb{9}{\ball[-2pt]{red}{3.4}{\smash{\textcolor{white}{r}}}\kern-2pt}%
\rb{4}{\ball[-2pt]{red}{3.4}{\smash{\textcolor{white}{i}}}\kern-2pt}%
\rb{1}{\ball[-2pt]{red}{3.4}{\smash{\textcolor{white}{s}}}\kern-2pt}%
\rb{0}{\ball[-2pt]{red}{3.4}{\smash{\textcolor{white}{t}}}\kern-2pt}%
\rb{0}{\ball[-2pt]{red}{3.4}{\smash{\textcolor{white}{m}}}\kern-2pt}%
\rb{1}{\ball[-2pt]{red}{3.4}{\smash{\textcolor{white}{a}}}\kern-2pt}%
\rb{4}{\ball[-2pt]{red}{3.4}{\smash{\textcolor{white}{s}}}\kern-2pt}%
\rb{9}{\ball[-2pt]{red}{3.4}{\smash{\textcolor{white}{!}}}\kern-2pt}%
\end{document}

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.