(* Chinese Window Lattice *)

CC={{-9,-7},{-7,-7},{-7,-5},{-5,-5},{-5,-3},{-7,-3},{-7,-1},{7,-1},{7,-3},{5,-3},{5,-5},{7,-5},{7,-7},{9,-7},{9,7},{7,7},{7,5},{5,5},{5,3},{7,3},{7,1},{-7,1},{-7,3},{-5,3},{-5,5},{-7,5},{-7,7},{-9,7},{-9,-7}};
DD=Table[CC[[jj]]+{5,5},{jj,1,Length[CC]}];
II[xx_]:={xx[[1]],xx[[2]]};
AL[xx_]:={xx[[1]]-10,xx[[2]]-10};  AR[xx_]:={xx[[1]]+10,xx[[2]]+10};
BD[xx_]:={xx[[1]]+10,xx[[2]]-10};  BU[xx_]:={xx[[1]]-10,xx[[2]]+10};
RR[xx_]:={xx[[2]],-xx[[1]]};  SS[xx_]:={-xx[[2]],xx[[1]]};
XX[xx_]:={-xx[[1]],xx[[2]]-10};  YY[xx_]:={-xx[[1]],xx[[2]]+10};
TT={AL,AR,BD,BU,RR,SS,XX,YY,II};
W0=Table[TT[[9]][DD[[jj]]],{jj,1,Length[DD]}];
T0=Graphics[{AbsoluteThickness[3],Line[W0]}];
B0=Graphics[{RGBColor[1,1,0],Polygon[W0]}];
OM={B0,T0};
nn=24;
RN={9};
WW=W0;
Do[VV=WW;rr=8*Random[];ss=1+Floor[rr];WW=Table[TT[[ss]][VV[[jj]]],{jj,1,Length[VV]}];BA=Graphics[{GrayLevel[0.8],Polygon[WW]}];OM=Append[OM,BA]; TW=Graphics[{AbsoluteThickness[3],Line[WW]}];OM=Append[OM,TW];RN=Append[RN,ss],{kk,nn}];
OO=Graphics[{RGBColor[1,0,0],Disk[{0,0},0.8]}];
AA=Append[OM,OO];

Show[AA,AspectRatio->Automatic]

CC={{-9,-7},{-7,-7},{-7,-5},{-5,-5},{-5,-3},{-7,-3},{-7,-1},{7,-1},{7,-3},{5,-3},{5,-5},{7,-5},{7,-7},{9,-7},{9,7},{7,7},{7,5},{5,5},{5,3},{7,3},{7,1},{-7,1},{-7,3},{-5,3},{-5,5},{-7,5},{-7,7},{-9,7},{-9,-7}};
DD=Table[CC[[jj]]+{5,5},{jj,1,Length[CC]}];
II[xx_]:={xx[[1]],xx[[2]]};
AL[xx_]:={xx[[1]]-10,xx[[2]]-10};  AR[xx_]:={xx[[1]]+10,xx[[2]]+10};
BD[xx_]:={xx[[1]]+10,xx[[2]]-10};  BU[xx_]:={xx[[1]]-10,xx[[2]]+10};
RR[xx_]:={xx[[2]],-xx[[1]]};  SS[xx_]:={-xx[[2]],xx[[1]]};
XX[xx_]:={-xx[[1]],xx[[2]]-10};  YY[xx_]:={-xx[[1]],xx[[2]]+10};
TT={AL,AR,BD,BU,RR,SS,XX,YY,II};
WW=DD;
OM={};
UU={};
nn=24;
RN={9};
Do[mm=1+Floor[8*Random[]];RN=Append[RN,mm],{kk,1,nn}];
Do[VV=WW;WW=Table[TT[[RN[[kk]]]][VV[[jj]]],{jj,1,Length[VV]}];UU=Append[UU,WW],{kk,Length[RN]}];
Do[BA=Graphics[{GrayLevel[0.7],Polygon[UU[[kk]]]}];OM=Append[OM,BA];
TW=Graphics[{AbsoluteThickness[3],Line[UU[[kk]]]}];OM=Append[OM,TW],{kk,Length[UU]}];
OO=Graphics[{RGBColor[1,0,0],Disk[{0,0},0.8]}];
AA=Append[OM,OO];

