[pstricks] pst-optexp: Custom component with multiple, reflections?

Lars O. Grobe grobe at gmx.net
Sun Jul 3 21:47:18 CEST 2016


Hi Christoph,

below is a minimal example, showing that only the first intersection is 
effective. An PDF showing the result is here:

https://www.dropbox.com/s/8iooq6dw7rva1qe/simpleBlinds.pdf?dl=0

The ray is both passing the first object at its second intersection, and 
the second object.

Cheers, Lars.

--

\documentclass[]{standalone}

\usepackage[]{pstricks}
\usepackage{auto-pst-pdf}
\usepackage{pst-optexp}

\begin{document}
\begin{pspicture}(0,0)(240,100)%

\makeatletter
\newOptexpTripole{blinds}
\def\blinds at nodes{%
\pssavepath[linestyle=none,arrow=-,ArrowInside=-]{\oenode at Path{A}}{%
\moveto(0.26209376,17.62960472)
\curveto(40.589716,-7.19319528)(76.112661,-3.18799528)(108.83352,17.62960472)
}%end \pssavepath
\newOptexpComp{%
{0 0} tx at IntersectDict /\PIT at name{\oenode at Path{A}} get 0 0 refl 
{PathIfc} 1 }%
}%end \def\blinds at nodes
\def\blinds at comp{%
   \pstracecurve{\oenode at Path{A}}
}%end \def\blinds at comp

\makeatother
\optplane(80,80)
\pnodes(-40,40){A}(160,40){B}
\blinds(0,2)(1,2)(2,2){}
\blinds(0,2)(1,25)(2,2){}
\addtopsstyle{Beam}{beamalign=abs, arrows=->, arrowscale=10, 
fillstyle=solid, linecolor=red}
\multido{\r=+2}{20}{%
\psset[optexp]{raytrace=true}
\drawbeam[beamangle=-45, beampos=\r](A){}(B)
}%end multido

\end{pspicture}
\end{document}

--

> could you send the code you have so far? I don't understand in detail  > how your setup looks like. Do you possibly also have a ready > 
scan/picture which shows a similar setup?



More information about the PSTricks mailing list