我需要使用 pstricks 进行绘制:
到目前为止,我成功地画出了这小部分
\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}
这只会产生一小部分拉力(即飞机和一些其他的东西)。
真正的问题是:我该如何绘制这三条曲线?从透视上看,它必须看起来像球面镜。我只需要这三条曲线,其他东西我可以添加!
太感谢了!
答案1
含钛钾Z 绘制这样的图表相当容易。(这并不是说使用 PSTricks 很难,我只是碰巧几乎完全忘记了 PSTricks 语法。)
\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}