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

Doris Behrendt doris.behrendt at me.com
Tue Jan 5 09:54:14 CET 2016


Hi Leon,

change the position of the plane, then you can understand better.
Since you put the planes at (0,0,0) — which is mapped on itself by the linear mapping (x,y,z)->(x,.5y,z) — there is no effect of the mapping in your example. Try mine, where I put the planes at (1,0,0).
Hope this helps.


Doris

\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(-2,-2,-2)(2,2,2)
       \psSolid[object=plan,%
       definition=normalpoint,%
       args={1 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(-2,-2,-2)(2,2,2)
       \psSolid[object=plan,%
       definition=normalpoint,%
       args={1 0 0 [0 0 1]},
       fillcolor=blue,%
       opacity=.2,%
       base = -2 3 -1 3,% 
planmarks] 
\end{pspicture}
\end{minipage}

\end{document}


> On 05 Jan 2016, at 08:05, leon.free at free.fr wrote:
> 
> 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}
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
> archive: http://www.tug.org/pipermail/pstricks/




More information about the PSTricks mailing list