我想绘制类似下面的图。
谢谢你!
对于第一次抽奖,我测试了以下代码:
\begin{tikzpicture}
% Origin
\coordinate (O) at (0,0);
% Point z0
\coordinate (z0) at (0,0);
\node at (z0) {$\bullet x_0$};
% Circle C0
\draw [name path=C0,pattern = crosshatch, pattern color = green ] (O) circle [radius=4];
\draw[red,looseness=1.5] (-6,0) to [out=-70,in=-110] (z0) to [out=75,in =110](6,0);
% Point z1
\coordinate (z1) at (-45:-2.5);
\fill[pattern = crosshatch] (z1) circle [radius = 0.5];
\node [] at (z1) {$\bullet x^\epsilon$};
%\node [below] at (z1) {$x_1$};
% Circle C1
\node [below right] at (-2,0.5) {$\bullet x$};\end{tikzpicture}
我还使用了另一个代码:
\begin{tikzpicture}\begin{scope}
\clip (0,0) circle (4cm);
\draw[pattern = crosshatch, pattern color = green]
(current bounding box.north west) --
(-4,-1)..controls(0.1,0.1)..(5,-1)
-- (current bounding box.north east) -- cycle;
\end{scope}
% Origin
\coordinate (O) at (0,0);
% Point z0
\coordinate (z0) at (0,-0.2);
\node at (z0) {$\bullet x_0$};
% Circle C0
\draw (O) circle [radius=4];
% Point z1
\coordinate (z1) at (-45:-2.5);
\fill[pattern = crosshatch] (z1) circle [radius = 0.5];
\node [] at (z1) {$\bullet x^\epsilon$};
% Circle C1
\node [below right] at (-2,0.5) {$\bullet x$};\end{tikzpicture}
我得到了以下图像,它看起来更符合我的要求:
对于第二张图像,我尝试了以下代码(使用@SebGlav 的答案):
\begin{tikzpicture}
\def\r{1} % Circle radius
\coordinate (x0) at (0,0); % Circle centre
\coordinate (p1) at (190:\r); % First point on the circle
\coordinate (p2) at (-10:\r); % Second point on the circle
% First fill the circle portion
\fill[pattern=north west lines,pattern color=olive] (p1) to[out=0,in=180] (x0) to[out=0,in=180] (p2) arc(-10:190:\r) -- cycle;
% Then draw the circle (with the label)
\draw[line width=1pt] (x0) circle(\r);
% Then draw the line crossing the circle
\draw[line width=1pt] (-2*\r,0.5*\r) to[out=-20,in=180] (p1) to[out=0,in=180] (x0) to[out=0,in=180] (p2) to[out=0,in=200] (2*\r,.3*\r);
% The two dots and their labels
\fill (x0) circle (2pt) node[below] {$x_0$};
%Domaine 1
\coordinate (c0) at (6, 0);
\coordinate (c1) at (7.5, 0);
\coordinate (c2) at (6.5, 1);
\coordinate (c3) at (5.8, 0.8);
\coordinate (c4) at (4.5, 0);
\coordinate (c5) at (5.9, -0.8);
\draw[black, thick] plot [smooth cycle] coordinates {(c1) (c2) (c3) (c4) (c5)};
\draw[black, thick] (4.0,0) --(8,0);
\fill [pattern=north west lines,pattern color=olive] plot [smooth cycle] coordinates {(c4) (c0) (c1) (c2) };
\fill (c0) circle (2pt) node[below] {$y_0$};
\draw[->,line width=1pt] (6,-1) to[out=-90,in=-60]++ (-6,-0.25) node [xshift=3cm, yshift=-2.0cm] {$\varphi^{-1}$};
\draw[<-,line width=1pt] (6,1.3) to[out=60,in=90]++ (-6,0.2) node [xshift=3cm, yshift=2.0cm] {$\varphi$};
\end{tikzpicture}
答案1
你走对了路。有很多方法可以实现这种绘图。我让你深入研究这个起点,在那里你可以找到一些解释。我没有使用任何花哨的工具,比如calc
或,intersections
而是使用了一些非常简单的东西。
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{patterns}
\begin{document}
\begin{tikzpicture}
\def\r{2} % Circle radius
\coordinate (x0) at (0,0); % Circle centre
\coordinate (p1) at (190:\r); % First point on the circle
\coordinate (p2) at (-10:\r); % Second point on the circle
% First fill the circle portion
\fill[pattern=north west lines,pattern color=olive] (p1) to[out=0,in=180] (x0) to[out=0,in=180] (p2) arc(-10:190:\r) -- cycle;
% Then draw the circle (with the label)
\draw[line width=1pt] (x0) circle(\r);
\node[below right] at (-45:\r) {$B\left(x^0,r\right)$};
% Then draw the line crossing the circle
\draw[line width=1pt] (-2*\r,0.5*\r) to[out=-20,in=180] (p1) to[out=0,in=180] (x0) to[out=0,in=180] (p2) to[out=0,in=200] (2*\r,.3*\r);
% This node is the dark circle in the patterned portion
\node[minimum size=0.4*\r cm,circle,fill=olive!50!black,opacity=0.7,label=above right:{$\varepsilon$}] (B) at (120:0.65*\r) {};
% The arrow and the label
\draw[<-,line width=1pt] (B) to[out=170,in=-90]++ (-0.5*\r,0.5*\r) node [above] {$B\left(x^\varepsilon,\varepsilon\right)$};
% The two dots and their labels
\fill (x0) circle (2pt) node[below] {$x^0$};
\fill (40:0.5*\r) circle (2pt) node[right] {$x$};
\end{tikzpicture}
\end{document}