Show[AA,AspectRatio->Automatic]

CC={{-9,-7},{-7,-7},{-7,-5},{-5,-5},{-5,-3},{-7,-3},{-7,-1},{7,-1},{7,-3},{5,-3},{5,-5},{7,-5},{7,-7},{9,-7},{9,7},{7,7},{7,5},{5,5},{5,3},{7,3},{7,1},{-7,1},{-7,3},{-5,3},{-5,5},{-7,5},{-7,7},{-9,7},{-9,-7}};
DD=Table[CC[[jj]]+{5,5},{jj,1,Length[CC]}];
II[xx_]:={xx[[1]],xx[[2]]};
AL[xx_]:={xx[[1]]-10,xx[[2]]-10};  AR[xx_]:={xx[[1]]+10,xx[[2]]+10};
BD[xx_]:={xx[[1]]+10,xx[[2]]-10};  BU[xx_]:={xx[[1]]-10,xx[[2]]+10};
RR[xx_]:={xx[[2]],-xx[[1]]};  SS[xx_]:={-xx[[2]],xx[[1]]};
XX[xx_]:={-xx[[1]],xx[[2]]-10};  YY[xx_]:={-xx[[1]],xx[[2]]+10};
TT={AL,AR,BD,BU,RR,SS,XX,YY,II};
WW=DD;
OM={};
UU={};
RN={9,2,6,6,6,6,1,4,6,6,6,6,3};
Do[VV=WW;WW=Table[TT[[RN[[kk]]]][VV[[jj]]],{jj,1,Length[VV]}];UU=Append[UU,WW],{kk,Length[RN]}];
Do[BA=Graphics[{GrayLevel[0.7],Polygon[UU[[kk]]]}];OM=Append[OM,BA];
TW=Graphics[{AbsoluteThickness[3],Line[UU[[kk]]]}];OM=Append[OM,TW],{kk,Length[UU]}];
OO=Graphics[{RGBColor[1,0,0],Disk[{0,0},0.8]}];
AA=Append[OM,OO];

Show[AA,AspectRatio->Automatic]

WW=DD;
OM={};
UU={};
RN={9,2,6,6,6,6,1,4,6,6,6,6,3,2,4,6,6,6,6,3,1};
Do[VV=WW;WW=Table[TT[[RN[[kk]]]][VV[[jj]]],{jj,1,Length[VV]}];UU=Append[UU,WW],{kk,Length[RN]}];
Do[BA=Graphics[{GrayLevel[0.7],Polygon[UU[[kk]]]}];OM=Append[OM,BA];
TW=Graphics[{AbsoluteThickness[3],Line[UU[[kk]]]}];OM=Append[OM,TW],{kk,Length[UU]}];
OO=Graphics[{RGBColor[1,0,0],Disk[{0,0},0.8]}];
AA=Append[OM,OO];

Show[AA,AspectRatio->Automatic]

WW=DD;
OM={};
UU={};
RN={9,2,6,6,6,6,1,4,6,6,6,6,3,2,4,6,6,6,6,3,1,6,6,6,6,2,4};
Do[VV=WW;WW=Table[TT[[RN[[kk]]]][VV[[jj]]],{jj,1,Length[VV]}];UU=Append[UU,WW],{kk,Length[RN]}];
Do[BA=Graphics[{GrayLevel[0.7],Polygon[UU[[kk]]]}];OM=Append[OM,BA];
TW=Graphics[{AbsoluteThickness[3],Line[UU[[kk]]]}];OM=Append[OM,TW],{kk,Length[UU]}];
OO=Graphics[{RGBColor[1,0,0],Disk[{0,0},0.8]}];
AA=Append[OM,OO];

Show[AA,AspectRatio->Automatic]

