
객체 의 불투명도를 어떻게 pst-3dplot
투명하게 설정할 수 있습니까? opacity
or strokeopacity
옵션을 사용하면 작동하지 않는 예가 있습니다 . 다음과 유사한 이미지를 만들려고 합니다.
다음과 같이 구 내부를 더 자세히 보여주기를 희망합니다.
그러나 불투명한 표면을 통해 구의 상단 부분이 하단과 다르게 나타나도록 하거나 구를 투명하게 만들어 내부 선/태깅을 볼 수 없습니다.
다음은 제가 시도한 것입니다(TeXWorks에서 XeLatex+MakeIndex+BibTex로 컴파일).
\documentclass{article}
\usepackage{pst-3dplot}
\usepackage{caption}
\usepackage{subcaption}
\usepackage[nomessages]{fp}% http://ctan.org/pkg/fp
\def \planeLocRatio {.7}
\def \radius {1}
\def \cylLength {5}
\def \planeLen {5}
\FPeval{\theta}{pi/4}
\FPeval{\b}{radius*cos(theta)}
\FPeval{\a}{radius*sin(theta)}
\FPeval{\h}{radius-radius*cos(theta)}
\begin{document}
\begin{figure}[H]
\begin{center}
\begin{subfigure}[b]{0.3\textwidth}
\begin{pspicture}(-4,-2.25)(2,4.25)
%\psset{Alpha=45, Beta=0}
\pstThreeDCoor
\pstThreeDLine[linewidth=2pt,linecolor=blue,arrows=->] (0,0,0)(0,0,\b)
\pstThreeDLine[linewidth=2pt,linecolor=blue,arrows=->] (0,0,0)(0,\a,\b)
\pstThreeDLine[linewidth=2pt,linecolor=green] (0,0,\b)(0,\a,\b)
\pstThreeDLine[linewidth=2pt,linecolor=black] (0,\a,\b)(0,\radius,\radius)
\pstThreeDSphere[strokeopacity=0.1](0,0,0){\radius}
\pstThreeDSquare[fillcolor=blue,fillstyle=solid,opacity=0.9](-5,-5,\planeLocRatio)(0,10,0)(10,0,0)
%\pstThreeDSquare[fillcolor=blue,fillstyle=solid,opacity=0.5](- \planeLen /2,- \planeLen /2,\planeLocRatio)(0,\planeLen,0)(\planeLen,0,0)
\end{pspicture}
\caption{Sphere model}
\end{subfigure}%
\begin{subfigure}[b]{0.3\textwidth}
\begin{pspicture}(-4,-2.25)(2,4.25)
\psCylinder[RotX=-15,RotY=45](0,0,0){\radius}{\cylLength}
%\pstThreeDSquare[fillcolor=blue,fillstyle=solid,opacity=0.5](- \planeLen /2,- \planeLen /2,\planeLocRatio)(0,\planeLen,0)(\planeLen,0,0)
\end{pspicture}
\caption{Cylinder Model}
\end{subfigure}
\caption{Sphere and cylinder particle models at the interface.}
\end{center}
\end{figure}
\end{document}
현재 이것을 출력합니다 :
--
업데이트: Herbert의 답변은 훌륭했고 이 그림에 대한 많은 주요 요점을 얻었지만 패키지가 은선을 수행하지 않는다는 그의 답변으로 인해 기어를 전환하려고 합니다. 또한 윗면을 아랫면과 다른 색상으로 하고 교차 부분도 다른 색상으로 하고 싶습니다.
따라서 현재 제가 가지고 있는 것은 다음과 같습니다. 여기에는 이 문제에 대한 향후 관심 사항에 대해 다른 질문을 하거나 여기에서 업데이트할 다른 문제가 있습니다.
\documentclass{article}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{pst-solides3d}
\usepackage{fp}
\pagestyle{empty}
\def \planeLocRatio {.7} % ratio of z location of plane and radius
\def \radius {0.5}
\def \planeLen {1} % half of one side of the plane
\FPeval{\contAng}{pi/4} % angle from z axis to intersection of plane at sphere edge
\FPeval{\a}{radius*cos(contAng)} % z location at plane intersection
\FPeval{\a2}{a/2}
\FPeval{\b}{radius*sin(contAng)} % radius of circle at plane intersection
\FPeval{\b2}{b/2}
\FPeval{\h}{radius-radius*cos(contAng)} % z distance from top of sphere to plane
\FPeval{\h2}{h/2}
\FPeval{\imgsize}{planeLen+1} % maybe increasing this helps /hbox errors?
\begin{document}
\begin{center}
\begin{pspicture}[solidmemory](-\imgsize,-\imgsize)(\imgsize,\imgsize)
% ================== VIEW ===================
\psset{
viewpoint=10 45 20 rtp2xyz,
lightsrc=viewpoint,
%lightintensity=1.25
}
% ================== POINTS ==================
% origin
\psSolid[object=point,args=0 0 0, name=O, text=O, pos=br]
\psSolid[object=point,args=0 0 \a, name=A, text=A, pos=uc]
%%%%%%% Causes hbox problems
%\psSolid[object=point,args=0 \b \a, name=B, text=B, pos=uc]
% ================== LINES ==================
% origin to center of circle at plane intersection
\psSolid[object=line,linecolor=black!50,linewidth=2pt,args=O A, name=OA]
% label the equation to the side of the line midway through the line
%\psProjection[object=point,definition=milieu,args=O A,text=$Rcos \theta$,pos=uc]
% line from origin to side of sphere intersected with plane
%\psSolid[object=line,linecolor=black!50,linewidth=2pt,args=O B, name=OB]
%\psProjection[object=point,definition=milieu,args=O B,text=$Rsin \theta$,pos=uc]
% line from A to B
%\psSolid[object=line,linecolor=black!50,linewidth=2pt,args=A B, name=AB]
% ================== SPHERE ==================
\psSolid[
object=sphere,
name=mySphere,
r=\radius,
ngrid=30 30, % number of grid lines across 2 dimensions r
grid=false, % remove line edges
hue=0 0.5,
opacity=0.4,
hollow=true,
intersectiontype=0,
intersectionplan=0 0 1 \a,
intersectioncolor=(bleu)
](0,0,0)
% ================== PLANE ==================
\psSolid[
object=plan,
name=myPlane,
definition=solidface,
args=mySphere 1,
base=-1 1 -1 1,
action=draw,
](A,,)
\end{pspicture}
\end{center}
\end{document}
현재 출력되는 내용은 다음과 같습니다.
답변1
현재 버전의http://texnik.dante.de/tex/generic/pst-3dplot/pst-3dplot.texopacity
다음과 같은 가치를 strokeopacity
고려합니다.
\begin{pspicture}(-4,-2.25)(2,4.25)
\psset{Alpha=45, Beta=10}
\pstThreeDCoor
\pstThreeDLine[linewidth=2pt,linecolor=blue,arrows=->] (0,0,0)(0,0,\b)
\pstThreeDLine[linewidth=2pt,linecolor=blue,arrows=->] (0,0,0)(0,\a,\b)
\pstThreeDLine[linewidth=2pt,linecolor=green] (0,0,\b)(0,\a,\b)
\pstThreeDLine[linewidth=2pt,linecolor=black] (0,\a,\b)(0,\radius,\radius)
\pstThreeDSquare[fillcolor=blue!40,fillstyle=solid,opacity=0.4](-5,-5,\planeLocRatio)(0,10,0)(10,0,0)
\pstThreeDSphere[opacity=0.3,strokeopacity=0.3,linewidth=0.1pt](0,0,0){\radius}
\end{pspicture}
그러나 은선과 표면을 원하면 `pst-solides3d?'를 사용하십시오. 대신에.