ID:=(({{1, 0}, {0, 1}})); FLIP:=(({{0, 1}, {1, 0}}));EHHH:=(({{0.99, 1}, {1, 1}})); ROT90:=(({{0, -1}, {1, 0}}));ROT45:=(({{(1/2)(Sqrt[2]), -(1/2)(Sqrt[2])}, {(1/2)(Sqrt[2]), (1/2)(Sqrt[2])}}));MIRROR :=(({{-1, 0}, {0, 1}}));SQUEEZE:=(({{(3/2), 0}, {0, (2/3)}}));PROJECTX:=(({{0.2, 0}, {0, 1}}));


Rot[α_]:=(({{Cos[α], -Sin[α]}, {Sin[α], Cos[α]}}));

p=72;
t=Table[{Sqrt[i],(1/2)Sin[i]},{i,0,50}];
rt[d_]:=(Line[(Rot[d×((2π)/p)] . #)& /@ t]);
Show[Graphics[ Table[rt[n],{n,1,p}]]]
(* evt Export["name.eps",idem] ipv Show *)
Null

Rot[α_]:=N[(({{Cos[α], -Sin[α]}, {Sin[α], Cos[α]}}))];

d1=2;
d2=1.5;
Htrn[{x_,y_}]:=(M=(1/2)T2xy[T1xy[{0,0}]]; M+ Rot[π].(-M+{x,y}));

crk=N[Table[{(1/20)Cos[i(π/10)],(1/20)Sin[i(π/10)]},{i,1,20}]];fig=N[Table[{.6+((i/50)^(1/4)),.4(Sin[i]+1)},{i,0,10}]];

gif=Htrn /@ fig;

T1xy[{x_,y_}]:={x,y}+{d1,0};
T2xy[{x_,y_}]:= Rot[(π/4)].({d2,0}+(Rot[-(π/4)].{x,y}));

T1[fg_]:=T1xy /@ fg;
T2[fg_]:=T2xy /@ fg;
glat:=Table[Line[Nest[T1,Nest[T2,crk,i],j]],{i,0,5},{j,0,5}];
𝔚2a:=Table[Line[Nest[T1,Nest[T2,fig,i],j]],{i,0,5},{j,0,5}];
𝔚2b:=Table[Line[Nest[T1,Nest[T2,gif,i],j]],{i,0,5},{j,0,5}];
Show[Graphics[{glat,𝔚2a,𝔚2b}]]

Rot[α_]:=N[(({{Cos[α], -Sin[α]}, {Sin[α], Cos[α]}}))];
Plet[c_]:=(({{1, 0}, {0, c}}));

d1=1;
d2=1;
crk=N[Table[{(1/20)Cos[i(π/10)],(1/20)Sin[i(π/10)]},{i,1,20}]];
fish=(1/6){{7,3.5},{6,6},{3,6.3},{0,6},{1,3.5},{-2,4},{-1,3},{-2,2},{1,2.5},{0,0},{3,.3},{6,0},{7,2.5},{4,2},{5,3},{4,4},{7,3.5},{5,5},{4.7,5},{4.7,5.3},{5,5.3},{5,5}};

T1xy[{x_,y_}]:={x,y}+{d1,0};
T2xy[{x_,y_}]:={x,y}+{0,d2};

T1[fg_]:=T1xy /@ fg;
T2[fg_]:=T2xy /@ fg;
glat:=Table[Line[Nest[T1,Nest[T2,crk,i],j]],{i,0,5},{j,0,10}];
𝔚1:=Table[Line[Nest[T1,Nest[T2,fish,i],j]],{i,0,10},{j,0,10}];
Show[Graphics[{𝔚1,glat}]]
Export["fish.bmp",Graphics[{𝔚1}]]

Rot[α_]:=N[(({{Cos[α], -Sin[α]}, {Sin[α], Cos[α]}}))];
d1=1;
d2=1;

body=(1/6){{7,3.5},{6,6},{3,6.3},{0,6},{1,3.5},{-2,4},{-1,3},{-2,2},{1,2.5},{0,0},{3,.3},{6,0},{7,2.5},{4,2},{5,3},{4,4},{7,3.5}};
eye=(1/6){{5,5},{4.7,5},{4.7,5.3},{5,5.3},{5,5}};
fin=(1/6){{2.5,5},{2,4},{3,5},{2.5,4},{3.5,5}};
fish={body,eye,fin};

T1xy[{x_,y_}]:={x,y}+{d1,0};
T2xy[{x_,y_}]:={x,y}+{0,d2};

T1[fg_]:=Map[T1xy ,fg,{2}];
T2[fg_]:=Map[T2xy ,fg,{2}];

XC=10;YC=10;RC=10;
incircle[xy_]:=If[(((xy[[1]]-XC))^2)+(((xy[[2]]-YC))^2)<(RC^2),xy,{0,0}];
InCircle[xylist_]:=incircle /@ xylist;
INCIRCLE[xylistlist_]:=Select[InCircle /@ xylistlist,!MemberQ[#,{0,0}]&];

MYLINE[xylistlist_]:=Line /@ INCIRCLE[xylistlist];

𝔚1:=Table[MYLINE[Nest[T1,Nest[T2,fish,i],j]],{i,0,20},{j,0,20}];
Show[Graphics[{𝔚1}]]
(*Export["fish.bmp",Graphics[{𝔚1}]]*)

rot120[xy_]:=N[(({{Cos[((2π)/3)], -Sin[((2π)/3)]}, {Sin[((2π)/3)], Cos[((2π)/3)]}}))].xy;
Rot120[xylist_]:=rot120 /@xylist;
Rot240[xylist_]:=Rot120[Rot120[xylist]];
ROT120[xylistlist_]:= Rot120 /@xylistlist;
ROT240[xylistlist_]:=ROT120[ROT120[xylistlist]];
ptA={2× 5.773,10}; 
ptB={5.773,0};
ptC={5.773,20};
ptD={0,10};
transBC[xy_]:=xy+(ptC-ptB);
TransBC[xylist_]:=transBC /@ xylist;
TRANSBC[xylistlist_]:=TransBC /@ xylistlist;
transOB[xy_]:=xy+ptB;
TransOB[xylist_]:=transOB /@ xylist;
TRANSOB[xylistlist_]:=TransOB /@ xylistlist;
transBO[xy_]:=xy-ptB;
TransBO[xylist_]:=transBO /@ xylist;
TRANSBO[xylistlist_]:=TransBO /@ xylistlist;

rabit1={{5.773,0},{9,4.5},{10,9.5},{2× 5.773,10}};
rabit2={{5.773,0},{3,4},{0,6.5},{0.5,8.5},{0,10}};
eye={{9,12},{9,13},{8,13},{8,12},{9,12}};
wisker={{7,10},{10,11},{8,10},{10,11},{9,10},{10,11}};
rabit1A=(#+ptA)& /@ Rot240[(#-ptA)& /@rabit1];
rabit2D=(#+ptD)& /@ Rot120[(#-ptD)& /@rabit2];
rabit={rabit1,rabit1A,rabit2,rabit2D,eye,wisker};

T1[xylistlist_]:=TRANSBC[xylistlist];
T2[xylistlist_]:=ROT120[TRANSBC[ROT240[xylistlist]]];

ROT120B[xylistlist_]:=TRANSOB[ROT120[TRANSBO[xylistlist]]];
W3:=Table[Line[Nest[TRANSBC,Nest[T2,Nest[ROT120B,rabit,i],j],k]],{i,0,2},{j,0,5},{k,0,3}];
Show[Graphics[{W3}]]
(*Export["rabits.bmp",Graphics[{W3}]]*)