我想知道如何绘制虚线区域。我$\omega$
在$\Omega$
Paint 中执行了此操作,只是为了了解我想要什么。
\documentclass[border=1mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[>=latex]
\draw[line width=.2mm] plot [smooth cycle, tension=0.689] coordinates {(4.4,0.4) (5,0.2) (5.8,0.6) (6.4967,0.5682)(6.5829,1.0505)(6.0727,1.4115) (5.3159,1.4086) (4.6,1) };
\draw[dashed, line width=.1mm] plot [smooth, tension=0.689] coordinates {(4.5636,0.2557) (4.6681,0.3442) (5.1235,0.4202) (5.7775,0.7574) (6.4146,0.7126)(6.3628,1.0819) (5.7503,1.31) (5.0826,1.1309) (4.7885,1.163) };
\draw[line width=.1mm] plot [smooth, tension=0.7] coordinates {(4.5636,0.2557) (4.6757,0.0732) (5.2415,0.0722) (5.8312,0.4254) (6.6291,0.4289) (6.7452,1.1265) (5.9313,1.6297) (4.9457,1.5107) (4.7894,1.1646) };
\draw[line width=.1mm] (3.2025,0.4401) -- (4.9975,1.2894);
\draw [line width=.1mm] (3.2025,0.4401) node (v1) {} -- (4.8008,0.1935);
\fill (3.0007,0.4216) node {\scriptsize $x_0$};
\fill (5.4153,0.7335) node {\scriptsize $\omega$};
\fill (4.2693,0.512) node {\scriptsize $\Omega$};
\fill (6.9288,0.6113) node {\scriptsize $\Gamma_0$};
\draw (3.2025,0.4401) -- (7.4063,1.2568);
\draw [->] (6.7452,1.1265) -- (7.171,1.3892);
\fill (7.2619,1.4263) node {\tiny $\nu$};
\draw[->] (4.4023,0.6719) -- (3.8907,0.8296);
\fill (3.7709,0.8824) node {\tiny $\nu$};
\end{tikzpicture}
\end{document}
答案1
您可以使用填充区域\potato
的路径:\clip
\documentclass[tikz, margin=2mm]{standalone}
\def\potato{%
(4.4,0.4)
(5,0.2)
(5.8,0.6)
(6.4967,0.5682)
(6.5829,1.0505)
(6.0727,1.4115)
(5.3159,1.4086)
(4.6,1)}
\def\outerpath{%
(4.5636,0.2557)
(4.6757,0.0732)
(5.2415,0.0722)
(5.8312,0.4254)
(6.6291,0.4289)
(6.7452,1.1265)
(5.9313,1.6297)
(4.9457,1.5107)}
\def\innerpath{%
(4.7894,1.1646)
(5.0826,1.1309)
(5.7503,1.31)
(6.3628,1.0819)
(6.4146,0.7126)
(5.7775,0.7574)
(5.1235,0.4202)
(4.6681,0.3442)}
\begin{document}
\begin{tikzpicture}[>=latex]
\begin{scope}
\clip plot [smooth cycle, tension=0.69] coordinates {\potato};
\filldraw[very thin, green, draw=black, dashed] plot [smooth cycle, tension=0.7] coordinates {\outerpath\innerpath};
\end{scope}
\draw[thick] plot [smooth cycle, tension=0.69] coordinates {\potato};
\draw[thick] plot[smooth cycle, tension=0.69] coordinates {\potato};
\draw[thin] plot [smooth, tension=0.7] coordinates {\outerpath (4.7894,1.1646)};
\draw[line width=.1mm] (3.2025,0.4401) -- (4.9975,1.2894);
\draw [line width=.1mm] (3.2025,0.4401) node (v1) {} -- (4.8008,0.1935);
\fill (3.0007,0.4216) node {\scriptsize $x_0$};
\fill (5.4153,0.7335) node {\scriptsize $\omega$};
\fill (4.2693,0.512) node {\scriptsize $\Omega$};
\fill (6.9288,0.6113) node {\scriptsize $\Gamma_0$};
\draw (3.2025,0.4401) -- (7.4063,1.2568);
\draw [->] (6.7452,1.1265) -- (7.171,1.3892);
\fill (7.2619,1.4263) node {\tiny $\nu$};
\draw[->] (4.4023,0.6719) -- (3.8907,0.8296);
\fill (3.7709,0.8824) node {\tiny $\nu$};
\end{tikzpicture}
\end{document}