H fractal
Sándor Kabai
A T-shaped unit is assembled from three cylinders (representing the trunk and two branches of a tree). Two such units are placed on a larger cylinder to form another T-shaped unit. This procedure is repeated. You can tilt or twist the branches to see the H-fractal and various tree-like structures.
In[]:=
Manipulate[​​aff=0.69;​​ext=1.1;​​trunk1=Cylinder[{{0,0,0},{0,0,10ext}},1];​​next=Cylinder[{{0,0,0},{0,0,10aff}},aff];​​left1=Translate[Rotate[Rotate[next,Pi/2+0.001-tilt,{1,0,0}],-twist,{0,0,1}],{0,0,10ext}];​​right1=Translate[Rotate[Rotate[next,-Pi/2+0.001+tilt,{1,0,0}],-twist,{0,0,1}],{0,0,10ext}];​​u1={left1,right1,trunk1};​​​​trunk2=Cylinder[{{0,0,0},{0,0,10ext/aff}},1/aff];​​left2=Translate[Rotate[Rotate[u1,Pi/2+0.001-tilt,{1,0,0}],-twist,{0,0,1}],{0,0,10ext/aff}];​​right2=Translate[Rotate[Rotate[u1,-Pi/2+0.001+tilt,{1,0,0}],-twist,{0,0,1}],{0,0,10ext/aff}];​​u2={trunk2,left2,right2};​​​​trunk3=Cylinder[{{0,0,0},{0,0,10ext/aff^2}},1/aff^2];​​left3=Translate[Rotate[Rotate[u2,Pi/2+0.001-tilt,{1,0,0}],-twist,{0,0,1}],{0,0,10ext/aff^2}];​​right3=Translate[Rotate[Rotate[u2,-Pi/2+0.001+tilt,{1,0,0}],-twist,{0,0,1}],{0,0,10ext/aff^2}];​​u3={trunk3,left3,right3};​​​​trunk4=Cylinder[{{0,0,0},{0,0,10ext/aff^3}},1/aff^3];​​left4=Translate[Rotate[Rotate[u3,Pi/2+0.001-tilt,{1,0,0}],-twist,{0,0,1}],{0,0,10ext/aff^3}];​​right4=Translate[Rotate[Rotate[u3,-Pi/2+0.001+tilt,{1,0,0}],-twist,{0,0,1}],{0,0,10ext/aff^3}];​​u4={trunk4,left4,right4};​​​​trunk5=Cylinder[{{0,0,0},{0,0,10ext/aff^4}},1/aff^4];​​left5=Translate[Rotate[Rotate[u4,Pi/2+0.001-tilt,{1,0,0}],-twist,{0,0,1}],{0,0,10ext/aff^4}];​​right5=Translate[Rotate[Rotate[u4,-Pi/2+0.001+tilt,{1,0,0}],-twist,{0,0,1}],{0,0,10ext/aff^4}];​​u5={trunk5,left5,right5};​​​​trunk6=Cylinder[{{0,0,0},{0,0,10ext/aff^5}},1/aff^5];​​left6=Translate[Rotate[Rotate[u5,Pi/2+0.001-tilt,{1,0,0}],-twist,{0,0,1}],{0,0,10ext/aff^5}];​​right6=Translate[Rotate[Rotate[u5,-Pi/2+0.001+tilt,{1,0,0}],-twist,{0,0,1}],{0,0,10ext/aff^5}];​​u6={trunk6,left6,right6};​​​​trunk7=Cylinder[{{0,0,0},{0,0,10ext/aff^6}},1/aff^6];​​left7=Translate[Rotate[Rotate[u6,Pi/2+0.001-tilt,{1,0,0}],-twist,{0,0,1}],{0,0,10ext/aff^6}];​​right7=Translate[Rotate[Rotate[u6,-Pi/2+0.001+tilt,{1,0,0}],-twist,{0,0,1}],{0,0,10ext/aff^6}];​​​​Graphics3D[{EdgeForm[],trunk7,left7,right7},ImageSize{400,400},ViewPoint{10,0,-2},ViewAnglePi/35,BoxedFalse,SphericalRegionTrue],​​{{tilt,1,"tilt branch"},0,1.4,ImageSizeTiny},​​{{twist,0,"twist branch"},0,1.4,ImageSizeTiny},​​ControlPlacementLeft,TrackedSymbols{aff,ext,tilt,twist}]
Out[]=
​
tilt branch
twist branch