I'm apparently missing something fundamental in how beams interact with interfaces. I have prepared three simple examples, with the hopes that someone can explain to me why certain things happen.
Example 1
This much makes sense. I have an incoming beam at normal incidence on a mirror, and the drawbeam
statement is specified in the form (node){component}(node)
. The beam reflects back, just like you would expect it to.
\documentclass[pstricks]{standalone}
\usepackage{pst-optexp}
\begin{document}
\begin{pspicture}(-1.5,-1.5)(1.5,1.5)
\pnode(-1,0){in}
\pnode(0,0){mir}
\pnode(1,0){out}
\pnode(-1,-1){low}
\pnode(-1,1){high}
\mirror(low)(mir)(high)
\drawbeam[linecolor=red,arrows=->](in){1}(in)
% \drawbeam[linecolor=blue,arrows=->](low){1}(high)
\end{pspicture}
\end{document}
If I replace the drawbeam
statement with (in){1}(out)
the beam stops at the mirror (doesn't reflect and doesn't pass through). This makes sense, a beam shouldn't pass through a mirror that isn't transmissive (ideally, of course).
Example 2
This case is pretty similar to the last one, the only difference is that the incoming beam is at an angle. Again, if the drawbeam
statement is (low)(mir)(high)
the beam stops at the mirror, but reflects if the statement is (low){1}(high)
.
\documentclass[pstricks]{standalone}
\usepackage{pst-optexp}
\begin{document}
\begin{pspicture}(-1.5,-1.5)(1.5,1.5)
\pnode(-1,0){in}
\pnode(0,0){mir}
\pnode(1,0){out}
\pnode(-1,-1){low}
\pnode(-1,1){high}
\mirror(low)(mir)(high)
% \drawbeam[linecolor=red,arrows=->](in){1}(in)
\drawbeam[linecolor=blue,arrows=->](low){1}(high)
\end{pspicture}
\end{document}
Example 3
Here's something that just baffles me. Individually, the beams in examples 1 and 2 draw just fine when specified as (node){component}(node)
. When I draw them together, however, only the red arrow shows up (the picture is identical to the first picture in example 1). Why can't I have both beams drawn as specified below?
\documentclass[pstricks]{standalone}
\usepackage{pst-optexp}
\begin{document}
\begin{pspicture}(-1.5,-1.5)(1.5,1.5)
\pnode(-1,0){in}
\pnode(0,0){mir}
\pnode(1,0){out}
\pnode(-1,-1){low}
\pnode(-1,1){high}
\mirror(low)(mir)(high)
\drawbeam[linecolor=red,arrows=->](in){1}(in)
\drawbeam[linecolor=blue,arrows=->](low){1}(high)
\end{pspicture}
\end{document}
Questions
- Why can't I specify the beam path as
(node)(node)(node)
rather than(node){component}(node)
? - Why can't I draw both of the beams in example 3?
My Setup
- OS X Yosemite
- Latest version of MacTex (updated a week ago)
- Edited in MacVim using latex-suite
- Compiled using
xelatex -interaction=nonstopmode
\psline
. The advantage of\drawbeam
is, that it knows which interface to use, if a component has more than one, and also if it is transmittive or reflective, or curved etc. The third example is a bug. Can investigate this only in a few days.