使用乳胶绘制极地区域和阴影区域

使用乳胶绘制极地区域和阴影区域

在此处输入图片描述我想绘制附图并将其插入到 latex 文档中。我想知道是否有人可以帮助我?极地

答案1

\documentclass[tikz,border=3.14mm]{standalone}    
\makeatletter % https://tex.stackexchange.com/a/127045/121799
\tikzset{use path/.code=\tikz@addmode{\pgfsyssoftpath@setcurrentpath#1}}
\makeatother

\usetikzlibrary{patterns,intersections,backgrounds}
\begin{document}
\begin{tikzpicture}
\draw[latex-latex] (0,5) node[left]{$y$} -- (0,0) coordinate(O) -- (8,0) node[below]{$x$};
\draw[save path=\pathA,name path=A](0,0) -- (50:4) coordinate[label=above:$A$](A) 
to[out=50,in=130] ++(0.7,-0.5) coordinate (aux)
to[out=-50,in=90] ++(0.7,-0.5) coordinate[label=right:$B$] (B)
--cycle;
\begin{scope}
\clip [use path=\pathA];
\fill[pattern=north east lines] ([yshift=5pt]A) rectangle (B|-O);
\end{scope}
\draw[dashed] (A) -- (A-|O) coordinate[label=left:$E$] (E)
(B) -- (B|-O) coordinate[label=below:$C$] (C);
\draw[name path=BF,dashed] (B) -- (B-|O) coordinate[label=left:$F$] (F);
\draw[name path=AD,dashed](A) -- (A|-O) coordinate[label=below:$D$] (D);
\fill[name intersections={of=A and BF,by=H}] (H) coordinate[label=above left:$H$]
circle(1pt);
\fill[name intersections={of=A and AD,by={dummy,J}}] (J) coordinate[label=below right:$J$]
circle(1pt);
\fill (F-|D) coordinate[label=below left:$G$] (G) circle (1pt);
\draw[latex-] (aux) to[out=50,in=180] ++(0.5,0.5) node[right]{$r=f(\theta)$};
\begin{scope}[on background layer]
\clip (O) -- (B) -- ++(0,3cm) -| cycle;
\fill[pattern=north west lines,pattern color=red] [use path=\pathA];
\end{scope}
\begin{scope}[on background layer]
\clip (F) -- (B) |- ([yshift=1cm]E) -- cycle;
\fill[pattern=vertical lines,pattern color=blue] [use path=\pathA];
\end{scope}
\end{tikzpicture}

\begin{tikzpicture}
\draw[latex-latex] (0,5) node[left]{$y$} -- (0,0) coordinate(O) -- (8,0) node[below]{$x$};
\draw[save path=\pathA,name path=A](0,0) -- (50:4) coordinate[label=above:$A$](A) 
to[out=50,in=130] ++(0.7,-0.5) coordinate (aux)
to[out=-50,in=90] ++(0.7,-0.5) coordinate[label=right:$B$] (B)
-- (B|-O)
--cycle;
\begin{scope}
\clip [use path=\pathA];
\fill[pattern=north east lines] ([yshift=5pt]A) rectangle (B|-O);
\end{scope}
\draw[dashed] (A) -- (A-|O) coordinate[label=left:$E$] (E)
(B) -- (B|-O) coordinate[label=below:$C$] (C);
\draw[name path=BF,dashed] (B) -- (B-|O) coordinate[label=left:$F$] (F);
\draw[name path=AD,dashed](A) -- (A|-O) coordinate[label=below:$D$] (D);
\fill[name intersections={of=A and BF,by=H}] (H) coordinate[label=above left:$H$]
circle(1pt);
\draw[name path=BO] (B) -- (O);
\fill[name intersections={of=BO and AD,by={G}}] (G) coordinate[label=below left:$G$]
circle(1pt);
\draw[latex-] (aux) to[out=50,in=180] ++(0.5,0.5) node[right]{$r=f(\theta)$};
\begin{scope}[on background layer]
\clip (O) -- (B) -- ++(0,3cm) -| cycle;
\fill[red,opacity=0.3] [use path=\pathA];
\end{scope}
\begin{scope}[on background layer]
\clip (F) -- (B) |- ([yshift=1cm]E) -- cycle;
\fill[blue,opacity=0.3] [use path=\pathA];
\end{scope}
\end{tikzpicture}

\begin{tikzpicture}
\draw[latex-latex] (0,5) node[left]{$y$} -- (0,0) coordinate(O) -- (8,0) node[below]{$x$};
\draw[save path=\pathA,name path=A](0,0) -- (50:4) coordinate[label=above:$A$](A) 
to[out=50,in=130] ++(0.7,-0.5) coordinate (aux)
to[out=-50,in=90] ++(0.7,-0.5) coordinate[label=right:$B$] (B)
-- (B|-O)
--cycle;
\draw[dashed] (A) -- (A-|O) coordinate[label=left:$E$] (E)
(B) -- (B|-O) coordinate[label=below:$C$] (C);
\draw[name path=BF,dashed] (B) -- (B-|O) coordinate[label=left:$F$] (F);
\draw[name path=AD,dashed](A) -- (A|-O) coordinate[label=below:$D$] (D);
\fill[name intersections={of=A and BF,by=H}] (H) coordinate[label=above left:$H$]
circle(1pt);
\draw[name path=BO] (B) -- (O);
\fill[name intersections={of=BO and AD,by={G}}] (G) coordinate[label=below left:$G$]
circle(1pt);
\draw[latex-] (aux) to[out=50,in=180] ++(0.5,0.5) node[right]{$r=f(\theta)$};
%
\path (O-|H) coordinate[label=below:$M$](M) 
(A-|H) coordinate[label=above:$N$](N);
\draw[dashed] (N) -- (M);
\begin{scope}[on background layer]
\fill[red,opacity=0.3] (E) -- (A) to[out=50,in=130]  (aux)
to[out=-50,in=90] (B) -- (F) -- cycle;
\end{scope}
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容