Consider the following (non-minimal) example of a rotation of a quadrilateral around a point:
\documentclass{article}
\usepackage{pstricks-add}
\usepackage{xfp}
\begin{document}
\def\Ax{-1}
\def\Ay{4}
\def\Bx{-2}
\def\By{3}
\def\Cx{-1}
\def\Cy{1}
\def\Dx{0}
\def\Dy{3}
\def\Ex{1}
\def\Ey{2}
\def\rotation{90}
\def\punkt(#1){%
\def\str{0.1}
\rput(#1){%
\psline(-\str,-\str)(\str,\str)
\psline(-\str,\str)(\str,-\str)}
\uput[45](#1){$#1$}}%
\begin{pspicture}(-2.45,-1.12)(2.05,4.4)
\pnodes(\Ax,\Ay){A}(\Bx,\By){B}(\Cx,\Cy){C}(\Dx,\Dy){D}(\Ex,\Ey){E}
{\psset{
linewidth = 1.5\pslinewidth,
fillstyle = solid,
fillcolor = cyan!50
}
\pspolygon(A)(B)(C)(D)
\psrotate(E){\rotation}{%
\pspolygon[
linecolor = red
](\Ax,\Ay)(\Bx,\By)(\Cx,\Cy)(\Dx,\Dy)
\uput[180]{\fpeval{360-\rotation}}(\Ax,\Ay){$A'$}
\uput[270]{\fpeval{360-\rotation}}(\Bx,\By){$B'$}
\uput[90]{\fpeval{360-\rotation}}(\Cx,\Cy){$C'$}
\uput[90]{\fpeval{360-\rotation}}(\Dx,\Dy){$D'$}}}
\uput[90](A){$A$}
\uput[180](B){$B$}
\uput[270](C){$C$}
\uput[0](D){$D$}
\punkt(E)
\end{pspicture}
\end{document}
The nodes A'
--D'
are not placed as I expected; I would like A'
to be placed to the left of the vertex A
, B'
below the vertex B
, and so on.
How do I achieve this?