[pstricks] x- and yunit behavior in 3D pictures

leon.free at free.fr leon.free at free.fr
Tue Jan 5 08:05:15 CET 2016


Hi,

In 2D drawing, I understand that the expected behavior of changing the
xunit/yunit parameter is to modify the aspect ratio, resulting in a
figure where all objects are rescaled accordingly to this ratio. In 3D
figures, it is unclear what changes occur after changing the values of
xunit and yunit.

In the following example, both pictures result from identical
pstricks/pst-solides3d macros, excepted that the first uses the
defaults for x- and yunit, while in the second one, yunit is set to
0.5cm. It appears that the size and the perspective rendering of the
axes are modified accordingly, but the \psSolid plan object is not
(neither in size nor in perspective).


\documentclass{article}
\usepackage{pst-solides3d,pstricks}

\begin{document}
%1st picture with defaults for x- and yunit
\begin{minipage}[t]{.5\linewidth}
       \begin{pspicture}
     \psset{viewpoint=40 25 15 rtp2xyz,Decran=60} 
       \axesIIID(0,0,0)(2,2,2)
        \psSolid[object=plan,%
        definition=normalpoint,%
        args={0 0 0 [0 0 1]},
        fillcolor=blue,%
        opacity=.2,%
        base = -2 3 -1 3,%
        planmarks] 
\end{pspicture}
\end{minipage}
%
\hspace*{2cm}
%
\begin{minipage}[t]{.5\linewidth}
%2nd picture : changed yunit value
      \begin{pspicture}
      \psset{xunit=1cm,yunit=.5cm,viewpoint=40 25 15 rtp2xyz,Decran=60}
        \axesIIID(0,0,0)(2,2,2)
        \psSolid[object=plan,%
        definition=normalpoint,%
        args={0 0 0 [0 0 1]},
        fillcolor=blue,%
        opacity=.2,%
        base = -2 3 -1 3,%
        planmarks] 
\end{pspicture}
\end{minipage}

\end{document}


More information about the PSTricks mailing list