![pst-3dplot 对象中的不透明度/透明度](https://linux22.com/image/471022/pst-3dplot%20%E5%AF%B9%E8%B1%A1%E4%B8%AD%E7%9A%84%E4%B8%8D%E9%80%8F%E6%98%8E%E5%BA%A6%2F%E9%80%8F%E6%98%8E%E5%BA%A6.png)
答案1
您错过了\DocumentMetadata{}
第一行。它允许lualatex
透明度:
\DocumentMetadata{}
\documentclass[pstricks]{standalone}
\usepackage{pst-3dplot}
\begin{document}
\begin{pspicture*}(-3,-1)(3,3.5)
\parametricplotThreeD[xPlotpoints=20, yPlotpoints=20, linecolor=cyan!30, linewidth=1pt,
plotstyle=curve, algebraic=true, fillstyle=solid, fillcolor=cyan!30, opacity=0.5]
(0,3)(0, 6.2831853){cos(u) | sin(u) | t} %% the cylinder x^2 + y^2 = 1
\parametricplotThreeD[xPlotpoints=20, yPlotpoints=20, linecolor=blue, ,linestyle=solid,
dash=3pt 2pt, linewidth=1pt, plotstyle=curve, algebraic, fillcolor=cyan!30]
(0,6.2831853){cos(t) | sin(t) | 3 }
\parametricplotThreeD[xPlotpoints=20, yPlotpoints=20, linecolor=blue, linestyle=solid,
dash=3pt 2pt, linewidth=1pt, plotstyle=curve, algebraic, fillcolor=cyan!30]
(0,6.2831853){cos(t) | sin(t) | 0 }
%\psplotThreeD[plotstyle=line,algebraic=true, yPlotpoints=200,xPlotpoints=200,
% linewidth=1pt, linecolor=orange!30, hiddenLine=true, drawStyle=xyLines, fillstyle=solid,
% fillcolor=orange!30, opacity=0.5](-2, 2)(-2, 2){ 1.5 } %% the plane z = 1.5
\parametricplotThreeD[xPlotpoints=20, yPlotpoints=20, linecolor=blue, linestyle=dashed,
dash=3pt 2pt, linewidth=1pt, plotstyle=curve, algebraic, fillcolor=cyan!30]
(0,6.2831853){cos(t) | sin(t) | 1.5 }
\pstThreeDCoor[linecolor=black,linewidth=1pt,IIIDxTicksPlane=xz,
IIIDyTicksPlane=yz,spotX=180,xMin=-2,xMax=2,yMin=-2,yMax=2,zMin=-1,zMax=3.5,nameX=$x$, nameY=$y$,
nameZ=$z$, labels=none]
\pstThreeDSquare[linewidth=1pt,linecolor=orange!30,fillstyle=solid,fillcolor=orange!30,opacity=0.5]
(-2,-2,1.5)(4,0,0)(0,4,0)
\end{pspicture*}
\end{document}
还有一个\pstThreeDCircle
...
\DocumentMetadata{}
\documentclass[pstricks]{standalone}
\usepackage{pst-3dplot}
\begin{document}
\begin{pspicture*}(-3,-1)(3,3.5)
\parametricplotThreeD[xPlotpoints=200, yPlotpoints=100, linecolor=cyan!30, linewidth=1pt,
plotstyle=curve, algebraic=true, fillstyle=solid, fillcolor=cyan!30, opacity=0.5]
(0,3)(0, 6.2831853){cos(u) | sin(u) | t} %% the cylinder x^2 + y^2 = 1
\pstThreeDCircle[linewidth=1pt,linecolor=blue](0,0,3)(1,0,0)(0,1,0)
\pstThreeDCircle[linewidth=1pt,linecolor=blue](0,0,0)(1,0,0)(0,1,0)
\pstThreeDCircle[linewidth=1pt,linecolor=blue,linestyle=dashed,
dash=3pt 2pt](0,0,1.5)(1,0,0)(0,1,0)
\pstThreeDCoor[linecolor=black,linewidth=1pt,IIIDxTicksPlane=xz,
IIIDyTicksPlane=yz,spotX=180,xMin=-2,xMax=2,yMin=-2,yMax=2,
zMin=-1,zMax=3.5,nameX=$x$, nameY=$y$, nameZ=$z$, labels=none]
\pstThreeDSquare[linewidth=1pt,linecolor=orange!30,fillstyle=solid,fillcolor=orange!30,opacity=0.5]
(-2,-2,1.5)(4,0,0)(0,4,0)
\end{pspicture*}
\end{document}
同样的情况还有pst-solides3d
:
\DocumentMetadata{}
\documentclass[pstricks]{standalone}
\usepackage{pst-solides3d}
\begin{document}
\begin{pspicture}[solidmemory](-5,-4)(5,6)
\psset{Decran=15,viewpoint=10 10 5}
\psSolid[object=cylindrecreux, h=3,r=2, fillcolor=blue!10,
mode=4, incolor=green!50, linecolor=black!10,name=A,action=none](0,0,0)
\psSolid[object=plan,definition=equation,args={[0 0 1 -1.5]},base=-3 3 -3 3,
ngrid=30 30,fillcolor=red!10,linewidth=0pt,name=B,action=none]
\psSolid[object=fusion,base=A B_s,linewidth=0.1pt,action=draw**,opacity=0.9]
\axesIIID(2,2,3)(4,4,4)
\defFunction[algebraic]{Circle}(t){2*cos(t)}{2*sin(t)}{3}
\psSolid[object=courbe,r=0,function=Circle,range=0 6.3,linecolor=red,linewidth=1.5pt,action=draw]
\defFunction[algebraic]{Circle}(t){2*cos(t)}{2*sin(t)}{1.5}
\psSolid[object=courbe,r=0,function=Circle,range=-0.75 2,linecolor=red,
linewidth=1.5pt,action=draw]
\defFunction[algebraic]{Circle}(t){2*cos(t)}{2*sin(t)}{0}
\psSolid[object=courbe,r=0,function=Circle,range=-0.75 2,linecolor=red,
linewidth=1.5pt,action=draw]
\end{pspicture}
\end{document}