[pstricks] opacity in pst-solides3d
Jon Joseph
josco.jon at gmail.com
Mon Jan 4 02:17:31 CET 2010
The following code snippet fuses a parametrized surface with an inner cylinder. I would like the opacity of the outer surface to be around .3 (i.e. opacity=.3) and the inner cylinder to be totally opaque (opacity=1). Given my method in the code opacity only seems to have an effect if it is included in a \psset{} macro in which case both surfaces are transparent. Including opacity=k in the directives for an individual solid has no effect on the individual surfaces. Does deactivatecolor take opacity into account? Or is something else going on? Thanks, Jon
\begin{pspicture}[showgrid=true](0,-2)(2,2)
\psset{solidmemory}
\psset{lightsrc=30 -30 30,viewpoint=30 -30 30,
Decran=100,linewidth=0.5\pslinewidth, ngrid=18 18,fillcolor=white, opacity=.3}
\defFunction{sinshell}(u,v)
{u}{2 u mul 1 add Sin .25 mul 1.2 add v Cos mul}{2 u mul 1 add Sin .25 mul 1.2 add v Sin mul}
\psSolid[object=surfaceparametree,
base=0 4 0 2 pi mul,
action=none,
linecolor=green,
function=sinshell,
opacity=.5, %% No effect
name=cylindre1](0,0,0)
\psSolid[object=cylindrecreux,%
action=none,
h=4, r=.75,
incolor=red,
opacity=1, % no effect
RotY=90,
name=cylindre2](0,0,0)
\psSolid[object=fusion,
deactivatecolor,
base=cylindre1 cylindre2, RotX=0]
\composeSolid
\end{pspicture}
More information about the PSTricks
mailing list