阴影区域和弯曲箭头

阴影区域和弯曲箭头

我画了一张图,将域中除 i 之外的所有内容发送到固定点 r,并将 i 发送到 2。但是,我无法制作弯曲的箭头以及阴影区域,如下面的附件所示。你能帮帮我吗?这是我的尝试:

\documentclass[10pt]{article}
\usepackage{geometry}% <-- added, 
\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage{mathrsfs}

\definecolor{uuuuuu}{rgb}{0.26666666666666666,0.26666666666666666,0.26666666666666666}

\tikzset{graph-1/.style = {
  >=stealth,
  x=0.37cm, y=0.37cm }
  }% end of tikzset


\begin{document}
\begin{figure}[ht]
\centering
\begin{tikzpicture}[graph-1]

 \foreach \x/\label in {0/\scriptstyle1}
  \node[fill=uuuuuu,inner sep=1.3pt,circle,label=above:{$\label$}, left=-1.7cm] at (\x,1.5) (t\x) {};

  \foreach \x/\label in {0/\scriptstyle1, 2/\scriptstyle2}
  \node[fill=uuuuuu,inner sep=1.3pt,circle,label=below:{$\label$},left=-1.7cm] at (\x,-1.5) (b\x) {};

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\foreach \x/\label in {8/\scriptstyle i}
  \node[fill=uuuuuu,inner sep=1.3pt,circle,label=above:{$\label$}] at (\x,1.5) (t\x) {};

  \foreach \x/\label in {10/\scriptstyle r}
  \node[fill=uuuuuu,inner sep=1.3pt,circle,label=below:{$\label$}] at (\x,-1.5) (b\x) {};

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    
    \foreach \x/\label in {16/\scriptstyle n}
  \node[fill=uuuuuu,inner sep=1.3pt,circle,label=above:{$\label$}, right=.0cm] at (\x,1.5) (t\x) {};

    \foreach \x/\label in {16/\scriptstyle n}
  \node[fill=uuuuuu,inner sep=1.3pt,circle,label=below:{$\label$},right=.0cm] at (\x,-1.5) (b\x) {};
  %********************************************
\path[draw,  dotted] (t8) edge (t16);
\path[draw,  dotted] (t0) edge (t8);
    %*****************************************
  \draw[uuuuuu,->] (t0) -- (b10);
  \draw[uuuuuu,->] (t8) -- (b2);
   \draw[uuuuuu,->] (t16) -- (b10);
   %******************************************
    \node[left] at (3,0) {$\sigma=$};
    \end{tikzpicture}
    \hfil

   \end{figure}
    \end{document}

在此处输入图片描述

答案1

在我的回答中,我只关注“在弯曲箭头之间填充”部分。您可以使用语法方便地绘制这样的箭头to[in=x,out=y],其中xy是撞击角和出射角。(此外,还有一个looseness参数,但这里可能不需要。)这允许您绘制箭头,并定义要填充的区域的边界路径。必须小心一点,因为节点是扩展对象。所以我添加了

\begin{scope}[on background layer]
    \path[fill=red!20]  (t0) to[out=-45,in=135] (b10.135)--(b10.45) to[out=45,in=-135] (t16) -- cycle;
\end{scope}

到需要backgrounds库的代码中,因为您可能希望在背景上填充。(b10.135)--(b10.45)位是因为b10节点是一个扩展对象。

在此处输入图片描述

这是完整的代码:

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{arrows,backgrounds}
\usepackage{mathrsfs}

\definecolor{uuuuuu}{rgb}{0.26666666666666666,0.26666666666666666,0.26666666666666666}

\tikzset{graph-1/.style = {
  >=stealth,
  x=0.37cm, y=0.37cm }
  }% end of tikzset


\begin{document}
\begin{tikzpicture}[graph-1]
\foreach \x/\label in {0/\scriptstyle1}
  \node[fill=uuuuuu,inner sep=1.3pt,circle,label=above:{$\label$}, left=-1.7cm] at (\x,1.5) (t\x) {};

\foreach \x/\label in {0/\scriptstyle1, 2/\scriptstyle2}
  \node[fill=uuuuuu,inner sep=1.3pt,circle,label=below:{$\label$},left=-1.7cm] at (\x,-1.5) (b\x) {};

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\foreach \x/\label in {8/\scriptstyle i}
  \node[fill=uuuuuu,inner sep=1.3pt,circle,label=above:{$\label$}] at (\x,1.5) (t\x) {};

  \foreach \x/\label in {10/\scriptstyle r}
  \node[fill=uuuuuu,inner sep=1.3pt,circle,label=below:{$\label$}] at (\x,-1.5) (b\x) {};

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    
    \foreach \x/\label in {16/\scriptstyle n}
  \node[fill=uuuuuu,inner sep=1.3pt,circle,label=above:{$\label$}, right=.0cm] at (\x,1.5) (t\x) {};

    \foreach \x/\label in {16/\scriptstyle n}
  \node[fill=uuuuuu,inner sep=1.3pt,circle,label=below:{$\label$},right=.0cm] at (\x,-1.5) (b\x) {};
%********************************************
\path[draw,  dotted] (t8) edge (t16);
\path[draw,  dotted] (t0) edge (t8);
%*****************************************
\draw[uuuuuu,->] (t0) to[out=-45,in=135] (b10);
\draw[uuuuuu,->] (t8) to[out=-90,in=90] (b2);
\draw[uuuuuu,->] (t16) to[out=-135,in=45] (b10);
\begin{scope}[on background layer]
\path[fill=red!20]  (t0) to[out=-45,in=135] (b10.135)--(b10.45) to[out=45,in=-135] (t16) -- cycle;
\end{scope}
%******************************************
\node[left] at (3,0) {$\sigma=$};
\end{tikzpicture}
\end{document}

相关内容