答案1
如果你发布你尝试过的内容,或者满足于一个包含较少文本的情节,这将有很大帮助。否则,你会让那些回答这个问题的人陷入很多麻烦。
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{backgrounds,intersections}
\begin{document}
\begin{tikzpicture}[nodes={text height=0.7em,text depth=0.25ex}]
\draw[name path=arc] (4,0) arc[start
angle=0,end angle=180,radius=2]
node[pos=0.1,above right]{$\alpha\, W(y)$};
\draw[name path=curve] (0,0) coordinate (O)to[out=-90,in=-135] (1,0) coordinate (x)
-- ++ (45:4) node[right] {$P(y)$};
\draw[name path=line] (0,2) coordinate (b)node[left]{$b$} -| (2,0) node[below] {$y^*$};
\draw[name intersections={of=curve and line,by=a}] (a) -- (O|-a)
node[left]{$a$};
\draw (0,4) node[above left] {$y$} |- (5,0) node[below left] {$x$};
\begin{scope}[on background layer]
\draw[name intersections={of=curve and arc,by={aux,i}}];
\clip (current bounding box.south west) rectangle (i|-b);
\fill[gray!20] (4,0) arc[start angle=0,end angle=180,radius=2]
to[out=-90,in=-135] (x) -- ++ (45:4);
\end{scope}
\end{tikzpicture}
\end{document}
像往常一样,有很多方法可以实现这一点。这是一种不使用库的方法。(是的,我认为这my arc/.style={insert path={...}}
比 稍好一些,\def\MyArc{...}
但只要这些\def
在里面,tikzpicture
它们就不会太糟糕。)
\documentclass[tikz,border=3mm]{standalone}
\begin{document}
\begin{tikzpicture}[nodes={text height=0.7em,text depth=0.25ex},
my arc/.style={insert path={(4,0) arc[start angle=0,end angle=180,radius=2]}},
my curve/.style={insert path={(0,0) to[out=-90,in=-135] (1,0) -- ++ (45:4)}}]
\begin{scope}
\clip[my curve] -| cycle;
\fill[gray!20,my arc] -- ++ (0,-1) -- ++ (4,0);
\end{scope}
\draw (0,4) node[above left] {$x$} |- (5,0) node[below left] {$y$};
\draw[my arc] node[pos=0.1,above right]{$\alpha\, W(y)$};
\draw[my curve] node[right] {$P(y)$};
\draw (0,2) node[left]{$b$} -| (2,0) node[below] {$y^*$}
(0,1) node[left]{$a$} -- (2,1) node[above left]{bla};
\end{tikzpicture}
\end{document}