Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

STRONGLY EDITED: I have been experiencing different sorts of problems with the package pst-solides3d. They are related mostly -- but not exclusively -- to the fusing of objects. Moreover, I have not been able to compile correctly some of the examples which can be found in the main PSTricks site, one of which I had originally included here, although nobody gave any signs of having the same problem. Thus, I have decided to bring forward a couple of issues with my own code.

Firstly, in the next MWE I get a patch of the cylinder (a blue patch with the colors I have chosen) in front of the cube in a region where the former should be hidden:

\documentclass{memoir}

\usepackage[dvipsnames,svgnames]{xcolor}
\usepackage{multido,pstricks,pst-solides3d}
\usepackage[pdfcrop={--hires}]{auto-pst-pdf}

\begin{document}
\psset{unit=0.5cm}
\begin{pspicture}(-6,-5)(6,7)
\psset{lightsrc=50 20 75 rtp2xyz,%viewpoint,
viewpoint=50 15 60 rtp2xyz,Decran=50}
\psset{solidmemory}
\psSolid[object=cylindre,h=10,
fillcolor=blue,r=1.5,
ngrid=4 16,
action=none,
name=Cyl](0,0,-6)
\psSolid[object=cube,a=4,
linecolor=BrickRed,
fillcolor=BrickRed,
action=none,
name=Hex](0,0,0)
\psSolid[object=fusion,
action=draw**,grid,
base=Cyl Hex]%(0,0,0)
\composeSolid
\end{pspicture}
\end{document}  

The MWE is actually a mixture of one of those that can be found in the pst-solides3d documentation and another, a bit more complicated, of my own. Does anybody else get that wrong patch of the cylinder?

As a second example, in the next MWE I am trying to define a matrix of points in 3D space. The preamble is the same as for the MWE above:

\begin{pspicture}(-3,-3)(3,3)
\psset{lightsrc=60 20 10,
viewpoint=60 20 15 rtp2xyz,
Decran=60}
\multido{\nx=1+1}{11}{%
\multido{\ny=1+1}{11}{%
\multido{\nz=1+1}{11}{%
\psPoint(\nx,\ny,\nz){K\nx\ny\nz}%
\psdot[dotstyle=*,linecolor=blue](K\nx\ny\nz)}}}
\end{pspicture}

Maybe this is not the most efficient way to proceed, but it is fairly simple. I have no problem when I have two of the index variables running and fix to a given value the third index (let us say it is \nz) by commenting the corresponding multido line and replacing \nz with some digit; but if I try to keep the three indices running, I have no output. I have tried also with the command foreach from the Tikz package, but the problem remains. Maybe there's something wrong about my code, but I'm not able to figure out what it is.

I have an updated distribution from a CTAN server which includes -- I believe -- the latest issue of pst-solides3d. My system is MikTeX 2.9 running on Windows XP. With other tries at pst-solides3d I've had the right outcomes, but the two above are among those in a bunch that have been giving me trouble. I think that those are enough for a start, though, and I may find out that it's just me doing something wrong in the code above.

share|improve this question

closed as too broad by Paul Gessler, Andrew Swann, Kurt, Papiro, tohecz Sep 2 at 11:48

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
I would suggest breaking these multiple questions into separate questions. You are more likely to attract answers if the questions are more manageable in size and address one question only. Furthermore, it's easier for future visitors to find and apply solutions to more targeted questions. –  Paul Gessler Aug 19 at 1:57

Browse other questions tagged or ask your own question.