summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pstricks-examples-en/33-03-17.ltx
blob: dc059b44bba47b43445a672e311e14337a13c161 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
%% 
%%  A DANTE-Edition example
%% 
%%  Example 33-03-17 on page 693.
%% 
%%  Copyright (C) 2011 Herbert Voss
%% 
%%  It may be distributed and/or modified under the conditions
%%  of the LaTeX Project Public License, either version 1.3
%%  of this license or (at your option) any later version.
%% 
%%  See http://www.latex-project.org/lppl.txt for details.
%% 
%% 
%% ==== 
% Show page(s) 1
%% 
\documentclass[]{article}
\pagestyle{empty}
\setlength\textwidth{375.57637pt}
\setlength\parindent{0pt}

\usepackage{pst-optic}

\begin{document}
\begin{pspicture}(-5,-3)(5,3)
  \pnode(-1,-2.5){A} \pnode(1,-2.5){B} \pnode(1,2.5){C} \pnode(-1,2.5){D}
  \uput[-135](A){A}  \uput[-45](B){B}  \uput[45](C){C}  \uput[135](D){D}
  \pspolygon[fillcolor=lightgray,fillstyle=solid,linecolor=blue](A)(B)(C)(D)
  \refractionRay(-3,-3)(-2,-2)(D)(A){1}{1.5}{END}%    1.
  \psset{linecolor=red,linewidth=2pt,arrowsize=5pt,arrows=->}
  \arrowLine(-3,-3)(END){2}  \ABinterCD(END)(END')(C)(B){Out}
  \arrowLine(END)(Out){1}    \refractionRay(END)(Out)(C)(B){1.5}{1}{Q}
  \arrowLine(Q)(Q'){1}       \psOutLine[length=2](Q)(Q'){End}
  \refractionRay(-3,0)(-2,0)(A)(D){1}{1.5}{END}%      2.
  \psset{linecolor=green,linewidth=2pt,arrowsize=5pt,arrows=->}
  \arrowLine(-3,0)(END){2}  \ABinterCD(END)(END')(C)(B){Out}
  \arrowLine(END)(Out){1}   \refractionRay(END)(Out)(C)(B){1.5}{1}{Q}
  \arrowLine(Q)(Q'){1}      \psOutLine[length=2](Q)(Q'){End}
  \refractionRay(-3,3)(-2,2)(D)(A){1}{1.5}{END}%      3.
  \psset{linecolor=blue,linewidth=2pt,arrowsize=5pt,arrows=->}
  \arrowLine(-3,3)(END){2}   \ABinterCD(END)(END')(C)(B){Out}
  \arrowLine(END)(Out){1}    \refractionRay(END)(Out)(C)(B){1.5}{1}{Q}
  \arrowLine(Q)(Q'){1}       \psOutLine[length=2](Q)(Q'){End}
\end{pspicture}
\end{document}