This question is similar to How to improve my PSTricks code to construct a triangle diagram?.
Consider the following example.
Code
% pdflatex -shell-escape test.tex
\documentclass{article}
\usepackage{
auto-pst-pdf,
pst-eucl,
pstricks-add
}
\begin{document}
\def\laengde{6}
\def\startX{3}
\def\startY{0}
\pstFPdiv\konstA{\laengde}{2}
\pstFPsub\Bmin{\startX}{\konstA}
\pstFPadd\Bmaks{\startX}{\konstA}
\pstFPadd\Hmin{\startY}{0}
\pstFPdiv\konstB{3 sqrt}{2}
\pstFPmul\Hmaks{\konstB}{\laengde}
\begin{pspicture}(\Bmin,\Hmin)(\Bmaks,\Hmaks)
\cnodeput(\startX,\startY){A}{$1$}
\cnodeput(!\startX\space \laengde\space 6 div sub \startY\space \laengde\space 3 sqrt 2 mul div add){B}{$2$}
\cnodeput(!\startX\space \laengde\space 6 div add \startY\space \laengde\space 3 sqrt 2 mul div add){C}{$3$}
\cnodeput(!\startX\space \laengde\space 3 div sub \startY\space \laengde\space 3 sqrt div add){D}{$4$}
\cnodeput(!\startX\space \startY\space \laengde\space 3 sqrt div add){E}{$5$}
\cnodeput(!\startX\space \laengde\space 3 div add \startY\space \laengde\space 3 sqrt div add){F}{$6$}
\cnodeput(!\startX\space \laengde\space 2 div sub \startY\space \laengde\space 3 sqrt 2 div mul add){G}{$7$}
\cnodeput(!\startX\space \laengde\space 6 div sub \startY\space \laengde\space 3 sqrt 2 div mul add){H}{$8$}
\cnodeput(!\startX\space \laengde\space 6 div add \startY\space \laengde\space 3 sqrt 2 div mul add){I}{$9$}
\cnodeput(!\startX\space \laengde\space 2 div add \startY\space \laengde\space 3 sqrt 2 div mul add){J}{\scriptsize{$10$}}
\psset{
linewidth=1.5pt,
linecolor=red
}
\ncline{A}{B}
\ncline{B}{D}
\ncline{D}{G}
\ncline{G}{H}
\ncline{H}{I}
\ncline{I}{J}
\ncline{J}{F}
\ncline{F}{C}
\ncline{C}{A}
\psset{
linewidth=0.5pt,
linecolor=black,
LabelSep=0.8,
arrows=<->
}
\pstMarkAngle{J}{A}{G}{\SI{60}{\degree}}
\pstMarkAngle{A}{G}{J}{\SI{60}{\degree}}
\pstMarkAngle{G}{J}{A}{\SI{60}{\degree}}
\end{pspicture}
\end{document}
Output
Question
I have the desired output but the code is rather messy; can anyone help me simplify if?