2

I have this setup I made using pst-optexp. I want to add arrows to indicate the direction of the wide beams:

enter image description here

Code:

\documentclass[margin=0]{standalone}
\usepackage{pst-optexp}
\usepackage{newtxtext,newtxmath}
\usepackage{siunitx}
\newpsobject{flipmirror}{beamsplitter}{bsstyle=plate}
\newpsobject{ndfilter}{optdipole}{optdipolesize=0.5,allowbeaminside=false,
  optdipolecomp={%
    \psframe(-0.25,-0.25)(0.25,0.25)
    \rput(0,0){}%
}}
\begin{document}
\begin{pspicture}(10,5)
  \psset[optexp]{fiber=none,usefiberstyle}
  \newpsstyle{FilterStyle}{linecolor=green}
  \newpsstyle{Fiber}{linecolor=black}
  \newpsstyle{Beam}{linestyle=none,fillstyle=solid,fillcolor=green,opacity=1}
  \pnodes(2,4){Laser}(8,4){M1}(8,2){M2}(4,4){BP}(6,4){ND}(1,2){M3}(1,1){End}(4,2){FM}(9,2){OB}
  (4,1){SPEC}
  \optbox[optboxsize=2 1,innerlabel,position=start](Laser)(M1){\SI{532}{\nano\meter}}
  \ndfilter[compname=ND,labeloffset=0.5](BP)(M1){ND}
  \mirror[compname=M1,labeloffset=0.5,mirrortype=extended](ND)(M1)(M2){M}
  \beamsplitter[labelangle=-45,compname=M2,bsstyle=plate,labeloffset=0.5](M1)(M2)(OB){BS}
  \lens[n=2, lensradius=1 1,lensheight=1,compname=L](8,2)(10,2){O}
  \optfilter[filtertype=lowpass,filtersize=0.5,compname=SP,labeloffset=0.5,labelangle=-180](M2)(FM){LP}
  \flipmirror[labelangle=-45,compname=FM,labeloffset=0.5](M2)(FM)(SPEC){FM}
  \optbox[position=end,optboxsize=1 1,innerlabel](FM)(SPEC){SPEC}
  \mirror[compname=M3,labeloffset=0.5,mirrortype=extended](FM)(M3)(End){M}
  \optdetector[compname=APD,labelangle=180,dettype=diode](M3)(End){APD}
  \optplate(9,2)(10,2){S}
  \drawwidebeam[beamwidth=0.1] {1-5}{11}
  \drawwidebeam[beamwidth=0.1] {4}{6}
  \drawwidebeam[beamwidth=0.1,fillstyle=solid,fillcolor=red,opacity=1] {6-8}
  \drawwidebeam[beamwidth=0.1,fillstyle=solid,fillcolor=red,opacity=1] {7}{9}{10}
\end{pspicture}
\end{document}

Expected result:

enter image description here

How can I do that?

1 Answer 1

1

Wide beams don't support arrows. Basically, they are filled areas, and must also be able to handle curved edges.

In general, you would need to draw additional beams for the arrows.

In your case, this is not a problem, because all wide beams which should get an arrow can be replace with \drawbeam, which take the standard arrows parameter. Note, that I optimized the line joins with linejoin=2 and pushed all beam behind the components by wrapping the whole setup in an optexp environment

\documentclass[margin=0]{standalone}
\usepackage{pst-optexp}
\usepackage{newtxtext,newtxmath}
\usepackage{siunitx}
\newpsobject{flipmirror}{beamsplitter}{bsstyle=plate}
\newpsobject{ndfilter}{optdipole}{optdipolesize=0.5,allowbeaminside=false,
  optdipolecomp={%
    \psframe(-0.25,-0.25)(0.25,0.25)
    \rput(0,0){}%
}}
\begin{document}
\begin{pspicture}(10,5)
  \begin{optexp}
    \psset[optexp]{fiber=none,usefiberstyle}
    \newpsstyle{FilterStyle}{linecolor=green}
    \newpsstyle{Fiber}{linecolor=black}
    \pnodes(2,4){Laser}(8,4){M1}(8,2){M2}(4,4){BP}(6,4){ND}(1,2){M3}(1,1){End}(4,2){FM}(9,2){OB}
    (4,1){SPEC}
    \optbox[optboxsize=2 1,innerlabel,position=start](Laser)(M1){\SI{532}{\nano\meter}}
    \ndfilter[compname=ND,labeloffset=0.5](BP)(M1){ND}
    \mirror[compname=M1,labeloffset=0.5,mirrortype=extended](ND)(M1)(M2){M}
    \beamsplitter[labelangle=-45,compname=M2,bsstyle=plate,labeloffset=0.5](M1)(M2)(OB){BS}
    \lens[n=2, lensradius=1 1,lensheight=1,compname=L](8,2)(10,2){O}
    \optfilter[filtertype=lowpass,filtersize=0.5,compname=SP,labeloffset=0.5,labelangle=-180](M2)(FM){LP}
    \flipmirror[labelangle=-45,compname=FM,labeloffset=0.5](M2)(FM)(SPEC){FM}
    \optbox[position=end,optboxsize=1 1,innerlabel](FM)(SPEC){SPEC}
    \mirror[compname=M3,labeloffset=0.5,mirrortype=extended](FM)(M3)(End){M}
    \optdetector[compname=APD,labelangle=180,dettype=diode](M3)(End){APD}
    \optplate(9,2)(10,2){S}
    \newpsstyle{Beam}{beamwidth=0.1, linewidth=0.1, linejoin=2, fillcolor=green, fillstyle=solid, linecolor=green}
    \drawbeam[arrows=->]{1-2}
    \drawbeam[arrows=->]{2-4}
    \drawwidebeam[linestyle=none]{4}{5}{11}
    \drawbeam[arrows=->]{4}{6}
    \drawbeam[linecolor=red, arrows=->]{6-8}
    \drawbeam[linecolor=red, arrows=->]{7}{9}{10}
  \end{optexp}
\end{pspicture}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .