\begin{center}
\begin{tikzpicture}
\tkzDefPoint(0,0){A} \tkzDefPoint(6,0){B}
\tkzLabelLine[below](A,B){$a$} \tkzCompass(A,B)
\tkzDefMidPoint(A,B) \tkzGetPoint{M} \tkzCompass(A,M) \tkzCompass(B,M)
\tkzInterLC(A,M)(A,M) \tkzGetPoints{MX}{MAGAIN} \tkzCompass(A,MX)
\tkzDrawLine(MX,B) \tkzInterCC(MX,M)(M,MX) \tkzGetPoints{P1}{P2}
\tkzCompass(MX,P1) \tkzCompass(M,P1)
\tkzCompass(MX,P2) \tkzCompass(M,P2)
\tkzDrawLine(P1,P2) \tkzInterLC(P1,P2)(A,M) \tkzGetPoints{M1}{M2}
\tkzCompass(A,M1) \tkzCompass(A,M2)
\tkzDefMidPoint(M1,M) \tkzGetPoint{A1}
\tkzCompass(M,A1) \tkzCompass(M1,A1)
\tkzDefMidPoint(M2,M) \tkzGetPoint{A2}
\tkzCompass(M,A2) \tkzCompass(M2,A2)
\tkzInterCC(M,A)(A,M) \tkzGetPoints{M2}{M1}
\tkzCompass(M,M1) \tkzCompass(M,M2) \tkzCompass(A,M1)\tkzCompass(A,M2)
\tkzInterLL(A,A1)(M,M1) \tkzGetPoint{D1}
\tkzInterLL(A,A2)(M,M2) \tkzGetPoint{D2}
\tkzDrawLine(M,D1) \tkzDrawLine(M,D2) \tkzLabelLine[left](A,D1){$d1$}
\tkzDrawLine(A,D1) \tkzDrawLine(A,D2) \tkzLabelLine[left](A,D2){$d2$}
\tkzInterCC(M,B)(B,M) \tkzGetPoints{B1}{B2}
\tkzCompass(M,B1) \tkzCompass(M,B1) \tkzCompass(B,B1)\tkzCompass(B,B2)
\tkzDrawLine(B,B1) \tkzDrawLine(B,B2)
\tkzInterLL(D1,D2)(A,B) \tkzGetPoint{DM}
\tkzInterLC(D1,D2)(D1,DM) \tkzGetPoints{M1X}{USEL} \tkzCompass(D1,M1X)
\tkzInterLC(D1,D2)(D2,DM) \tkzGetPoints{USEL}{M2X} \tkzCompass(D2,M2X)
\tkzDrawLine(M1X,M2X)
\tkzInterCC(DM,M1X)(M1X,DM) \tkzGetPoints{V1}{V2}
\tkzCompass(DM,V1) \tkzCompass(M1X,V1)
\tkzCompass(DM,V2) \tkzCompass(M1X,V2)
\tkzInterCC(DM,M2X)(M2X,DM) \tkzGetPoints{W1}{W2}
\tkzCompass(DM,W1) \tkzCompass(M2X,W1)
\tkzCompass(DM,W2) \tkzCompass(M2X,W2)
\tkzInterLL(B,B1)(V1,V2) \tkzGetPoint{C1}
\tkzInterLL(B,B2)(W1,W2) \tkzGetPoint{C2}
\tkzDrawLine(D1,C1) \tkzLabelLine[below](D1,C1){$c1$}
\tkzDrawLine(D2,C2) \tkzLabelLine[below](D2,C2){$c2$}
\tkzLabelLine[below left](B,C1){$b1$}
\tkzLabelLine[above left](B,C2){$b2$}
\tkzDrawPolygon[fill=blue!30, opacity=0000.3000](A,B,C1,D1)
\tkzDrawPolygon[fill=red!30, opacity=0000.3000](A,B,C2,D2)
\tkzMarkRightAngles(M,A,P1 A,DM,D1)
\tkzDrawPoints(A) \tkzLabelPoints(A,B,M,D1,D2,C1,C2)
\end{tikzpicture}
\end{center}