3

Is it possible to either remove the grid lines in a pst-solides3d object or make them thinner? Specifically, I'm thinking of the rings in Herbert's answer here.

I have had a look in the manual but I can't seem to find anything regarding the issue mentioned.

Update

This is a follow-up question: I think it should be

\psSolid[r1=1,  ngrid=20 100,        RotY=90,        fillcolor=blue,  name=R1](0,0,3)
\psSolid[r1=0.9,ngrid=20 90, RotX=90,        RotZ=30,fillcolor=green, name=R2](0,0,1.5)
\psSolid[r1=0.8,ngrid=20 80,         RotY=90,        fillcolor=red,   name=R3](0,0,0.2)
\psSolid[r1=0.7,ngrid=20 70, RotX=90,        RotZ=30,fillcolor=yellow,name=R4](0,0,-0.9)
\psSolid[r1=0.6,ngrid=20 60,         RotY=90,        fillcolor=Purple,name=R5](0,0,-1.8)

in Herbert's answer in the other question.

Then we have the following:

(1) The grid 'tiles' are square-looking.

(2) With the new coordinates for the rings, they are not 'floating' or overlapping when interlocked with one another.

Am I right on this?

Update 2

The rings can be smoothened even further but the code takes a very long time to compile (using XeLaTeX):

\documentclass[
  dvipsnames
]{article}

\usepackage{pst-solides3d}

\begin{document}

\begin{center}
  \begin{pspicture}[solidmemory](-2.9,-7.95)(2.9,10.45)
   \psset{
     lightsrc=viewpoint,
     viewpoint=40 -10 0 rtp2xyz,
     Decran=100,
     object=tore,
     r0=0.2,
     action=none
   }
    \psSolid[r1=1,  ngrid=66 330,        RotY=90,        fillcolor=blue,  name=R1](0,0,3)
    \psSolid[r1=0.9,ngrid=66 297,RotX=90,        RotZ=30,fillcolor=green, name=R2](0,0,1.5)
    \psSolid[r1=0.8,ngrid=66 264,        RotY=90,        fillcolor=red,   name=R3](0,0,0.2)
    \psSolid[r1=0.7,ngrid=66 231,RotX=90,        RotZ=30,fillcolor=gray,  name=R4](0,0,-0.9)
    \psSolid[r1=0.6,ngrid=66 198,        RotY=90,        fillcolor=yellow,name=R5](0,0,-1.8)
    \psSolid[r1=0.5,ngrid=66 165,RotX=90,        RotZ=30,fillcolor=Purple,name=R6](0,0,-2.5)
    \psSolid[
      object=fusion,
      base=R1 R2 R3 R4 R5 R6,
      linewidth=0.1pt,
      linecolor=black!60,
      action=draw**
    ]
  \end{pspicture}
\end{center}

\end{document}

P.S. I have added an extra ring and changed the colours.

2 Answers2

4

linewidth and linecolor can not be set individually for the rings. It is only possible for the last fusion object which collects all polygons with its direction vector to decide which is visible and which not.

\psSolid[object=fusion,base=R1 R2 R3 R4 R5, action=draw**,linewidth=0.2pt,linecolor=black!50]

enter image description here

For any viewer and any magnification you get some Moiré pattern:

enter image description here

3

Changing the width uses the linewidth=<dimen> key-value. To remove it, set linewidth=0pt.

enter image description here

\documentclass{article}
\usepackage{pst-solides3d}% http://tug.org/PSTricks/main.cgi/
\begin{document}

\begin{pspicture}[solidmemory](-3,-7)(3,10.2)
\psset{lightsrc=viewpoint,viewpoint=40 -10 0 rtp2xyz,Decran=100,ngrid=18 30,
       object=tore,r0=0.2,action=none,linewidth=0pt}
\psSolid[r1=1,  RotY=90,        fillcolor=blue,  name=R1](0,0,3)
\psSolid[r1=0.9,RotX=90,RotZ=30,fillcolor=Brown, name=R2](0,0,1.5)
\psSolid[r1=0.8,RotY=90,        fillcolor=red,   name=R3](0,0,0.1)
\psSolid[r1=0.7,RotX=90,RotZ=30,fillcolor=yellow,name=R4](0,0,-1)
\psSolid[r1=0.6, RotY=90,        fillcolor=green,name=R5](0,0,-2)
\psSolid[object=fusion,base=R1 R2 R3 R4 R5, action=draw**]
\end{pspicture}

\end{document}

A minor artifact of the visual display should not be visible in the printed media. Zooming in at high detail should confirm this:

enter image description here

You could also set it to a smaller, non-zero dimension, but change the colour to match that of the object. However, since pst-solides3d applied shading to surfaces based on a light source, this will not always display the desired effect.

You can change the line color (if needed) using the regular linecolor=<colour> key-value.

Werner
  • 603,163
  • 1
    @SvendTveskæg: Herbert's answer confirms that this is the case, not being able to set linecolor individually. If you had a single object with some light/shading, colour setting the rules and fill to be similar might lessen the visual artifacts. – Werner Oct 27 '13 at 21:20
  • @SvendTveskæg: Your update shows a nicer (smoother) layout of the rings, however, the compile time (on the rendering side) is much longer. But this is to be expected. – Werner Oct 28 '13 at 03:41