我想绘制一种将 $\varphi:D\to D'$ 映射的图表。域 $D$ 和 $D'$ 应该看起来相当随意。我考虑用 tikz 来做,但我不知道如何为域的边界生成如此漂亮的曲线。
过了一会儿,我得到了这样的解决方案
\documentclass{article}
\usepackage{tikz}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}
\begin{document}
\begin{tikzpicture}
\draw plot [smooth cycle] coordinates {(5,0.25) (6,0.35) (6.5, 0.2) (7,0.5) (7,1.65) (6.5,2.75) (5.8,2.75) (5.3,1.45) (4.8,0.85) } node at (6,1.7) {$D'$};
\path[->] (3.1,1.7) edge [bend left] node[above] {$\varphi$} (5.0,1.7);
\draw plot [smooth cycle] coordinates {(1.0,.1)(1.5,.2)(2.8,.5)(2.9,1.5)(2.8,2.8)(1.4,2.5)(0.5,0.5)} node at (1.8,1.7) {$D$};
\end{tikzpicture}
\end{document}
答案1
没有 TikZ。形状与上面的草图不完全相同,但我认为这并不重要,不是吗?
\documentclass[pstricks]{standalone}
\usepackage{pst-node}
\begin{document}
\begin{pspicture}[showgrid=false](4,3)
\psccurve(.5,.1)(1.4,.5)(1,2)(.6,2.9)(.2,2.5)(.2,1)
\psccurve(2.7,.1)(3.8,.5)(3.5,1.5)(3.8,2.8)(2.6,2.5)(2.6,0.5)
\pnode(.8,1.5){D}
\rput[r](D){$D$}
\pnode(2.7,1.5){D'}
\rput[l](D'){$D'$}
\pcarc[arcangle=30,nodesep=.5]{->}(D)(D')
\naput{$\varphi$}
\end{pspicture}
\end{document}