# Triangle node with adjustable height

I'm trying to draw AVL trees with TikZ, what I need is:

Binary tree with simple circle nodes, and adjustable height triangle (or rectangle) nodes for subtrees, both containing only single characters. Here's a picture:

I tried with rectangle and regular polygon, but they seem to be unaffected by aspect ratio... Is there an easy way of drawing something like this in TikZ?

-

Using the isosceles triangle shape and some manually set heights:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{shapes.geometric}

\begin{document}

\begin{tikzpicture}[
inner/.style={circle,draw,minimum width=7mm,inner sep=0},
leaf/.style={isosceles triangle,draw,shape border rotate=90,isosceles triangle stretches=true, minimum height=20mm,minimum width=12mm,inner sep=0,yshift={-20mm},font=\tiny},
large leaf/.style={leaf,minimum height=35mm,yshift={-14.5mm}},
level 1/.style={sibling distance=30mm},
level 2/.style={sibling distance=21mm},
level 3/.style={sibling distance=14mm},
]
\node[inner] {T}
[child anchor=north]
child {node[inner] {L}
child {node[large leaf] {}}
child {node[inner] {LR}
child{node[leaf] {}}
child{node[leaf] {}}}}
child {node[large leaf] {L.Allison}};
\end{tikzpicture}

\end{document}


I don't know why the top vertices of the two large triangles are at different heights relative to their sibling nodes.

-
Thank you very much :) –  tpv Dec 28 '10 at 18:06