1

I need to make this draw using pstricks:

enter image description here

So far I managed to draw this little part

    \begin{center}
\begin{pspicture}
\psline[linestyle=dotted](-2,2)(1,4)
\psline[linestyle=dotted](1,4)(11,4)
\psline[linestyle=dotted](-2,2)(8,2)
\psline[linestyle=dotted](8,2)(11,4)
\psline[linecolor=blue](-0.5, 3)(9.5, 3)
\psdot*(4, 3)
\uput[d](4, 3){K}
\psdot*(1.2, 3)
\uput[u](1.2, 3){S}
\psdot*(9.3, 3)
\uput[d](9.3, 3){S'}
\psline[linestyle=dotted, linecolor=red](4, 5)(4, 3)
\psdot*(4,5)
\uput[u](4, 5){P}
\uput[r](4, 4){h}
\end{pspicture}
\end{center}

Which only produces a small part of the draw (that is the plane and few things).

The real problem is: how do I draw the three curves? It has to appear like a spherical mirror in perspective. I just need the three curves, the other things I can add!

Thank you so much!

2

With TikZ it is rather easy to draw such a diagram. (This is not to say that it is hard with PSTricks, I just happen to have forgotten the PSTricks syntax almost completely.)

\documentclass[tikz,border=3mm]{standalone}
\usepackage{tikz-3dplot}
\usetikzlibrary{intersections}
\begin{document}
\tdplotsetmaincoords{70}{12}
\begin{tikzpicture}[tdplot_main_coords,line join=round,
    bullet/.style={circle,inner sep=1.5pt,fill},
    declare function={a=5;h=3;}]
 \draw (-a,-h,0) -- (a,-h,0) -- (a,h,0) -- (-a,h,0) -- cycle;
 \edef\pftnum{0}
 \edef\tmpymax{0pt}
 \edef\tmpymin{0pt}
 \loop
  \ifnum\pftnum<360
  \edef\pftnum{\the\numexpr\pftnum+1}
  \path (0,{cos(\pftnum)},{sin(\pftnum)});
  \pgfgetlastxy{\tmpx}{\tmpy}
  \ifdim\tmpy<\tmpymin
   \edef\tmpymin{\tmpy}
   \edef\alphamin{\pftnum}
  \fi
  \ifdim\tmpy>\tmpymax
   \edef\tmpymax{\tmpy}
   \edef\alphamax{\pftnum}
  \fi
 \repeat
 \draw[left color=gray!20,right color=gray,name path=outer lens]        
  plot[variable=\t,domain=\alphamax:\alphamin,smooth]
     (0,{h*cos(\t)},{h*sin(\t)}) 
  to[out=180,in=180,looseness=0.7] 
     (0,{h*cos(\alphamax)},{h*sin(\alphamax)});
 \draw[inner color=white,outer color=gray!50] plot[variable=\t,domain=0:360,smooth cycle]
     (0,{h*cos(\t)},{h*sin(\t)});
 \draw (-a,-h,0) -- (a,-h,0);    
 \path[name path=hori] (-a,0,0) -- (a,0,0);
 \draw[name intersections={of=outer lens and hori}] 
 (intersection-2) -- (-a,0,0) node[pos=0.7,bullet,label=below:$S$] (S){}
 (intersection-1) -- (a,0,0) node[pos=0.9,bullet,label=below:$S'$] (S'){};
 \draw[dashed] (0,-h,0) node[bullet,label=below right:$B$] (B){}
  -- (0,h,0) node[bullet,label=below right:$B'$] (B'){}
  (0,0,0) node[bullet,label=below:$K$] (K){}
  -- (0,0,h) node[bullet,label=above:$P$] (P){} node[pos=0.5,right]{$h$}; 
\end{tikzpicture}
\end{document}

enter image description here

| improve this answer | |
  • Oh my god! It's amazing! Thank you infinitely much! – Henry Mar 1 at 18:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.