[pstricks] pst-3dvue and \psset

jmpapy Jean-Michel.Papy at esat.kuleuven.ac.be
Sat Apr 30 13:11:21 CEST 2005


Hello everybody,

The attached code draws a cube with bars inside. It compiles fine. The
only problem is when I change the unit value with \psset. For instance
when I set unit=0.5cm, only the external cube is reduced and not the
bars. The bars are drawn in the \multido loop. Does it have something to
do with multido ? pst-vue3d ?

thanks you very much

versions:
pstricks version 1.04 22/06/2004
multido v1.41 18/05/2004
pst-vue3d v? (latest available on CTAN) 



\documentclass[12pt,a4paper]{article}
\usepackage{pstricks}
\usepackage{pst-vue3d}
\usepackage{multido}


\begin{document}

\psset{unit=1cm}
\begin{pspicture}(-3.8,-3)(3,3)
  %\psframe(-3.8,-3)(3,3)
  \psset{THETA=30,PHI=30,Dobs=150,Decran=10}
  %\AxesThreeD[linecolor=red,linestyle=dashed](50,60,50)
  \pNodeThreeD(25,-25,25){A}
  \pNodeThreeD(25,25,25){B}
  \pNodeThreeD(25,25,-25){C}
  \pNodeThreeD(25,-25,-25){D}
  \pNodeThreeD(-25,-25,25){E}
  \pNodeThreeD(-25,25,25){F}
  \pNodeThreeD(-25,25,-25){G}
  \pNodeThreeD(-25,-25,-25){H}
  %%% hidden faces of the exterior cube
  \pspolygon(A)(E)(H)(D)
  \pspolygon(E)(F)(G)(H)
  %%% mode-3 vectors
  \multido{\iZ=-20+10}{5}{%
    \multido{\iY=-20+10}{5}{%
      \CubeThreeD[A=23,B=3,C=3](0,\iY,\iZ)%
    }%
  }%
  %%% front faces of the exterior cube
  \pspolygon(A)(B)(C)(D)
  \pspolygon(B)(F)(G)(C)
  %%% direction of indices
  % first possibility
  \pNodeThreeD(32,-32,32){O}
  %\psdot(O)
  \pNodeThreeD(17,-32,32){i3}
  \pNodeThreeD(32,-17,32){i2}
  \pNodeThreeD(32,-32,17){i1}
  \psline{->}(O)(i3)
  \uput[90](i3){$i_3$}
  \psline{->}(O)(i2)
  \uput[90](i2){$i_2$}
  \psline{->}(O)(i1)
  \uput[180](i1){$i_1$}
  % second possibility
  \pNodeThreeD(-30,-25,25){O}
  \pNodeThreeD(-45,-25,25){i3}
  \psline{->}(O)(i3)
  \uput[90](i3){\scalebox{0.6}{$i_3$}}
  \pNodeThreeD(25,-25,-30){O}
  \pNodeThreeD(25,-25,-45){i1}
  \psline{->}(O)(i1)
  \uput[180](i1){\scalebox{0.9}{$i_1$}}
  \pNodeThreeD(25,30,25){O}
  \pNodeThreeD(25,45,25){i2}
  \psline{->}(O)(i2)
  \uput[90](i2){\scalebox{1.2}{$i_2$}}
\end{pspicture}
\end{document}




More information about the PSTricks mailing list