I am trying to create a simple split tree.
The growth should be only upwards, the vertical element length constant (1), the size of the horizontal bars should be halved in each iteration and the number of split levels should be freely chosen.
I found a very similar question Using Mathematica to create an H-Tree, but I cannot adopt the answers to solve my problem.
I guess NestList
is doing the job, but I didn't get further than:
drawT[{x_, y_}, size_] :=
Line[{{{x + size, y}, {x - size, y}}, {{x + size,
y + size}, {x + size, y}}, {{x - size, y + size}, {x - size,
y}}}]
I basically don't know how to use the above function drawT
, that creates the U-shaped geometry to be iterated in NestList
.
Grateful for any help.