Hata_like_tree
settings.outformat="pdf";
unitsize(10cm);
pair[] vertex;
vertex = new pair[3];
vertex[0]=(0.4,0.3);
vertex[1]=(0,0);
vertex[2]=(1,0);
path a = vertex[0] -- vertex[1] -- vertex[2] ;
dot(vertex);
transform U = (0,0, 0.4,-0.3,0.3,0.4);
/*
pair[] c_vertex;
c_vertex = new pair[3];
for(int i=0; i<3; ++i) {
c_vertex[i]=conj(vertex[i]);
}
path c = c_vertex[0] -- c_vertex[1] -- c_vertex[2] ;*/
/*draw(c,red); */
path d = U* reflect((0,0), (1,0))*a;
draw(d,blue);
path e= shift(0.25, 0)*scale(0.75)*reflect((0,0), (1,0))*a;
draw(e);
dot(e);
path[] pre;
pre = new path[2];
pre[0]= d ;
pre[1]= e ;
path[] hata1;
hata1 = new path[4];
for(int i=0; i<2; ++i){
hata1[i]= U* reflect((0,0), (1,0))*pre[i];
}
for(int i=2; i<4; ++i){
hata1[i]= shift(0.25, 0)*scale(0.75)*reflect((0,0), (1,0))*pre[i-2];
}
draw(hata1);
path[] hata2;
hata2 = new path[8];
for(int i=0; i<4; ++i){
hata2[i]= U* reflect((0,0), (1,0))*hata1[i];
}
for(int i=4; i<8; ++i){
hata2[i]= shift(0.25, 0)*scale(0.75)*reflect((0,0), (1,0))*hata1[i-4];
}
draw(hata2);
path[] hata3;
hata3 = new path[16];
for(int i=0; i<8; ++i){
hata3[i]= U* reflect((0,0), (1,0))*hata2[i];
}
for(int i=8; i<16; ++i){
hata3[i]= shift(0.25, 0)*scale(0.75)*reflect((0,0), (1,0))*hata2[i-8];
}
draw(hata3);
path[] hata4;
hata4 = new path[32];
for(int i=0; i<16; ++i){
hata4[i]= U* reflect((0,0), (1,0))*hata3[i];
}
for(int i=16; i<32; ++i){
hata4[i]= shift(0.25, 0)*scale(0.75)*reflect((0,0), (1,0))*hata3[i-16];
}
draw(hata4);
path[] hata5;
hata5 = new path[64];
for(int i=0; i<32; ++i){
hata5[i]= U* reflect((0,0), (1,0))*hata4[i];
}
for(int i=32; i<64; ++i){
hata5[i]= shift(0.25, 0)*scale(0.75)*reflect((0,0), (1,0))*hata4[i-32];
}
draw(hata5);
path[] hata6;
hata6 = new path[128];
for(int i=0; i<64; ++i){
hata6[i]= U* reflect((0,0), (1,0))*hata5[i];
}
for(int i=64; i<128; ++i){
hata6[i]= shift(0.25, 0)*scale(0.75)*reflect((0,0), (1,0))*hata5[i-64];
}
draw(hata6);
path[] hata7;
hata7 = new path[256];
for(int i=0; i<128; ++i){
hata7[i]= U* reflect((0,0), (1,0))*hata6[i];
}
for(int i=128; i<256; ++i){
hata7[i]= shift(0.25, 0)*scale(0.75)*reflect((0,0), (1,0))*hata6[i-128];
}
draw(hata7);
path[] hata8;
hata8 = new path[512];
for(int i=0; i<256; ++i){
hata8[i]= U* reflect((0,0), (1,0))*hata7[i];
}
for(int i=256; i<512; ++i){
hata8[i]= shift(0.25, 0)*scale(0.75)*reflect((0,0), (1,0))*hata7[i-256];
}
draw(hata8);
path[] hata9;
hata9 = new path[1024];
for(int i=0; i<512; ++i){
hata9[i]= U* reflect((0,0), (1,0))*hata8[i];
}
for(int i=512; i<1024; ++i){
hata9[i]= shift(0.25, 0)*scale(0.75)*reflect((0,0), (1,0))*hata8[i-512];
}
draw(hata9);
path[] hata10;
hata10 = new path[2048];
for(int i=0; i<1024; ++i){
hata10[i]= U* reflect((0,0), (1,0))*hata9[i];
}
for(int i=1024; i<2048; ++i){
hata10[i]= shift(0.25, 0)*scale(0.75)*reflect((0,0), (1,0))*hata9[i-1024];
}
draw(hata10);
path[] hata11;
hata11 = new path[4096];
for(int i=0; i<2048; ++i){
hata11[i]= U* reflect((0,0), (1,0))*hata10[i];
}
for(int i=2048; i<4096; ++i){
hata11[i]= shift(0.25, 0)*scale(0.75)*reflect((0,0), (1,0))*hata10[i-2048];
}
draw(hata11);
path[] hata12;
hata12 = new path[4096];
for(int i=0; i<4096; ++i){
hata12[i]= U* reflect((0,0), (1,0))*hata11[i];
}
for(int i=4096; i<8192; ++i){
hata12[i]= shift(0.25, 0)*scale(0.75)*reflect((0,0), (1,0))*hata11[i-4096];
}
draw(hata12);
/* draw(a); dashed*/

