[pstricks] pst-optic \lens macro

roberto eduardo photon960 at gmail.com
Sat Aug 20 15:06:31 CEST 2011


Hi
I am working with pst-optic and do not understand the behavior of the
macro \ lens when I use the following code:

\lens[ lensType=CVG,  lensWidth= \pslinewidth,%
                               lensGlass=false,   lensHeight=11,%
                               lensColor=blue,   rayColor= black, %
                               focus = 2.5,       OA=-1.0, %
                               AB =3,             spotAi =270,%
                               spotBi =90,
                               xLeft = -3 , xRight =3, %
                               yBottom= -6 , yTop =6,%
 ]}

The ray tracing is wrong:

1) the ray through the focus object is refracted back
2) the ray that arrives at the lens parallel to the optical axis is
refracted twice: one parallel to the optical axis and another going
through the image focus (It is not drawing the extension of this ray
to the object).

Note that the distance lens-object  (|OA|) is smaller than the lens
focal length (|F|) obtaining, then, a virtual image.


If the object it is placed beyond the focus position (getting a real
image) everything goes as expected, here is a code I use

\lens[lensType=CVG,      lensWidth= \pslinewidth,%
                               lensGlass=false,   lensHeight=11,%
                               lensColor=blue,   rayColor= black, %
                               focus = 2.5,       OA=-8.0, %
                               AB =3,             spotAi =270,%
                               spotBi =90,
                               xLeft = -9 , xRight =8, %
                               yBottom= -6 , yTop =6,%
       ]}



I think the problem is when we work with virtual images


I am workin on linux (kubuntu 9.04) runing textlive 2007, but I
download from CTAn all the pst* packages and placed them in a
directory from my $HOME. I run latex from kile and it is the file
list:

*File List*
 article.cls    2005/09/16 v1.4f Standard LaTeX document class
 size10.clo    2005/09/16 v1.4f Standard LaTeX file (size option)
inputenc.sty    2006/05/05 v1.1b Input encoding file
  utf8x.def    2004/10/17 UCS: Input encoding UTF-8
    ucs.sty    2004/10/17 UCS: Unicode input support
uni-global.def    2004/10/17 UCS: Unicode global data
pst-optic.sty    2004/10/18 package wrapper for pst-optic.tex (hv)
pstricks.sty    2006/08/10 v0.32 LaTeX wrapper for `PSTricks' (RN,HV)
pstricks.tex    2011/06/07 v2.21 `PSTricks' (tvz)
pst-xkey.tex    2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
 xkeyval.sty    2006/11/18 v2.5f package option processing (HA)
 xkeyval.tex    2006/11/18 v2.5f key=value parser (HA)
pstricks.pro
 xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
  color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
  dvips.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
pst-optic.tex    2010/07/23 v1.01 `PST-optic' (ML,hv)
pstricks-add.sty    2010/02/11 v. 0.14 package wrapper for pstricks-add.tex (hv)
pst-plot.sty    2011/04/13 package wrapper for pst-plot.tex (hv)
pst-xkey.sty    2005/11/25 v1.6 package wrapper for pst-xkey.tex (HA)
 multido.sty    2004/05/17 package wrapper for PSTricks `multido.tex', (HV/RN)
pst-plot.tex    2010/07/23 1.01 `pst-plot' (tvz,hv)
pst-node.sty    2010/04/22 package wrapper for pst-node.tex
pst-node.tex    2010/07/23 1.01 `pst-node' (tvz)
pst-node.pro    2010/04/30 v. 1.12, PostScript prologue file (hv)
 pst-3d.sty    2009/07/28 package wrapper for pst-3d.tex (hv)
 pst-3d.tex    2010/07/23 v1.01 `PST-3d' (hv)
 pst-3d.pro    2010/01/01 v. 0.01, PostScript prologue file (hv)
pst-math.sty    2009/01/20 package wrapper for PSTricks pst-math.tex
pst-math.pro    2010/10/02 v. 0.61, PostScript prologue file (hv)
pstricks-add.tex    2011/08/03 v3.53 `PSTricks-add' (hv)
pstricks-add.pro    2009/03/17 v. 0.22, PostScript prologue file (hv)
 ucsencs.def    2003/11/29 Fixes to fontencodings LGR, T3


Am I doing something wrong or is there a bug in the macro \ lens?

How can I solve the ray tracing problem?
Thanks in advance.
--
Roberto



More information about the PSTricks mailing list