Generate and draw a fractal tree.

 Draw the trunk
 At the end of the trunk, split by some angle and draw two branches
 Repeat at the end of each branch until a sufficient level of branching is reached


Related tasks
 Pythagoras Tree


<?xml version="1.0" standalone="yes"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg xmlns="http://www.w3.org/2000/svg" 
     xmlns:xlink="http://www.w3.org/1999/xlink"
     width="400" height="320">
  <style type="text/css"><![CDATA[
    line { stroke: black; stroke-width: .05; }
    circle { fill: black; }
  ]]></style>
 
<defs>
  <g id="stem"> <line x1="0" y1="0" x2="0" y2="-1"/> </g>
 
  <g id="l0"><use xlink:href="#stem"/></g>
  <!-- These are identical except for the id and href. -->
  <g id="l1"> <use xlink:href="#l0" transform="translate(0, -1) rotate(-35) scale(.7)"/>
              <use xlink:href="#l0" transform="translate(0, -1) rotate(+35) scale(.7)"/>
              <use xlink:href="#stem"/></g>
  <g id="l2"> <use xlink:href="#l1" transform="translate(0, -1) rotate(-35) scale(.7)"/>
              <use xlink:href="#l1" transform="translate(0, -1) rotate(+35) scale(.7)"/>
              <use xlink:href="#stem"/></g>
  <g id="l3"> <use xlink:href="#l2" transform="translate(0, -1) rotate(-35) scale(.7)"/>
              <use xlink:href="#l2" transform="translate(0, -1) rotate(+35) scale(.7)"/>
              <use xlink:href="#stem"/></g>
  <g id="l4"> <use xlink:href="#l3" transform="translate(0, -1) rotate(-35) scale(.7)"/>
              <use xlink:href="#l3" transform="translate(0, -1) rotate(+35) scale(.7)"/>
              <use xlink:href="#stem"/></g>
  <g id="l5"> <use xlink:href="#l4" transform="translate(0, -1) rotate(-35) scale(.7)"/>
              <use xlink:href="#l4" transform="translate(0, -1) rotate(+35) scale(.7)"/>
              <use xlink:href="#stem"/></g>
  <g id="l6"> <use xlink:href="#l5" transform="translate(0, -1) rotate(-35) scale(.7)"/>
              <use xlink:href="#l5" transform="translate(0, -1) rotate(+35) scale(.7)"/>
              <use xlink:href="#stem"/></g>
  <g id="l7"> <use xlink:href="#l6" transform="translate(0, -1) rotate(-35) scale(.7)"/>
              <use xlink:href="#l6" transform="translate(0, -1) rotate(+35) scale(.7)"/>
              <use xlink:href="#stem"/></g>
  <g id="l8"> <use xlink:href="#l7" transform="translate(0, -1) rotate(-35) scale(.7)"/>
              <use xlink:href="#l7" transform="translate(0, -1) rotate(+35) scale(.7)"/>
              <use xlink:href="#stem"/></g>
  <g id="l9"> <use xlink:href="#l8" transform="translate(0, -1) rotate(-35) scale(.7)"/>
              <use xlink:href="#l8" transform="translate(0, -1) rotate(+35) scale(.7)"/>
              <use xlink:href="#stem"/></g>
</defs>
 
<g transform="translate(200, 320) scale(100)">
  <use xlink:href="#l9"/>
</g>
 
</svg>