Consider the following example.
Code
% pdflatex -shell-escape test.tex
\documentclass{article}
\usepackage{
auto-pst-pdf,
pst-eucl,
pstricks-add
}
\usepackage[
locale=DE
]{siunitx}
\begin{document}
\begin{figure}
\def\radius{21.65 } % radius
\def\vinkelA{12 } % angle
\def\faktor{0.33333333 } % scaling
\newlength\maksimum % define length
\maksimum=\radius\psunit % set the length to the current value/unit
\maksimum=2\dimexpr\faktor\maksimum
\centering
\psset{
unit=0.8cm,
linecolor=red
}
\begin{pspicture}(\maksimum,\maksimum)
\pnode(!2 \faktor \radius mul mul \faktor \radius mul){A}
\pnode(!\faktor \radius mul \faktor \radius mul){B}
\pnode(!\faktor \radius mul 1 \vinkelA cos add \faktor \radius mul mul){C}
\psline(A)(!2 \faktor \radius mul mul 0)(0,0)(!0 \faktor \radius mul)
\psarc(B){!\faktor \radius mul}{0}{!90 \vinkelA sub}
\psarc(B){!\faktor \radius mul}{!90 \vinkelA add}{180}
\psline[linestyle=dashed](!0 \faktor \radius mul)(A)
\psarc[linestyle=dashed](B){!\faktor \radius mul}{180}{360}
\psset{
linecolor=blue,
linewidth=1.5pt
}
\psRelLine[angle=!270 \vinkelA add](B)(!0 \faktor \radius mul){1}{P1}
\psRelLine[angle=!90 \vinkelA sub](B)(A){1}{P2}
\pcline(B)(P1)
\pcline(B)(P2)
\pcline[linestyle=none](P1)(P2)
\aput*{:U}{Oculus}
\pcline(P1)(P2)
\pcline(B)(C)
\psset{
linecolor=black,
linewidth=0.5pt,
MarkAngleRadius=3.7,
LabelSep=4
}
\psRelLine[linestyle=dotted,angle=45]{<->}(B)(A){1}{V}
\ncline[linestyle=none]{B}{V}
\naput[nrot=:U]{\small\SI{\radius}{\m}}
\pstMarkAngle{C}{B}{P1}{\scriptsize\SI{\vinkelA}{\degree}}
\pstMarkAngle{P2}{B}{C}{\scriptsize\SI{\vinkelA}{\degree}}
\pstRightAngle{P1}{C}{B}
\pstRightAngle{P2}{C}{B}
\end{pspicture}
\end{figure}
\end{document}
Output
Question
I would like to improve the code. I have already improved it somewhat from where I started, but I can quite clearly get even better.