4

Is it possible to get each end of a convex lens to be flat, like this:

enter image description here

(I haven't been able to find anything regarding this in the manual.)

2 Answers 2

3
\documentclass{article}
\usepackage{pst-optic}
\newcommand\Lens[1][]{%
  \psclip{\psframe[linestyle=none](-1,-2.7)(1,2.7)}\rput(0,0){\lensSPH[#1]}\endpsclip}

\begin{document}

\begin{pspicture}[showgrid](-1,-3)(1,3)
\Lens[lensType=CVG,lensWidth=1,drawing=false,lensColor=BleuVerre]
\end{pspicture}

\end{document}

enter image description here

1
  • Perfect (as usual), Herbert! Jun 3, 2013 at 8:23
2

You can use a very small value for lensDepth in \lensSPH; in the following example I used two of these lenses; the one on the left has a rectangle superimposed just to compare it with a real flat figure:

\documentclass{article}
\usepackage{pst-optic}

\begin{document}

\begin{pspicture*}(-6,-3)(6,3)
\rput(0,0){\lensSPH[lensType=DVG,lensWidth=0.5,lensDepth=0.00001,AB=1,OA=-5,drawing=false,lensColor=BleuVerre
]}
\pspolygon[fillcolor=lightgray,opacity=0.2,fillstyle=solid,linecolor=blue](-0.25,-3)(0.25,-3)(0.25,3)(-0.25,3)
\rput(2,0){\lensSPH[lensType=DVG,lensWidth=0.5,lensDepth=0.00001,AB=1,OA=-5,drawing=false,lensColor=BleuVerre
]}
\end{pspicture*}

\end{document}

sample

2
  • This is not a convex lens but a 'flat' one; only the ends should be flat and the rest of the lens convex (like the one on this figure). Jun 3, 2013 at 5:43
  • @SvendTveskæg I put the picture into your question, to make it clearer what you mean by "end" :-) Jun 3, 2013 at 7:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .