% !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 "Potentiel et énergie électriques"}
\begin{document}
% 2015-10-13
\begin{tikzpicture}[decoration={markings,mark=at position 1cm with {\arrow[]{stealth};}}]
\clip (-0.25,-2) rectangle (4.5,2.5);
\draw[ball color=yellow] (0,0) circle(0.25) node{+}node[above=0.3cm]{$q$};
\draw[*-*,color=gray,postaction={decorate}] (4,-1) node[right=1mm]{A} .. controls +(-1,-1) and +(-0.375,-0.5) .. (3,0) .. controls +(3,4) and +(.2,1) .. (0.5,1)node[left=1mm]{B};
\draw[force] (3.4,0.5)--++(-1.7,-.25)node[above]{$\overrightarrow{f}$};
\draw[vecteur](3.4,0.5)--++(.85,.125)node[above]{$\overrightarrow{u_r}$};
\draw[ball color=yellow] (3.4,0.5) circle(0.25) node{-}node[above=0.3cm]{$q'$};
\end{tikzpicture}
% 2015-10-14 équipotentielles
\begin{tikzpicture} [scale=1,decoration={markings,mark=at position 1cm with {\arrow[]{stealth};}}]
\clip (1,1) rectangle (5,5);
\draw [domain=5:1.2,color=monCyan,samples=100,postaction={decorate},->] plot (\x,{6/\x});
\draw [domain=3:1,color=monCyan,samples=100,postaction={decorate},->] plot (\x,{3/\x});
\draw [domain=5:2.4,color=monCyan,samples=100,postaction={decorate},->] plot (\x,{12/\x});
\foreach \X in {1,2,3,4,5}
\foreach \Y in {1,2,3,4,5}
\draw[color=black!60,->] (\X,\Y)--++({-0.1*\X},{0.1*\Y});
\foreach \C in {0,5,10,15,20}{
\draw [domain=1:5,color=monOrange,dashed,samples=100,] plot (\x,{sqrt(\x*\x+\C)});
\draw [domain={sqrt(\C)+0.1}:5,color=monOrange,dashed,samples=100,] plot (\x,{sqrt(\x*\x-\C)});
}
\foreach \x in {2,3}
\draw[shift={(\x,{6/\x})},rotate={atan(\x*\x/6)}](0,5pt)-|(5pt,0);
\end{tikzpicture}
\end{document}