(*Variables*)
lengthab=10;
lengthda=7;
lengthbe=(Sqrt[20]);
lengthec=(Sqrt[41]);

d1=24; (*xtranslation for vertical lines*)
d2=7; (*Ytranslation for everything*)
d3=2; (*Compensation for *)

rijen=7;
kolommen=9;
res=40;
oogres=20;

(*Rotations*)
rot180[xy_]:=(({{-1, 0}, {0, -1}})).xy;
Rot180[xylist_]:=rot180/@xylist;
ROT180[xylistlist_]:=Rot180/@xylistlist;

rot90[xy_]:=(({{0, -1}, {1, 0}})).xy;
Rot90[xylist_]:=rot90/@xylist;
ROT90[xylistlist_]:=Rot90/@xylistlist;

rotBE[xy_]:=(({{Cos[ArcTan[2/4]], -Sin[ArcTan[2/4]]}, {Sin[ArcTan[2/4]], Cos[ArcTan[2/4]]}})).xy; (*Rotation of BE line(chin)*)
RotBE[xylist_]:=rotBE/@xylist;
ROTBE[xylistlist_]:=RotBE/@xylistlist;

rotCE[xy_]:=(({{Cos[ArcTan[-5/4]], -Sin[ArcTan[-5/4]]}, {Sin[ArcTan[-5/4]], Cos[ArcTan[-5/4]]}})).xy; (*Rotation of CE line(nose)*)
RotCE[xylist_]:=rotBE/@xylist;
ROTCE[xylistlist_]:=RotBE/@xylistlist;



t1[{x_,y_}]:={x,y}+{d1,d3}; (*Move d1 to the right and d3 higher to make the next column*)
t2[{x_,y_}]:={x,y}+{0,d2};(*Move d2 higher to make the next row*)

T1[fg_]:=t1 /@ fg;
T2[fg_]:=t2 /@ fg;

TT1[fglist_]:=T1/@fglist;
TT2[fglist_]:=T2/@fglist;


(*Equations generating the curved lines*)
lab=N[Table[{(lengthab/res)i,.8Sin[(i/40)π]},{i,0,res}]];
lbe=N[Table[rotBE[{(lengthbe/res)i ,.5Sin[i(π/(res/2
))]}]+{10,0},{i,0,res}]];
lec=N[Table[rotCE[{(lengthec/res)i ,.55Sin[i(π/(res/2
))]}]+{10,0},{i,0,res}]];
lda=N[Table[{.75Sin[i(π/(res/2
))],(lengthda/res)i},{i,0,res}]];
oog=N[Table[{.2Cos[i(π/(oogres/2))],.2Sin[i(π/(oogres/2
))]}+{11.5,4},{i,0,oogres}]];
oor=N[Table[{.2((12/res)i),-2Sin[(i/43)π]}+{8.5,5.5},{i,-2,res}]];

(*plot one figure*)
totaal={lab,lbe,lec,lda,oog,oor};
Show[Graphics[Line[totaal]]]


frontback={lbe,lec,lda};
belly={lab};
face={oog,oor};


l1:=Table[Line[Nest[TT1,Nest[TT2,frontback,i],j]],{i,0,rijen},{j,0,kolommen}];
l2:=Table[Line[Nest[TT2,Nest[TT1,Nest[ROT180,belly,i],j],k]],{i,0,1},{j,0,kolommen},{k,0,rijen}];
l3:=Table[Line[Nest[TT2,Nest[TT1,Nest[ROT180,face,i],j],k]],{i,0,1},{j,0,kolommen},{k,0,rijen}];


Show[Graphics[{{Red,l1},{Red,l2},{Black,l3}}]]
(*Export["styledpig.eps",%,"EmbeddedFonts"->False]*)