偶极子与乳胶的电场

偶极子与乳胶的电场

我想要创建一张这样的图片: 在此处输入图片描述

但我不知道该怎么做!有谁能帮我吗?非常感谢!

答案1

欢迎!画这种东西并不太难。当然,前提是你想要一幅卡通画。

\documentclass[tikz,border=3mm]{standalone}
\usepackage{mathpazo}
\usetikzlibrary{decorations.markings,arrows.meta,bending}
\tikzset{% 
    attach arrow/.style={
    decoration={
        markings,
         mark=at position 0 with {\pgfextra{%
         \pgfmathsetmacro{\tmpArrowTime}{\pgfkeysvalueof{/tikz/arc arrow/length}/(\pgfdecoratedpathlength)}%
         \xdef\tmpArrowTime{\tmpArrowTime}}},
        mark=at position {#1-3*\tmpArrowTime} with {\coordinate(@1);},
        mark=at position {#1-2*\tmpArrowTime} with {\coordinate(@2);},
        mark=at position {#1-1*\tmpArrowTime} with {\coordinate(@3);},
        mark=at position {#1+\tmpArrowTime/2} with {\coordinate(@4);
        \draw[-{Stealth[length=\pgfkeysvalueof{/tikz/arc arrow/length},bend]}] plot[smooth]
         coordinates {(@1) (@2) (@3) (@4)};},
        },
     postaction=decorate,
     },
     attach arrow/.default=0.5,
     arc arrow/.cd,length/.initial=2mm,
}
\begin{document}
\begin{tikzpicture}
\path node[circle,inner sep=1ex] (L){} (5,0) node[circle,inner sep=1ex] (R){};
\foreach \X in {0,...,7}
 {\draw[very thick,orange,attach arrow] (L) 
 to[out={-70+\X*20+8*rnd-4},in={180+70-\X*20+8*rnd-4},looseness=1.6] 
 (R);}
\foreach \X in {0,...,10}
 {\draw[very thick,orange,attach arrow] (L) to[bend left=16-4*\X+2*rnd-4] ++ (70+\X*22:3);
 \draw[very thick,orange,attach arrow] (R)+(180+70+\X*22:3) to[bend right=16-4*\X+2*rnd-4] 
  (R);}
\path[inner color=white,outer color=orange,shift={(L)}] 
 plot[smooth cycle,samples at={0,15,...,345}]
 (\x:{0.6+0.2*cos(\x)+0.2*cos(2*\x)});
\path[inner color=white,outer color=blue!30,shift={(R)}] 
 plot[smooth cycle,samples at={0,15,...,345}]
 (\x:{0.6+0.2*cos(\x+180)+0.2*cos(2*\x)});
\path (L.east) node{$+Q$} (R.west) node{$-Q$} ;
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容