7

Is it possible to draw a tree canopy in latex, possibly with tikz. An example:

So, on the left of this image you will see a bunch of trees, can these be re-created with tikz?

hola
  • 4,026
  • 3
  • 35
  • 72
Emma
  • 779
  • 1
    Oh, but I misread the question! I thought it was about the curve and the vectors, but it is about drawing the trees instead. Then my comment about lindenmayer system is not a joke anymore! – JLDiaz Mar 05 '13 at 19:50
  • @JLDiaz But the trees shown by tikz's lindenmayer systems seem rather flimsy and do not seem realistic for my case study i.e. a tree like the one shown in the link would not realistically influence wind speed. Could these trees be created by using something along the lines of vertically orientated clouds with some sort of gradient filling to generate the color of the trees? – Emma Mar 06 '13 at 07:44
  • You could try to find an .svg tree image like these: http://openclipart.org/people/Chrisdesign/Chrisdesign_Tree_silhouettes.svg and then use inkscape2tikz to covert them to the relevant tikz commands. – Ubiquitous Mar 06 '13 at 12:03

1 Answers1

14

No time now for details, perhaps later. This is an idea:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\thispagestyle{empty}
\usetikzlibrary{decorations.pathmorphing,shapes}
\tikzset{
  treetop/.style = {
    decoration={random steps, segment length=0.4mm},
    decorate
  },
  trunk/.style = {
    decoration={random steps, segment length=2mm, amplitude=0.2mm},
    decorate
  }
}

\begin{tikzpicture}
\foreach \w/\f in {0.3/30,0.2/50,0.1/70} {
  \fill [brown!\f!black, trunk] (0,0) ++(-\w/2,0) rectangle +(\w,-3);
}
\foreach \n/\f in {1.4/40,1.2/50,1/60,0.8/70,0.6/80,0.4/90} {
   \fill [green!\f!black, treetop] ellipse (\n/1.5 and \n);
}
\end{tikzpicture}
\end{document}

Tree

JLDiaz
  • 55,732