jeudi 1 août 2013

Champ magnétique créé par un fil rectiligne, illustrations de Thomas Söll avec PSTricks

Avec la main gauche, le pouce indique le sens des électrons, qui est, évidemment, en sens inverse du sens conventionnel du courant.
Avec la main droite, le pouce indique le sens conventionnel du courant.
Ces images peuvent être agrandies.

Les fichiers (Linke-Faust4.pdf Linke-Faust4.tex) sont dans le dossier :


Je dois signaler un phénomène un peu bizarre. Si on ne met pas un \newpage ainsi qu'un petit texte entre les deux schémas, le deuxième dessin est produit la tête à l'envers par ps2pdf. Le fichier postscript est impeccable. J'en ignore la raison.

Le code :

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[a4paper,margin=2cm]{geometry}

\usepackage{pst-grad,pst-slpe,pst-3d,pst-node}

\usepackage{ifthen}
\newboolean{D}
\newboolean{G}
\setboolean{D}{true}
%\setboolean{D}{false}
%\setboolean{G}{true}
\setboolean{G}{false}


\newcommand{\Zylinder}[9]{%  #1 L\"{a}nge, #2 Radius, #3 gradbegin, #4 gradend, #5 gradmidpoint
\pscustom[dimen=#9,fillstyle=gradient,gradbegin=#3,gradend=#4,gradmidpoint=#5,gradangle=90,linecolor=#6,linewidth=#7,linestyle=#8]{%
\psellipticarc(0,0)(!#2 #2 0.3 mul){180}{360}
\psellipticarcn(0,#1)(!#2 #2 0.3 mul){0}{-180}
\closepath
}
\psellipse[fillstyle=gradient,gradbegin=#3,gradend=#4,gradmidpoint=0.55,gradangle=30,linestyle=none,linewidth=0pt](0,#1)(!#2 #2 0.3 mul)
}

\newcommand{\MagnetNadel}[4]{%
\rput(!#1 #2){\Zylinder{0.1}{0.22}{black!90!cyan!90}{black!40!cyan!10}{0.3}{black!90!cyan!90}{0.1pt}{none}{middle}}
\rput(!#1 #2 0.1 add){\Zylinder{0.3}{0.05}{black!90!cyan!90}{black!40!cyan!10}{0.3}{black!90!cyan!90}{0pt}{none}{middle}}
\rput(!#1 #2 0.4 add){\Zylinder{0.1}{0.015}{black!90!cyan!90}{black!40!cyan!10}{0.3}{black!90!cyan!90}{0pt}{none}{middle}}
\rput(!#1 #2 0.5 add){\pstilt{#3}{\rput{#4}(0,0){\psline[linecolor=red,linewidth=0.5pt,arrowscale=1.5,arrowlength=1.8,arrowinset=0]{->}(0,0)(0.238,0)
\psline[linecolor=green,linewidth=0.5pt,arrowscale=1.5,arrowlength=1.8,arrowinset=0]{<- br="">}}}
\rput(!#1 #2 0.5 add){\Zylinder{0.04}{0.03}{black!90!brown!90}{black!40!brown!30}{0.3}{black!90!brown!90}{0pt}{none}{middle}}
}

\def\LinkeFaust#1{%
\def\tempa{#1}
\definecolor{Weiss}{rgb}{1,0.98,0.98}%     255 250 250
\definecolor{Haut}{rgb}{1,0.894,0.769}% 255 228 196
%\psset{unit=1.0}
\begin{psclip}
{\psframe[linestyle=none](0.25,0.25)(16,19.1)}
\pscustom[fillstyle=solid,fillcolor=Haut,linecolor=black!50,linewidth=0.9pt,opacity=1]{%
%
%\psset{showpoints}
\psbezier(0.2,7.6)(1.1,8.07)(1.8,8)(3,8.86)
\psbezier(3.4,9.15)(3.7,9.8)(3.7,10.1)
\psbezier(3.7,11.8)(4.8,13.2)(4.8,14)
\psbezier(4.8,14.4)(5.22,15.3)(5.18,17)
\psline(5.3,17.2)(5,18.65) % Fingernagel Daumen
\psbezier(5.05,18.8)(5.25,19)(5.5,19)
\psbezier(6.4,19)(7.35,16.9)(7.35,15.6)
\psbezier(7.35,15)(7.05,13.9)(7.05,13.4)
\psbezier(7.05,13.2)(7.1,12.8)(7.45,12.4) % Ende Daumen
\psbezier(7.7,12.5)(8.7,12.3)(8.9,12.2)
\psbezier(9.1,12.24)(9.7,12.24)(9.9,12.2)
\psbezier(10.1,12.3)(10.5,12.2)(10.8,12.2)
\psbezier(11,12.2)(11,12.3)(11.3,12.2)
\psbezier(11.5,12.22)(13.1,11.68)(13.2,11.57)
\psline(13.2,11.57)(10.2,3.8)
\psbezier(9.3,3.3)(7.8,3.3)(7.4,3.3)
\psbezier(6.8,3.3)(6.3,3.2)(5.2,3.5)
\psbezier(3.2,2.6)(3.2,2.6)(0.2,0.1)
\closepath
}
\end{psclip}

% Fingernagel Daumen
\pscustom[fillstyle=solid,fillcolor=red!10,linecolor=black!50,linewidth=0.8pt,opacity=1]{%
%
\psbezier(5.18,17.0)(5.45,17.2)(5.42,17.2)(5.4,17.4)
\psbezier(5.3,18.4)(5.4,18.4)(5,18.65)
\psbezier(4.95,18.0)(4.9,18.0)(5.18,17.0)
\closepath
}

% Linien in Handfl\"{a}che und Daumen
{\psset{linewidth=0.8pt,linecolor=black!40}
\psbezier(3,6)(3.1,5.4)(3.25,5)(3.5,4.6)
\psbezier(4.65,3.85)(4.73,3.7)(4.73,3.6)(4.8,3.35)
\psbezier(4.8,4.8)(5.1,4.35)(5.2,4)(5.2,3.5)
\psbezier(2.9,8.4)(3.15,5.7)(4.4,5.2)(4.6,4.4)
\psbezier(3.15,8.5)(3.3,7)(4.1,6)(4.6,5.4)
\psbezier(3.35,8.8)(3.5,7.6)(4.0,7)(4.6,6.6)
\psbezier(4.6,6.1)(4.8,5.85)(4.98,5.7)(5.2,5.6)
\psbezier(5.6,5.4)(9.7,8)(10,9.5)(10,10.1)
\psbezier(10,10.1)(10,10.6)(10,11)(9.5,11.6)
\psbezier(5.7,6.3)(6.2,6.45)(6.4,6.45)(6.8,6.4)
\psbezier(7,7.2)(6.9,6.5)(6.8,6.5)(6.75,6.2)
\psbezier(7.6,9)(7.8,8.2)(7.8,7)(7.5,6.4)
\psbezier(8,12.25)(9.3,11.85)(9.4,11)(9.4,10.4)
\psbezier(10.05,12)(10,11)(10,9.8)(10.05,8.86)
\psbezier(11.18,12)(11,11.2)(11.0,10.5)(11.4,9.8)
\psbezier(7.45,12.4)(7.6,12.2)(7.63,12.05)(7.9,11.9)
\psbezier(5.1,15.44)(5.25,15.44)(5.35,15.32)(5.5,15.32)
\psbezier(5,14.95)(5.3,14.95)(5.3,14.96)(5.54,15.07)
\psbezier(6.7,15.38)(7,15.42)(7,15.4)(7.35,15.6)
}

%--------------------------------------------------------------
%---------------- Platz f\"{u}r Material in der Hand --------------
%--------------------------------------------------------------
%\pscoil[coilheight=0.35,coilwidth=3,linewidth=1.3pt](10,2)(10,15)
\rput(11,0){\Zylinder{19}{0.25}{red!30!brown!90}{orange!30}{0.3}{red!30!brown!90}{1pt}{none}{middle}}

%% Elektronen
\newpsstyle{Elektron}{linecolor=black!30,slopebegin=blue!30,sloperadius=0.07,linestyle=none,slopecenter=0.65 0.65}
\def\Elektron{%
\psline[linewidth=0.3pt,arrowinset=0.06,arrowscale=0.3,arrowlength=1.2,arrowsize=0.25]{->}(0,0)(0,0.25)
\psBall[style=Elektron](0,0){blue!90}{.1}
\rput[c]{0}(0,0){\psline[linewidth=0.4pt,linecolor=white](-0.02,0)(0.02,0)}
}

\rput(7,-3){%
\pnode(-2,2){F}
\pnode(2,6){G}
\pnode(3.75,6){H}
\pnode(4.25,6){I}
\pnode(10,6.0){D}
\pnode(7,2.0){E}
\pnode(-2,1.6){A}
\pnode(7,1.6){B}
\pnode(10,5.6){C}
\pnode(2,5.6){J}

\psline[linestyle=dashed,linewidth=0.4pt,linecolor=blue!60,linestyle=dashed,dash=3pt 2pt](A)(J)(C)
\psline[linestyle=dashed,linewidth=0.4pt,linecolor=blue!60,linestyle=dashed,dash=3pt 2pt](G)(J)

\rput(4,0){\Zylinder{22}{0.25}{red!30!brown!90}{orange!30}{0.3}{red!30!brown!90}{1pt}{none}{middle}}

\ifthenelse{\boolean{\tempa}}
{
\rput(4.1,0.5){\Elektron}
\rput(3.9,1.1){\Elektron}
\rput(4.0,1.7){\Elektron}
\rput(4.1,2.4){\Elektron}
\rput(4.0,3.2){\Elektron}
}
{}

\pscustom[dimen=middle,fillstyle=solid,opacity=0.7,fillcolor=blue!25,linewidth=0.7pt,linestyle=none]{%
\psline(F)(G)(H)
\psellipticarc(4,4)(0.25,0.1){180}{360}
\psline(I)(D)(E)
\closepath
}
\pspolygon[fillstyle=solid,opacity=0.7,fillcolor=blue!60,linewidth=0.4pt,linecolor=blue!70,linestyle=none](E)(B)(C)(D)
\pspolygon[fillstyle=solid,opacity=0.7,fillcolor=blue!45,linewidth=0.4pt,linecolor=blue!70,linestyle=none](A)(B)(E)(F)
\psellipticarc[linewidth=0.4pt,linecolor=blue!70](4,4)(0.25,0.1){180}{360}
\psellipticarc[linewidth=0.4pt,linecolor=blue!50,linestyle=dashed,dash=3pt 2pt](4,3.6)(0.25,0.1){180}{360}

\psellipse[rot=5,linewidth=0.6pt,linestyle=dashed,dash=3pt 2pt,linecolor=blue](4,4)(2,0.8)
\psellipse[rot=5,linewidth=0.6pt,linestyle=dashed,dash=3pt 2pt,linecolor=blue](4,3.9)(3.5,1.5)

\rput(4,4.2){\Zylinder{17.8}{0.25}{red!30!brown!90}{orange!30}{0.3}{red!30!brown!90}{0pt}{none}{middle}}


\MagnetNadel{5.8}{3.8}{30}{265}
\MagnetNadel{3.5}{3.2}{20}{180}
\MagnetNadel{2.1}{4.1}{30}{80}
\MagnetNadel{4.6}{4.8}{20}{0}

\MagnetNadel{6.75}{5}{20}{340}
\MagnetNadel{5.3}{2.6}{30}{230}
\MagnetNadel{1}{2.92}{25}{155}
\MagnetNadel{2.4}{5.1}{20}{60}
}


%
\ifthenelse{\boolean{\tempa}}
{%
\rput(11.1,1){\Elektron}
\rput(10.9,1.6){\Elektron}
\rput(11.0,2){\Elektron}
\rput(11.1,2.5){\Elektron}
\rput(11.0,3){\Elektron}

\rput(11.1,10){\Elektron}
\rput(10.9,10.6){\Elektron}
\rput(11.0,11){\Elektron}
\rput(11.1,11.5){\Elektron}
\rput(11.0,12){\Elektron}
\rput(10.9,12.5){\Elektron}

\rput(11.1,13){\Elektron}
\rput(10.9,13.6){\Elektron}
\rput(11.0,14){\Elektron}
\rput(11.1,14.5){\Elektron}
\rput(11.0,15){\Elektron}
\rput(10.9,15.5){\Elektron}

\rput(11.1,16){\Elektron}
\rput(10.9,16.6){\Elektron}
\rput(11.0,17){\Elektron}
\rput(11.1,17.5){\Elektron}
\rput(11.0,18){\Elektron}
\rput(10.9,18.5){\Elektron}
}
{%
\rput(11,-2.7){\Large\textcolor{black}{$+$}}
\rput(11,18.6){\Large\textcolor{black}{$-$}}
}

% kleiner Finger
\pscustom[fillstyle=solid,fillcolor=Haut,linecolor=black!50,linewidth=0.9pt,opacity=1]{%
%
\psbezier(14.0,4.95)(14.2,4.7)(14.18,4.2)(13.8,3.8)
\psbezier(13.2,3.51)(13.0,3.38)(12.0,3.25)
\psbezier(11.8,3.22)(11.7,3.23)(11.5,3.25)
\psbezier(11.3,3.27)(11.0,3.3)(10.75,3.4)
\psbezier(10.53,3.51)(10.1,3.45)(9.75,3.95)
\psbezier(9.65,4.15)(9.65,4.4)(9.8,4.55)
%\psbezier(8.87,5.9)(9.3,6.19)(9.8,6.2)

\closepath
}

% Fingernagel kleiner Finger
\pscustom[fillstyle=solid,fillcolor=red!10,linewidth=0.8pt,linecolor=black!50,opacity=1]{%
%
\psbezier(11.2,4.35)(11.35,4.15)(11.35,4.0)(11.2,3.86)
\psbezier(11.1,3.81)(11,3.76)(10.8,3.78)
\psbezier(10.1,3.84)(10.13,3.9)(10.08,4)
\psbezier(10.05,4.12)(10.05,4.4)(10.18,4.5)
\closepath
}

% Linien im kleinen Finger
{\psset{linewidth=0.8pt,linecolor=black!40}
\psbezier(12.1,4.2)(12.2,3.75)(12.2,3.75)(12.0,3.4)
\psbezier(12.35,4.15)(12.4,3.75)(12.4,3.75)(12.25,3.45)
\psbezier(13.7,4.8)(13.8,4.5)(13.8,4.5)(13.7,4.18)
}

% Ringfinger
\pscustom[fillstyle=solid,fillcolor=Haut,linecolor=black!50,linewidth=0.9pt,opacity=1]{%
%
\psbezier(14.65,7.1)(15.0,6.8)(15.18,6.6)(15.18,6.12)
\psbezier(15.18,5.85)(15.2,5.5)(14.2,5.0)
\psbezier(13.0,4.45)(12.8,4.45)(12.4,4.4)
\psbezier(11.6,4.25)(11.6,4.23)(10.86,4.4)
\psbezier(10.4,4.42)(10.0,4.5)(9.85,4.5)
\psbezier(9.2,4.5)(8.87,5.0)(8.87,5.5)
\psbezier(8.87,5.9)(9.3,6.19)(9.8,6.2)

\closepath
}

% Fingernagel Ringfinger
\pscustom[fillstyle=solid,fillcolor=red!10,linewidth=0.8pt,linecolor=black!50,opacity=1]{%
%
\psbezier(10.73,5)(10.73,4.83)(10.7,4.58)(9.5,4.72)
\psbezier(9.25,5.43)(9.4,5.7)(9.65,5.9)
\psbezier(10.65,5.7)(10.73,5.4)(10.73,5)
\closepath
}

% Linien im Ringfinger
{\psset{linewidth=0.8pt,linecolor=black!40}
\psbezier(11.9,5.6)(12.0,5.1)(12.0,5.0)(11.9,4.6)
\psbezier(12.2,5.55)(12.3,5.1)(12.3,5.0)(12.2,4.65)
\psbezier(14.4,6.7)(14.8,6.6)(14.92,6)(14.85,5.8)
}

% Mittelfinger
\pscustom[fillstyle=solid,fillcolor=Haut,linecolor=black!50,linewidth=0.9pt,opacity=1]{%
%
\psbezier(14.4,9.75)(15,9.5)(15.4,9)(15.4,8.2)
\psbezier(15.4,7.95)(15.4,7.7)(14.7,7.02)
\psbezier(14.1,6.5)(12.8,5.95)(12.4,5.95)
\psbezier(12.2,5.95)(11.9,6.02)(10.7,6.02)
\psbezier(10.5,6.02)(10.4,6.03)(10.2,6.02)
\psbezier(9.74,6.01)(9.57,6.37)(9.57,6.7)
\psbezier(9.57,7)(9.75,7.46)(10.3,7.7)
\closepath
}

% Fingernagel Mittelfinger
\pscustom[fillstyle=solid,fillcolor=red!10,linewidth=0.8pt,linecolor=black!50,opacity=1]{%
%
\psbezier(11.42,6.5)(11.42,6.02)(11,6.06)(10.7,6.05)
\psbezier(10.2,6.07)(9.95,6.2)(9.95,6.5)
\psbezier(9.95,6.8)(10.15,7.22)(10.45,7.22)
\psbezier(10.5,7.22)(10.85,7.15)(10.98,7.13)
\psbezier(11.02,7.12)(11.15,7.09)(11.25,7.0)
\psbezier(11.3,6.96)(11.42,6.8)(11.42,6.5)
\closepath
}

% Linien im Mittelfinger
{\psset{linewidth=0.8pt,linecolor=black!40}
\psbezier(12.6,7.2)(12.9,6.92)(12.85,6.6)(12.8,6.25)
\psbezier(12.9,7.2)(13.1,6.92)(13.15,6.7)(13.1,6.35)
\psbezier(14.6,9.2)(15,8.9)(15.05,8.6)(15.1,8.3)
%\psbezier(11.42,6.5)(11.42,6.02)(11,6.1)(10.7,6.05)
}

% Zeigefinger
\pscustom[fillstyle=solid,fillcolor=Haut,linestyle=none,opacity=1]{%
%
\psbezier(13.2,11.57)(14.16,11.25)(14.5,10.6)(14.4,9.75)
\psbezier(13.6,9.4)(13.5,8.95)(13,8.6)
\psbezier(12.4,8.1)(11.5,7.73)(10.8,7.73)
\psbezier(10.65,7.73)(10.4,7.7)(10.16,7.64)
\psbezier(9.7,8)(9.78,8.25)(9.78,8.35)
\psbezier(9.78,8.6)(9.9,9)(10.3,9.35)
\psbezier(11.2,10)(11.45,10.0)(11.7,10.4)
\psbezier(12.1,11)(12.6,11.48)(12.9,11.51)
\closepath
}
% Randlinie Zeigefinger
{\psset{linewidth=0.9pt,linecolor=black!50}
\psbezier(13.2,11.57)(14.16,11.25)(14.5,10.6)(14.4,9.75)
\psbezier(14.4,9.75)(13.6,9.4)(13.5,8.95)(13,8.6)
\psbezier(13,8.6)(12.4,8.1)(11.5,7.73)(10.8,7.73)
\psbezier(10.8,7.73)(10.65,7.73)(10.4,7.7)(10.16,7.64)
\psbezier(10.16,7.64)(9.7,8)(9.78,8.25)(9.78,8.35)
\psbezier(9.78,8.35)(9.78,8.6)(9.9,9)(10.3,9.35)
\psbezier(10.3,9.35)(11.2,10)(11.45,10.0)(11.7,10.4)
\psbezier(11.7,10.4)(12.1,11)(12.6,11.48)(12.9,11.51)
}

% Fingernagel Zeigefinger
\pscustom[fillstyle=solid,fillcolor=red!10,linewidth=0.8pt,linecolor=black!50,opacity=1]{%
%
\psbezier(11.7,8.45)(11.7,7.85)(10.9,7.73)(10.8,7.73)
\psbezier(10.7,7.73)(10.6,7.72)(10.48,7.7)
\psbezier(10.33,7.97)(10.36,8.1)(10.35,8.2)
\psbezier(10.36,8.77)(10.96,8.86)(11.1,8.86)
\psbezier(11.4,8.86)(11.7,8.7)(11.7,8.45)
\closepath
}

% Linien im Zeigefinger
{\psset{linewidth=0.8pt,linecolor=black!40}
\psbezier(12.2,9.6)(12.48,9.4)(12.5,9.2)(12.6,8.8)
\psbezier(12.5,9.7)(12.65,9.55)(12.7,9.4)(12.8,9.1)
\psbezier(13.6,10.8)(13.9,10.6)(14.02,10.4)(14.04,10)
}
}
\begin{document}
Avec la main gauche, le pouce indique le sens des électrons, qui est, évidemment, en sens inverse du sens conventionnel du courant.
\begin{center}
\begin{pspicture}[showgrid=false,shift=0](0,-3)(15.5,19)
\LinkeFaust{D} %
\end{pspicture}
\end{center}
\newpage
Avec la main droite, le pouce indique le sens conventionnel du courant.
\begin{center}
\begin{pspicture}[showgrid=false,shift=0](0,-3)(-15.5,20)
\psscalebox{-1 1}{\LinkeFaust{G}}
\end{pspicture}
\end{center}

\end{document}


Aucun commentaire:

Enregistrer un commentaire