TransWikia.com

Drawing a conical mirror in pst-optexp

TeX - LaTeX Asked by ManuelP on June 13, 2021

I need to draw an optical system which contains a conical mirror, which in the 2D projection is just a triangle or angled mirror. I would like to implement the drawing in pst-optexp. However, I don’t see an option to have a polygon mirror, just flat, curved and parabolic ones. Of course I could just put two connected mirrors, but depending on the connection angle the graphical representation wouldn’t be nice (extending line edges for acute angles). I’m new to pst-optexp, and maybe I have overseen the corresponding command.

The sketch below should illustrate the setup. I have two mirrors in my setup (in Green). The lower one is just a flat one, the upper one an angled one, which should reflect the light into two directions. In 3D this corresponds to a cone mirror as illustrated in the picture at the end.

Setup with two mirrors

Picture of cone mirror

One Answer

There is no ready-to-use component for your task, but you can quite easily define your own component.

pst-optexp offers plain, curved and path interfaces (see e.g. https://tex.stackexchange.com/a/209818/33933 for an advanced example).

Here are the main steps

  1. Define a new component with newOptexpDipole{conicalmirror}. You could also use newOptxpTripole. The differences in your case would only be that you need two or three nodes for positioning.

  2. Define the actual appearance of the component with defconicalmirror@comp

  3. Define the optical interfaces inside conicalmirror@nodes using newOptexpComp. Here, we use a PathIfc, which takes a previously defined, arbitrary path as interface using pst-intersect.

The full drawing:

documentclass[margin=5pt]{standalone}
usepackage[dvipsnames,svgnames,pdf]{pstricks}
usepackage{auto-pst-pdf}
usepackage{pst-optexp}
SpecialCoor
makeatletter
% Define a custom dipole command
newOptexpDipole{conicalmirror}
%
% Define how the dipole component is drawn
defconicalmirror@comp{%
  pspolygon[fillstyle=solid,fillcolor=gray,linestyle=none](1,-1)(0,0)(1,1)(2,1)(2,-1)
  pspolygon[fillstyle=solid,fillcolor=green!50!black,linestyle=none]%
    (1,-1)(1.1,-0.9)(0.2,0)(1.1,0.9)(1,1)(0,0)
}
% Define the optical interfaces of the component
defconicalmirror@nodes{%
  % save the path, a triangle, which defines the optical interface
  pssavepath[linestyle=none]{oenode@Path{A}}{%
    psline(1,-1)(0,0)(1,1)}
  % define the optical interface for use to draw beams
  newOptexpComp{%
    {0 0} tx@IntersectDict /PIT@name{oenode@Path{A}} get 0 0 refl {PathIfc} 1
  }%
}%
makeatother
      
begin{document}
begin{pspicture}(10,6)
  pnode(0,1){Input}
  pnode(5,1){Mirror}
  pnode(5,4){ConicalMirror}
  pnode(2,4){End1}
  pnode(8,4){End2}
  begin{optexp}
    lens[lens=3 3 2, n=1.6, compname=Lens](Input)(Mirror)
    newpsstyle{ExtendedMirror}{fillstyle=solid, fillcolor=green!50!black}
    mirror[mirrorwidth=3, linestyle=none, mirrordepth=0.1414, mirrortype=extended, compname=Mirror](Input)(Mirror)(ConicalMirror)
    conicalmirror[position=end, compname=ConicalMirror](Mirror)(ConicalMirror)
    optplate[position=end, plateheight=3, platelinewidth=0.3, compshift=-0.5, compname=End1](ConicalMirror)(End1)
    optplate[position=end, plateheight=3, platelinewidth=0.3, compshift=0.5, compname=End2](ConicalMirror)(End2)
    %
    % First, only draw the filled beam, otherwise the fillings overlap with boundary beams
    newpsstyle{Beam}{fillstyle=solid, fillcolor=red!10, linestyle=none}
    drawwidebeam[beamdiv=20, beamangle=-10.01](Input){Lens}{Mirror}{ConicalMirror}{End1}
    drawwidebeam[beamdiv=20, beamangle=10.01](Input){Lens}{Mirror}{ConicalMirror}{End2}
    %
    % now draw the boundary beams
    newpsstyle{Beam}{linecolor=red, linewidth=0.5pslinewidth}
    drawbeam[beamangle=20](Input){Lens}{Mirror}{ConicalMirror}{End2}
    drawbeam[beamangle=0.01](Input){Lens}{Mirror}{ConicalMirror}{End2}
    drawbeam[beamangle=-0.01](Input){Lens}{Mirror}{ConicalMirror}{End1}
    drawbeam[beamangle=-20](Input){Lens}{Mirror}{ConicalMirror}{End1}
  end{optexp}
end{pspicture}
end{document}

enter image description here

Answered by Christoph on June 13, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP