![PSTricks(3D)中的交叉线不正确并警告“忽略透明度”](https://linux22.com/image/452641/PSTricks%EF%BC%883D%EF%BC%89%E4%B8%AD%E7%9A%84%E4%BA%A4%E5%8F%89%E7%BA%BF%E4%B8%8D%E6%AD%A3%E7%A1%AE%E5%B9%B6%E8%AD%A6%E5%91%8A%E2%80%9C%E5%BF%BD%E7%95%A5%E9%80%8F%E6%98%8E%E5%BA%A6%E2%80%9D.png)
请查看以下用 Plain XeTeX(或 Plain LuaTeX)编译的 MWE:
\ifdefined\directlua \input luaotfload.sty \fi
\input pst-solides3d.tex
\psset{unit=1cm}
\psset{viewpoint=50 30 30 rtp2xyz,Decran=50}
\psset{lightsrc=viewpoint}
\pspicture[solidmemory](-7,-8)(7,8)
\defFunction[algebraic]{plane2}(u,v){0}{u}{v}%
\defFunction[algebraic]{hyperboloid}(u,v){(1+u^2)^0.5*cos(v)}{(1+u^2)^0.5 * sin(v)}{u}%
\psSolid[object=surfaceparametree, linecolor=blue, base=-3 3 0 6.28,
fillcolor=cyan,incolor=green, function=hyperboloid, ngrid=100 100,
action=none,name=hyper1]
\psSolid[object=surfaceparametree, linecolor=blue, base=Pi neg Pi -3 3, fillcolor=red,
function=plane2,ngrid=.2 .2,action=none,name=firstplane]
\psSolid[object=fusion,base=hyper1 firstplane,grid]
\endpspicture
\bye
- 平面与双曲面的交线不好看(不平滑)。这是怎么回事?
- 当我尝试获取透明对象时,我收到一条警告:“忽略透明操作 - 需要使用 -dNOSAFER”。使用 MikTeX 21 时,透明度可以正常工作,但更新到 MikTeX 22 后出现警告。如何解决此问题?
- 当我使用 Plain LuaTeX(和 luapstricks)编译它时,我还会收到一条警告“由于未加载‘pdfmanagement-testphase’,扩展图形状态修改被丢弃。”那是什么?
编辑:在 user187802 的帮助下,我启用了透明度。但是,尽管我已使用网格选项将其停用,但网格仍然出现(并且不透明)。我该如何修复?
看:
\input pst-solides3d.tex
\psset{unit=1cm}
\psset{viewpoint=50 30 30 rtp2xyz,Decran=50,lightintensity=1.2, opacity=.6}
\psset{lightsrc=viewpoint}
\pspicture[solidmemory](-7,-8)(7,8)
\defFunction[algebraic]{plane2}(u,v){0}{u}{v}%
\defFunction[algebraic]{hyperboloid}(u,v){(1+u^2)^0.5*cos(v)}{(1+u^2)^0.5 * sin(v)}{u}%
\psSolid[object=surfaceparametree, base=-3 3 0 6.28,
fillcolor=cyan, incolor=cyan, function=hyperboloid, ngrid=60 60,
action=none,name=hyper1]
\psSolid[object=surfaceparametree, base=Pi neg Pi -3 3, fillcolor=red,
function=plane2, action=none,name=firstplane, ngrid= 60 60]
\psSolid[object=fusion,base=hyper1 firstplane,grid]
\endpspicture
\bye
答案1
使用
\psSolid[object=surfaceparametree, linecolor=blue,
base=Pi neg Pi -3 3, fillcolor=red,
function=plane2,ngrid=0.05 0.05,action=none,name=firstplane]
另请参阅-dNOSAFER
https://tug.org/pipermail/tex-live/2021-March/046599.html
透明度也一样: