% !TEX encoding = UTF-8 Unicode
% J.Roussel
% MAJ : 2014-06-03
% Ce document regroupe les codes TIKZ des figures utilisées pour le cours "Interaction électrostatique" situé à la page http://femto-physique.fr/electromagnetisme/interaction_electrostatique.php
%-------------------------------------------
\documentclass[11pt]{article}
\input{styles_emag}
\title{Figures TikZ du cours "Interaction électrostatique"}
\begin{document}
% 2015-10-16 doublet électrique
\begin{tikzpicture}
\coordinate (A) at (0,1);
\coordinate (B) at (0,-1);
\coordinate (M) at (50:4);
\draw[dashed,-*](A)--(M)node[midway,fill=white]{$r_1$}node[left=4pt]{M};
\draw[dashed](B)--(M)node[midway,fill=white]{$r_2$};
\draw[|<->|](-1,-1)--++(0,2)node[midway,left]{$a$};
\draw (A)node[left=5pt]{\small A} node[circle, inner sep=3, ball color=gray]{}node[right=5pt]{\footnotesize{$q$}};
\draw (B)node[left=5pt]{\small B} node[circle, inner sep=3, ball color=gray]{}node[right=5pt]{\footnotesize{$-q$}};
\draw[|->] (0,0)node[left=2pt]{\small O}--++(0,0.5);
\draw[thin] (0,0)--(M)node[pos=0.3,fill=white]{$r$};
\draw (50:0.3)arc(50:90:0.3);
\draw (70:.5)node{$\theta$};
\draw[->] (M)++(50:5pt)--++(50:0.5)node[below right]{$\overrightarrow{u_r}$};
\draw[->] (M)++(50:5pt)--++(-30:0.5)node[below right]{$\overrightarrow{u_\theta}$};
\end{tikzpicture}
% 2015-10-18 : développement multipolaire
\begin{tikzpicture}[scale=0.8,x={(-0.353cm,-0.353cm)}, y={(1cm,0cm)}, z={(0cm,1cm)}]
\coordinate (O) at (0, 0, 0);
\coordinate (P) at (1,2,0);
\coordinate (M) at (0,4,3);
\draw[axis] (O) -- +(0,0,4)node[above]{$z$};
\draw[axis] (O) -- +(3,0,0)node[left]{$x$};
\draw[axis] (O)node{+} -- +(0,4,0)node[right]{$y$};
\draw[thin,-*](O)--(M)node[pos=0.5,above]{$r$};
\draw[dashed] (P)node[below=2pt]{P$_i$}--(M)node[above=2pt]{M}node[midway,right]{$r_i$};
\draw[dashed] (O)node[left=2pt]{O}--(P)node[midway,below=1pt]{$a_i$};
\draw[vecteur](M)++($0.1*(M)$)--++($0.2*(M)$)node[above]{$\overrightarrow{u_r}$};
\draw (P)node[circle, inner sep=2, ball color=gray]{}node[right=5pt]{\footnotesize{$q_i$}};
\draw (0,0.4,0)node[circle, inner sep=2, ball color=gray]{};
\draw (0,0.2,1)node[circle, inner sep=2, ball color=gray]{};
\draw (0,0.3,1.5)node[circle, inner sep=2, ball color=gray]{};
\draw (0,-.6,1)node[circle, inner sep=2, ball color=gray]{};
\draw (2,0,0)node[circle, inner sep=2, ball color=gray]{};
\draw (1,1,-1)node[circle, inner sep=2, ball color=gray]{};
\end{tikzpicture}
% 2015-11-30 : exo sur le dichlorobenzène
\begin{tikzpicture}[]
\draw[shift={(6,0)}] (30:.5)--(90:0.5)--(150:0.5)--(210:0.5)--(270:0.5)--(330:0.5)--cycle;
\draw[shift={(6,0)}] (0,0)circle(.25);
\draw[shift={(6,0)}] (90:0.5)--++(0,.5)node[above]{$\mathsf{Cl}$};
\draw[shift={(6,0)}] (-90:0.5)--++(0,-.5)node[below]{$\mathsf{Cl}$};
\draw[shift={(6,0)}] (0,1.75) node{para};
\draw[shift={(3,0)}] (30:.5)--(90:0.5)--(150:0.5)--(210:0.5)--(270:0.5)--(330:0.5)--cycle;
\draw[shift={(3,0)}] (0,0)circle(.25);
\draw[shift={(3,0)}] (90:0.5)--++(0,.5)node[above]{$\mathsf{Cl}$};
\draw[shift={(3,0)}] (-30:0.5)--++(-30:0.5)node[right]{$\mathsf{Cl}$};
\draw[shift={(3,0)}] (0,1.75) node{méta};
\draw[shift={(0,0)}] (30:.5)--(90:0.5)--(150:0.5)--(210:0.5)--(270:0.5)--(330:0.5)--cycle;
\draw[shift={(0,0)}] (0,0)circle(.25);
\draw[shift={(0,0)}] (90:0.5)--++(0,.5)node[above]{$\mathsf{Cl}$};
\draw[shift={(0,0)}] (30:0.5)--++(30:0.5)node[right]{$\mathsf{Cl}$};
\draw[shift={(0,0)}] (0,1.75) node{ortho};
\draw[shift={(9,0)},vecteur] (0,0)--++(0,-1)node[below]{$\overrightarrow{p_1}$};
\draw[shift={(9,0)},vecteur] (0,0)--++(-150:1)node[below]{$\overrightarrow{p_2}$};
\draw[shift={(9,0)}] (-90:0.5)arc(-90:-150:0.5);
\draw[shift={(9,0)}] (-120:0.5) node[fill=white]{$\alpha$};
\end{tikzpicture}
% 2015-10-20 : dipole dans un champ extérieur
\begin{tikzpicture} [scale=1,decoration={markings,mark=at position 1cm with {\arrow[]{stealth};}}]
\foreach \X in {0,...,3}
\foreach \Y in {0,...,2}
\draw[color=black!60,->] (\X,\Y)--++(0.8,0);
\draw[->,thick] (2,1)node{$\bullet$}--++(30:1.6)node[midway,above]{$\overrightarrow{p}$};
\draw (4,0)node[above left]{$\overrightarrow{E}_{\text{ext}}$};
\draw[shift={(2,1)}] (0.5,0) arc(0:30:0.5);
\draw (2,1)+(15:0.8)node{$\theta$};
\end{tikzpicture}
\qquad
\begin{tikzpicture}
\begin{axis}[
height=4cm,
% grid=major,
axis lines=middle,
inner axis line style={=>},
xlabel style={anchor=west},
ylabel style={anchor=south},
xlabel={$\theta$},
ylabel={$E_{\text{p}}$},
xtick={-3.14,3.14},
xticklabels={$-\pi$,$\pi$},
ytick={-1,1},
yticklabels={$E_{\text{min}}$,$E_{\text{max}}$},
ymin=-1.2,
ymax=1.2,
xmin=-4,
xmax=4,]
\addplot+[mark=none,domain=-4:4,samples=100]{-cos(deg(x))};
\end{axis}
\end{tikzpicture}
%============================================================
% 2015-10-21 : Potentiel de Lenard-Jones modélisant l'interaction entre deux atomes.
%============================================================
\begin{tikzpicture}[scale=1]
\begin{axis}[
height=6cm,
axis lines=middle,% bottom,top
inner axis line style={=>},
xlabel style={anchor=south east},
ylabel style={anchor=north west},
xlabel={$r$},
ylabel={$E_{\rm p}$},
xtick={1},
xticklabels={$a$},
ytick={-1},
yticklabels={~$-\epsilon$},
yticklabel style={anchor=west},
xticklabel style={anchor=north east},
ymin=-2,
ymax=4,
xmin=0.5,
xmax=2.5,]
\addplot+[mark=none,domain=0.9:3,samples=100]{4*((1/x)^12-(1/x)^6)};
\addplot+[mark=none,dashed,red,domain=0.8:3,samples=50]{-4*(1/x)^6};
\addplot+[mark=none,dashed,red,domain=1:1.5,samples=20]{4*(1/x)^12};
\node[coordinate,pin=right:{\footnotesize attraction $\propto 1/r^6$}] at (axis cs:1.3,-1) {};
\node[coordinate,pin=right:{\footnotesize répulsion}] at (axis cs:1.1,2) {};
\end{axis}
\end{tikzpicture}
\end{document}