\documentclass{article}\usepackage{pstricks,pst-plot,color}\usepackage[margin=0cm,papersize={114px,114px}]{geometry}\newcommand{\PI}{3.14159\space}\definecolor{dkgreen}{rgb}{0 .5 0}\psset{unit=50px}\renewcommand{\th}{.02\space}\newcommand{\cth}{.015\space}\newcommand{\pth}{.01\space}\newcommand{\ballrad}{0.04}\newcommand{\perplen}{0.1\space}\newcommand{\cs}{180 mul \PI div cos\space}\newcommand{\sn}{180 mul \PI div sin\space}\newcommand{\cpt}{\space dup \cs exch \sn}\newcommand{\ptA}{0.5 \PI mul\cpt}\newcommand{\ptB}{1.3 \PI mul\cpt}\newcommand{\ptC}{1.8 \PI mul\cpt}\newcommand{\ptP}{1.0 \PI mul\cpt}\newcommand{\dashlen}{.03}\renewcommand{\ln}[4]{\psline[linewidth=\th,linecolor=#3,linestyle=#4,dash=\dashlen]{c-c}(! #1)(! #2)}% ax ay bx by -> ax-bx ay-by\newcommand{\subpt}{3 2 roll exch sub 3 1 roll sub exch \space}% ax ay bx by -> ax+bx ay+by\newcommand{\addpt}{3 2 roll add 3 1 roll add exch \space}% ax ay bx by -> ax*bx+ay*by\newcommand{\dotpt}{3 2 roll mul 3 1 roll mul add \space}% ax ay c -> c*ax c*ay\newcommand{\scpt}{dup 3 1 roll mul 3 1 roll mul exch \space}% ax ay -> ax ay ax ay\newcommand{\duppt}{dup 3 2 roll dup 4 1 roll exch \space}\newcommand{\normpt}{\duppt\duppt\dotpt sqrt 1 exch div \scpt}\newcommand{\perppt}[3]
{
#2 #1 \subpt\duppt #3 #1 \subpt\dotpt
#2 #1 \subpt\duppt\dotpt
div
\scpt
#1
\addpt}\newcommand{\ptN}{\perppt{\ptA}{\ptB}{\ptP}}\newcommand{\ptM}{\perppt{\ptC}{\ptA}{\ptP}}\newcommand{\ptL}{\perppt{\ptB}{\ptC}{\ptP}}\newcommand{\pt}[4]
{\pscircle[linewidth=0,linestyle=none,fillstyle=solid,fillcolor=#2](! #1){\ballrad}\uput{.07}[#3](! #1){#4}}\newcommand{\ha}[2]{#1 #2 \subpt\normpt\perplen\scpt #2 \addpt}\newcommand{\plang}[3]
{\psline[linewidth=\pth,linecolor=black]{c-c}(! \ha{#1}{#2})(! \ha{#1}{#2}\ha{#3}{#2}\addpt #2 \subpt)(! \ha{#3}{#2})
}\begin{document}\noindent\begin{pspicture}(-1.23,-1.04)(1.04,1.22)
\pscircle[linewidth=\cth,linecolor=black](0,0){! 1 \cth 2 div add}\ln{\ptA}{\ptB}{red}{solid}\ln{\ptC}{\ptB}{red}{solid}\ln{\ptA}{\ptC}{red}{solid}\ln{\ptB}{\ptL}{red}{dashed}\ln{\ptL}{\ptP}{dkgreen}{solid}\ln{\ptL}{\ptP}{dkgreen}{solid}\ln{\ptM}{\ptP}{dkgreen}{solid}\ln{\ptN}{\ptP}{dkgreen}{solid}\ln{\ptL}{\ptM}{blue}{solid}\pt{\ptA}{red}{u}{$A$}\pt{\ptB}{red}{d}{$B$}\pt{\ptC}{red}{r}{$C$}\pt{\ptL}{blue}{d}{$L$}\pt{\ptM}{blue}{r}{$M$}\pt{\ptN}{blue}{r}{$N$}\pt{\ptP}{dkgreen}{l}{$P$}\plang{\ptP}{\ptM}{\ptA}\plang{\ptP}{\ptN}{\ptB}\plang{\ptP}{\ptL}{\ptC}\end{pspicture}\end{document}