WW=DD;
OM={};
UU={};
RN={9,2,6,6,6,6,1,4,6,6,6,6,3,2,4,6,6,6,6,3,1,6,6,6,2,4,6,6,6,6,3,1};
Do[VV=WW;WW=Table[TT[[RN[[kk]]]][VV[[jj]]],{jj,1,Length[VV]}];UU=Append[UU,WW],{kk,Length[RN]}];
Do[BA=Graphics[{GrayLevel[0.7],Polygon[UU[[kk]]]}];OM=Append[OM,BA];
TW=Graphics[{AbsoluteThickness[3],Line[UU[[kk]]]}];OM=Append[OM,TW],{kk,Length[UU]}];
OO=Graphics[{RGBColor[1,0,0],Disk[{0,0},0.8]}];
AA=Append[OM,OO];

Show[AA,AspectRatio->Automatic]

Show[B0,AspectRatio->Automatic]

Show[T0,AspectRatio->Automatic]

Show[B0,T0,AspectRatio->Automatic]

CC={{-9,-7},{-7,-7},{-7,-5},{-5,-5},{-5,-3},{-7,-3},{-7,-1},{7,-1},{7,-3},{5,-3},{5,-5},{7,-5},{7,-7},{9,-7},{9,7},{7,7},{7,5},{5,5},{5,3},{7,3},{7,1},{-7,1},{-7,3},{-5,3},{-5,5},{-7,5},{-7,7},{-9,7},{-9,-7}};
DD=Table[CC[[jj]]+{5,5},{jj,1,Length[CC]}];
II[xx_]:={xx[[1]],xx[[2]]};
AL[xx_]:={xx[[1]]-10,xx[[2]]-10};  AR[xx_]:={xx[[1]]+10,xx[[2]]+10};
BD[xx_]:={xx[[1]]+10,xx[[2]]-10};  BU[xx_]:={xx[[1]]-10,xx[[2]]+10};
RR[xx_]:={xx[[2]],-xx[[1]]};  SS[xx_]:={-xx[[2]],xx[[1]]};
XX[xx_]:={-xx[[1]],xx[[2]]-10};  YY[xx_]:={-xx[[1]],xx[[2]]+10};
TT={AL,AR,BD,BU,RR,SS,XX,YY,II};
HHH={RGBColor[1,0,0],RGBColor[1,1,0],RGBColor[0,1,0],RGBColor[0,0,1]};
CWW={1,DD};
PAL={2,1,4,3};
PAR={2,1,4,3};
PBD={2,1,4,3};
PBU={2,1,4,3};
PRR={4,3,1,2};
PSS={3,4,2,1};
PXX={2,1,4,3};
PYY={2,1,4,3};
PII={1,2,3,4};
PPP={PAL,PAR,PBD,PBU,PRR,PSS,PXX,PYY,PII};
OOM={};
UUU={CWW};
RN={9,2,6,6,6,6,1,4,6,6,6,6,3,2,4,6,6,6,6,3,1,6,6,6,2,4,6,6,6,6,3,1};
Do[VV=CWW[[2]];WX=Table[TT[[RN[[kkk]]]][VV[[jj]]],{jj,1,Length[VV]}];CX=PPP[[RN[[kkk]]]][[CWW[[1]]]];CWW={CX,WX};UUU=Append[UUU,CWW],{kkk,2,Length[RN]}];
Do[ABW=Graphics[{HHH[[UUU[[kkk]][[1]]]],Polygon[UUU[[kkk]][[2]]]}];OOM=Append[OOM,ABW],{kkk,1,Length[UUU]}];
OOO=Graphics[{RGBColor[1,1,1],Disk[{0,0},0.8]}];
AMA=Append[OOM,OOO];

Show[AMA,AspectRatio->Automatic]

QQQ=Table[UUU[[kkk]][[2]],{kkk,1,Length[UUU]}];
MMM[XYZ_]:=Sqrt[Max[Table[XYZ[[kkk]][[1]]^2+XYZ[[kkk]][[2]]^2,{kkk,Length[XYZ]}]]];
QQM=Max[Table[MMM[QQQ[[jjj]]],{jjj,1,Length[QQQ]}]];
BOUND=Graphics[{GrayLevel[0.8],Disk[{0,0},1.05*QQM]}]; Show[BOUND,AMA,AspectRatio->Automatic]

SHW=Table[Show[BOUND,Table[AMA[[jjj]],{jjj,1,kkk}],AspectRatio->Automatic],{kkk,1,Length[AMA]}];

ListAnimate[SHW,5,AnimationRepetitions->2]