[pstricks] pst-3dvue and \psset
Jean-Michel Papy
jean-michel.papy at esat.kuleuven.ac.be
Tue May 10 19:07:21 CEST 2005
thank you Herbert, the code works fine.
The only thing is that I have to include it just before the pstricks
code and not in the preamble. That's not a problem to me.
great job :-)
JM
On Sat, 2005-04-30 at 14:18 +0200, Herbert Voss wrote:
> jmpapy wrote:
>
> >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 ?
> >
> >
> pst-vue3d uses the scale option but I suppose that there is some
> mismatch between the unit and scale setting.
> Try the following, but I have no idea, if there are some sieeffects.
>
> Herbert
>
> \documentclass[12pt,a4paper]{article}
> \usepackage{pstricks}
> \usepackage{pst-vue3d}
> \usepackage{multido}
> \makeatletter
> \g at addto@macro{\variablesTroisD}{%
> /xUnit \pst at number\psxunit def
> /yUnit \pst at number\psyunit def
> }%
> \pstVerb{
> tx at 3DDict begin
> /CalcCoordinates {
> formulesTroisD
> % Xi 28.45 mul Yi 28.45 mul
> Xi xUnit mul Yi yUnit mul } def
> end }
> \makeatother
>
> \begin{document}
>
> \psset{unit=2cm}
> \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)
> \end{pspicture}
>
> \end{document}
>
--
Jean-Michel PAPY,
E.S.A.T.-S.C.D.
Katholieke Universiteit Leuven.,
Kasteelpark Arenberg 10,
B-3001 LEUVEN - HEVERLEE (BELGIUM)
Email : Jean-Michel.Papy at esat.kuleuven.ac.be
Tel. : ++32 - (0)16 32.10.67
Fax. : ++32 - (0)16 32.19.70
More information about the PSTricks
mailing list