I want to do a vector addition with different units as follows,
(1+2pt,3+4pt) % of course this point format will not work for the current PSTricks
My solution is to write the point in PostScript notation. However a problem occurs: I need a new operator to convert pt
to the active unit.
The operation I want to do in PostScript looks like the following,
(!1 2 Pt2AU add 3 4 Pt2AU add)
And how to define Pt2AU
?
Note that the default active unit in PSTricks is 1 centimeter. But we can change it.
The MWE you can use is given as follows,
\documentclass[pstricks,border=12pt]{standalone}
\SpecialCoor
\pstVerb{/Pt2AU {72.27 div 2.54 mul} bind def}% needs correction to accommodate all possible active unit
\psset{unit=1cm}
\begin{document}
\begin{pspicture}[showgrid](4,4)
\psline(1,3)(!1 2 Pt2AU add 3 4 Pt2AU add)
\end{pspicture}
\end{document}
pstricks.pro
andpst-eucl.pro
to find cool tricks for manipulating PostScripts.