为什么我的光束没有从镜子向下游传播?

为什么我的光束没有从镜子向下游传播?
\documentclass[pstricks,margin=12pt]{standalone} 
\usepackage{pst-optexp}
\usepackage{pst-node}
\usepackage{pstricks-add}
\psset{useNA=false}
\psset{pswarning}
\begin{document}
\begin{pspicture}[showgrid=true](10,10)
\pnodes(1.5,7){A}
\pnodes(5,7){B}
\pnodes(8,7){C}
\pnodes(8,3){D}
\addtopsstyle{Beam}{fillstyle=solid, fillcolor=red!50!white, opacity=0.3, linestyle=none}
\psset{mirrortype=extended, mirrordepth=0.2}
\psset{mirrorwidth=1.1}
\psset{loadbeampoints}
\psset{savebeampoints=true, loadbeampoints}

\begin{optexp}
\optsource[innerlabel, compname = start](A)(B){Beam}
\lens[compname=L1](A)(B){$L_1$}

%\drawwidebeam[beamwidth=0.4, stopinside]{1-3}
\lens[compname=L2](B)(C){$L_2$}

\mirror[labelangle=-45, compname=M1](B)(C)(D){M}

\optbox[innerlabel, compname= D1](D)(D){Dump}
%\drawwidebeam[beamwidth=0.5](S){}(D)
%\addtopsstyle{Beam}{fillstyle=solid, fillcolor=red!50!white, %opacity=0.3, linestyle=none}
%\drawwidebeam[beamwidth=0.4, beaminsidelast](S){L1}{L2}

\end{optexp}
\drawwidebeam[beamwidth=0.4, stopinside]{1-5}
%\drawwidebeam[beamwidth=0.4,  beamdiv=-20]{2-3}
%\drawwidebeam[loadbeampoints]{M1}{D1}
%\drawwidebeam[loadbeampoints, beamdiv=-20, stopinside]{2-3}
%\drawwidebeam[loadbeampoints, stopinside]{3-5}
%\drawwidebeam[beamwidth=0.5]{4-5}
\end{pspicture}
\end{document}

我无法将光束传播至下游。在此处输入图片描述

答案1

光束错过了 optbox dump,因为它绘制的方向错误。您使用同一个节点作为起始节点和终止节点,在这种情况下,框是水平方向的,因为我们没有定义框的对齐方向。

如果你向 optbox 添加一个参数showifcnodes,你会看到光学接口的位置:

\optbox[innerlabel, compname= D1, showifcnodes](D)(D){Dump}

在此处输入图片描述

例如用作C其他参考点:

\documentclass[pstricks,margin=12pt]{standalone} 
\usepackage{pst-optexp}
\psset{useNA=false, pswarning}
\begin{document}
\begin{pspicture}[showgrid=true](0,2)(9,8)
\pnodes(1.5,7){A}
\pnodes(5,7){B}
\pnodes(8,7){C}
\pnodes(8,3){D}
\addtopsstyle{Beam}{fillstyle=solid, fillcolor=red!50!white, opacity=0.3, linestyle=none}
\psset{mirrortype=extended, mirrordepth=0.2, mirrorwidth=1.1}
\psset{savebeampoints, loadbeampoints}
\begin{optexp}
  \optsource[innerlabel, compname = start](A)(B){Beam}
  \lens[compname=L1](A)(B){$L_1$}
  \lens[compname=L2, n=1.33](B)(C){$L_2$}
  \mirror[labelangle=-45, compname=M1](B)(C)(D){M}
  \optbox[innerlabel, compname= D1, endbox](C)(D){Dump}
  \drawwidebeam[beamwidth=0.4, stopinside]{1-5}
\end{optexp}
\end{pspicture}
\end{document}

在这里,我还稍微调整了参数nL2获得合理的光束直径dump

在此处输入图片描述

相关内容