diff options
Diffstat (limited to 'Master')
19 files changed, 2047 insertions, 2 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-electricfield/Changes b/Master/texmf-dist/doc/generic/pst-electricfield/Changes new file mode 100755 index 00000000000..d0becb34b7e --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-electricfield/Changes @@ -0,0 +1,17 @@ +pst-electricfield.sty -------- +2010-05-28 - first version + + +pst-electricfield.tex -------- +0.13 2010-06-09 - changes to the keyword setting +0.12 2010-06-08 - add posArrow and radius for the charges +0.11 2010-06-08 - change macro name +0.10 2010-05-28 - first version + + +pst-electricfield.pro -------- +0.05 2010-06-09 - changes to the Radius and to /Func +0.04 2010-06-08 - allow relative/absolute radii for the charges (hv) +0.03 2010-06-08 - add test for plotCharge (hv) +0.02 2010-06-07 - fix bug with /fleche (hv) +0.01 2010-05-28 - first version diff --git a/Master/texmf-dist/doc/generic/pst-electricfield/README b/Master/texmf-dist/doc/generic/pst-electricfield/README new file mode 100644 index 00000000000..6cfb61ebb0f --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-electricfield/README @@ -0,0 +1,25 @@ +Save the files pst-electricfield.sty|tex|pro in a directory, which is part of your +local TeX tree. +Then do not forget to run texhash to update this tree. +For more information see the documentation of your LATEX distribution +on installing packages into your LATEX distribution or the +TeX Frequently Asked Questions: +(http://www.tex.ac.uk/cgi-bin/texfaq2html?label=instpackages). + +The documentation ------------------- +To get a smaller size of the generated pdf file run the +Makefile or by hand +"pst2pdf <file> --Iext=.png --Iscale=0.5 --DPI=150". This will +create eps/pdf/png images in a subdirectory images/ and then +using only the png ones for the last _pdflatex_ run. The +file size can be reduced to about 20% of the one created with +ps2pdf. The pdf file is saved as yfile>-pdf.pdf. + +When running the documentation in a traditional way, then +uncomment the line (in the preamble) + +%\newenvironment{postscript}{}{} % uncomment, when running with latex + +You can also use the Makefile.latex to create all three languages +of the document, or alternatively Makefile.pst2pdf to create them +with png imgaes to get smaller file sizes. diff --git a/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-doc.bib b/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-doc.bib new file mode 100644 index 00000000000..14a8466e948 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-doc.bib @@ -0,0 +1,79 @@ +%% -*-bibtex-*- +@STRING{tugboat = {TUGboat} } +@STRING{dtk = {{D}ie {\TeX}nische {K}om{\"o}die} } + +@Book{companion, + author = {Michel Goosens and Frank Mittelbach and Sebastian Rahtz and Dennis Roegel and Herbert Vo\ss}, + title = {The {\LaTeX} {G}raphics {C}ompanion}, + publisher = {{Addison-Wesley Publishing Company}}, + edition = {second}, + year = {2007}, + address = {Reading, Mass.} +} + +@Article{girou:01:, + author = {Denis Girou}, + title = {Pr\'esentation de {PST}ricks}, + journal = {Cahier {GUT}enberg}, + year = 1994, + volume = {16}, + month = apr, + pages = {21-70} +} + +@Article{girou:02:, + author = {{Timothy Van} Zandt and Denis Girou}, + title = {Inside {PST}ricks}, + journal = TUGboat, + year = 1994, + volume = {15}, + month = sep, + pages = {239-246} +} + +@Book{PostScript, + Author = {Kollock, Nikolai G.}, + Title = {Post{S}cript richtig eingesetzt: vom {K}onzept zum + praktischen {E}insatz}, + Publisher = {IWT}, + Address = {Vaterstetten}, + year = 1989, +} + +@Manual{multido, + Title = {\texttt{multido.tex} - a loop macro, that supports fixed-point addition}, + Author = {{Timothy Van} Zandt}, + Organization = {}, + Address = {\url{CTAN:/graphics/pstricks/generic/multido.tex}}, + Note = {}, + year = 1997 +} + +@Book{PSTricks2, + author = {Herbert Vo\ss{}}, + title = {\texttt{PSTricks} -- {G}rafik f\"ur \TeX{} und \LaTeX}, + edition = {fifth}, + publisher = {DANTE -- Lehmanns}, + year = {2008}, + address = {Heidelberg/Hamburg} +} + +@Book{abramowitz, + author = {M. Abramowitz and I. A. Stegun }, + year = 1964, + title = {Handbook of {M}athematical {F}unctions with {F}ormulas, {G}raphs, and + {M}athematical {T}ables}, + publisher = {National Bureau of Standards Applied Mathematics Series, + U.S. Government Printing Office}, + address = {Washington, D.C., USA}, + Note = {Corrections appeared in later printings up to the 10th Printing}, +} + +@Book{dolan, +author = {Thomas~J. ,Dolan}, +title = {Fusion {R}esearch, {V}olume {III} ``{T}echnology''}, +publisher= {Pergamon Press}, +year=1982, +Note= {Chapter 20 ``Water-cooled magnets'' , + pages 600 ff ``circular loops'' -- Integrating the Biot-Savart Law (in cylindrical geometry)}, +} diff --git a/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-docDE.pdf b/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-docDE.pdf Binary files differnew file mode 100644 index 00000000000..dfaba8bfff1 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-docDE.pdf diff --git a/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-docDE.tex b/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-docDE.tex new file mode 100644 index 00000000000..5a7397bf027 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-docDE.tex @@ -0,0 +1,460 @@ +%% $Id: pst-electricfield-docDE.tex 342 2010-06-10 07:39:20Z herbert $ +\documentclass[11pt,english,french,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings + headexclude,footexclude,oneside]{pst-doc} +\usepackage[latin1]{inputenc} +\usepackage{pst-electricfield} +\usepackage{pst-func} +\usepackage{pst-exa}% only when running pst2pdf +\usepackage{esint} +\let\pstEFfv\fileversion +\lstset{pos=t,language=PSTricks, + morekeywords={psElectricfield,psEquipotential},basicstyle=\footnotesize\ttfamily} +\newcommand\Cadre[1]{\psframebox[fillstyle=solid,fillcolor=black,linestyle=none,framesep=0]{#1}} +% +\title{\texttt{pst-electricfield}} +\subtitle{Feldlinien und \"{A}quipotentiallinien elektrischer Punktladungen; v.\pstEFfv} +\author{J\"{u}rgen Gilg\\ Manuel Luque\\ Patrice M\'egret\\ Herbert Vo\ss} + + +\begin{document} +\maketitle +\begin{abstract} +Das Paket \texttt{pst-electricfield} hat sich zum Ziel gesetzt Feldlinien und \"{A}quipotentiallinien zu zeichnen f\"{u}r eine beliebige Anordnung von elektrischen Punktladungen. Die Idee f\"{u}r ein solches Paket ist entstanden durch eine Diskussion \"{u}ber das Darstellen von Feldlinien in der PSTricks Liste \url{http://www.tug.org/pipermail/pstricks/}. Es gibt verschiedene Methoden und Ans\"{a}tze -- diese wollen wir auch in dieser Dokumentation vorstellen. + +In diesem Paket werden die Feldlinien mit dem Euler-Verfahren errechnet; dieses Verfahren ist einerseits ausreichend f\"{u}r die Pr\"{a}zision der Darstellung und liefert andererseits eine gute Rechengeschwindigkeit (Kompilierungsdauer). Die numerische L\"{o}sung der impliziten Gleichung f\"{u}r das Potential $V(x,y)=\Sigma V_i$ erlaubt es die \"{A}quipotentiallinien darzustellen, die Rechengeschwindigkeit hierf\"{u}r ist jedoch sehr viel kleiner. Das Paket stellt zwei Befehle zur Verf\"{u}gung, einen f\"{u}r die Feldlinien und einen f\"{u}r die \"{A}quipotentiallinien. Wegen der erh\"{o}hten Rechendauer f\"{u}r die \"{A}quipotentiallinien ist es zu erw\"{a}gen sich nur auf die Feldlinien zu beschr\"{a}nken. + +Jede Ladung ist charakterisiert durch ihren Wert $q_i$ und ihre Position $(x_i,y_i)$. Die Anzahl der Ladungen ist frei w\"{a}hlbar, jedoch steigt mit ihr auch erheblich die Rechendauer f\"{u}r die \"{A}quipotentiallinien. +\end{abstract} + +\section{Vorgeschlagene Methode von Patrice M\'egret} + +Mit dem Paket \LPack{pst-func} und dem Befehl \Lcs{psplotImp}\verb+[options](x1,y1)(x2,y2)+ +kann man die Feldlinien \textbf{und} die \"{A}quipotentiallinien zeichnen. + +Wie leitet man die implizite Funktion der Feldlinien mit Hilfe des elektrischen Potentials her? + +Der Gau{\ss}sche Satz sagt aus, dass der Flu{\ss} durch eine geschlossene Oberfl\"{a}che $S$ durch folgende Gleichung definiert ist: +\begin{equation}\label{pm-eq-a} +\psi = \oiint\limits_S \vec{D} \cdot \vec{u}_n \mathrm{d} S = Q +\end{equation} +ist gleich der Ladung $Q$ im Inneren von $S$. Au{\ss}erhalb der geschlossenen Oberfl\"{a}che ($Q=0$). Der elektrische Flu{\ss} ist konservativ. + +Eine Flu{\ss}r\"{o}hre ist eine R\"{o}hre, die um die Linien der dielektrischen Verschiebung $\vec{D}$ gebaut ist au{\ss}erhalb der Ladungen. Der eintretende Flu{\ss} in diese R\"{o}hre ist gleich dem austretenden Flu{\ss} aus der R\"{o}hre (der Flu{\ss} ist konservativ). + +Folgt man einer Flussr\"{o}hre konstanter Gr\"{o}{\ss}e, so folgt man auch einer Feldlinie $\vec{D}$ und dieser Ansatz wird gew\"{a}hlt, um eine implizite Gleichung von Feldlinien einfacher geometrischer Anordungen zu erhalten. + +In unserem Fall begn\"{u}gen wir uns mit Punktladungen und der Identit\"{a}t von der dielektrischen Verschiebung und der Feldst\"{a}rke (da wir keine Polarisation ber\"{u}cksichtigen). + +F\"{u}r eine elektrische Punktladung $q$ im Ursprung eines Koordinatensystems ist die elektrische Feldst\"{a}rke und das Potential gegeben durch: +\begin{equation}\label{pm-eq-b} +\vec{E} = \frac{1}{4 \pi \varepsilon_0 \varepsilon_r} q \frac{\vec{r}}{|\vec{r}|^3} +\end{equation} +\begin{equation}\label{pm-eq-c} +V = \frac{1}{4 \pi \varepsilon_0 \varepsilon_r} \frac{q}{r} +\end{equation} + +Der Flu{\ss} durch eine Kugelkappe mit der Oberfl\"{a}che $S$ deren halber \"{O}ffnungswinkel $\theta$ ist, ist gleich: +\begin{equation}\label{pm-eq-d} +\psi = \varepsilon_0 \varepsilon_r E S = \frac{1}{2} q (1 -\cos\theta) +\end{equation} +denn $S= 2\pi r^2 (1 - \cos\theta)$ und auf Grund von (\ref{pm-eq-a}) $4 \pi r^2 \varepsilon_0 \varepsilon_r E =q$ + +\begin{center} +\begin{pspicture}(-3,-3)(3,3) +%\psgrid +\psdot[dotscale=2](0,0) +\uput[-135](0,0){$q$} +\psaxes[labels=none,ticks=none]{->}(0,0)(-2.5,-2.5)(2.5,2.5)[$x$,-90][$y$,0] +\pswedge(0,0){2}{-30}{30} +\psarc{->}(0,0){1}{0}{30} +\rput(1.2,0.2){$\theta$} +\rput(2.2,0.7){$S$} +\end{pspicture} +\end{center} + +Um einen impliziten Ausdruck f\"{u}r die Feldlinien zu erhalten, gen\"{u}gt es die Konstanz des Flusses zum Ausdruck zu bringen: +\begin{equation}\label{pm-eq-e} +\psi(x,y) = \frac{1}{2} q (1 -\cos\theta) = \mathrm{konst.} +\end{equation} +Man sieht sofort, dass die Feldlinien f\"{u}r $\theta=\mathrm{konst.}$ radial verlaufen. + +Daraus folgt f\"{u}r die Feldlinien in der $xy$-Ebene in kartesischen Koordinaten: +\begin{equation}\label{pm-eq-f} +\frac{x}{\sqrt{x^2+y^2}} = \mathrm{konst.} +\end{equation} +F\"{u}r die \"{A}quipotentiallinien ist die Gleichung (\ref{pm-eq-c}) schon in impliziter Form, es gen\"{u}gt $V=\mathrm{konst.}$ zu setzen, dies liefert: +\begin{equation}\label{pm-eq-g} +\frac{1}{\sqrt{x^2+y^2}} = \mathrm{konst.} +\end{equation} + +\begin{center} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 0 0]}] +\psEquipotential[Q={[1 0 0]}](-5,-5)(5,5) +\multido{\r=-1+0.1}{20}{% +\psplotImp[linestyle=solid,linecolor=blue](-6,-6)(6,6){% +x y 2 exp x 2 exp add sqrt div \r \space sub}} +\multido{\r=0.0+0.1}{10}{% +\psplotImp[linestyle=solid,linecolor=red](-6,-6)(6,6){% +x 2 exp y 2 exp add sqrt 1 exch div \r \space sub}} +\end{pspicture*} +\end{center} + +\begin{verbatim} +%% lignes de champ +\psplotImp[linestyle=solid,linecolor=blue](-6,-6)(6,6){% +x y 2 exp x 2 exp add sqrt div \r \space sub}} + +%% \'{e}quipotentielles +\multido{\r=0.0+0.1}{10}{% +\psplotImp[linestyle=solid,linecolor=red](-6,-6)(6,6){% +x 2 exp y 2 exp add sqrt 1 exch div \r \space sub}} +\end{verbatim} + +Nun verallgemeinern wir eine Punktladungsverteilung l\"{a}ngs einer \textbf{Geraden}. Gegeben sind die Punktladungen $q_i$ mit ihren Koordinaten $(x_i,0)$. +\begin{center} +\begin{pspicture}(0,-3)(12,3) +%\psgrid +\psset{dotscale=2} +\dotnode(0,0){NA}\nput{-45}{NA}{$q_1$} +\dotnode(2,0){NB}\nput{-90}{NB}{$q_2$} +\dotnode(5,0){NC}\nput{-90}{NC}{$q_n$} +\dotnode[linecolor=red](4,2){ND}\nput{90}{ND}{$P(x,y)$} +\ncline{NA}{ND}\naput{$r_1,\theta_1$} +\ncline{NB}{ND}\nbput{$r_2,\theta_2$} +\ncline{NC}{ND}\nbput{$r_n,\theta_n$} +\psaxes[labels=none,ticks=none]{->}(0,0)(0,-2.5)(11,2.5)[$x$,-90][$y$,0] +\psarc{->}(5,0){0.7}{0}{116.5} +\rput(6,0.5){$\theta_n$} +\dotnode[linecolor=blue](4,-2){NE} +\nccurve[ncurv=2,linecolor=green!40!black]{ND}{NE} +\end{pspicture} +\end{center} +Es liegt eine Zylindersymmetrie vor; es gen\"{u}gt deshalb die Feldlinien und das Potential in der oberen Halb-Ebene $xy$ zu untersuchen und mit einer Rotation um die $x$-Achse erh\"{a}lt man somit die Gesamtl\"{o}sung. + + + +Bei Rotation um die $x$-Achse, erzeugt die Feldlinie, die durch den Punkt $P$ geht, eine Flussr\"{o}hre, deren elektrischer Flu{\ss} + durch eine beliebige Oberfl\"{a}che durch $P(x,y)$ hindurchflie{\ss}t und die $x$-Achse jenseits der letzten Ladung schneidet (diese Oberfl\"{a}che schneidet die $xy$-Ebene in dem gr\"{u}nen Bogen) gem\"{a}{\ss} (\ref{pm-eq-d}): +\begin{equation}\label{pm-eq-h} +\psi = \frac{1}{2} \sum_{i=1}^{n} q_i (1 -\cos\theta_i) +\end{equation} +Die Feldlinien erh\"{a}lt man sehr einfach, wenn man $\psi = \mathrm{konst.}$ setzt. In kartesischen Koordinaten: +\begin{equation}\label{pm-eq-i} +\sum_{i=1}^{n} q_i \frac{x-x_i}{\sqrt{(x-x_i)^2+y^2}} = \mathrm{konst.} +\end{equation} + +F\"{u}r das Potential erh\"{a}lt man trivial: +\begin{equation}\label{pm-eq-j} +\sum_{i=1}^{n} \frac{q_i}{\sqrt{(x-x_i)^2+y^2}} = \mathrm{konst.} +\end{equation} + +\begin{center} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 -2 0][-1 2 0]}] +\psEquipotential[Q={[1 -2 0][-1 2 0]},Vmin=-2,Vmax=2,stepV=0.25](-5,-5)(5,5) +\multido{\r=-2+0.2}{20}{% +\psplotImp[linestyle=solid,linecolor=red](-6,-6)(6,6){% +x 2 add dup 2 exp y 2 exp add sqrt div 1 mul +x -2 add dup 2 exp y 2 exp add sqrt div -1 mul add +\r \space sub}} +\multido{\r=-0.5+0.1}{10}{% +\psplotImp[linestyle=solid,linecolor=blue](-6,-6)(6,6){% +x 2 add 2 exp y 2 exp add sqrt 1 exch div 1 mul +x -2 add 2 exp y 2 exp add sqrt 1 exch div -1 mul add +\r \space sub}} +\end{pspicture*} +\end{center} + +\begin{verbatim} +%% lignes de champ +\multido{\r=-2+0.2}{20}{% +\psplotImp[linestyle=solid,linecolor=red](-6,-6)(6,6){% +x 2 add dup 2 exp y 2 exp add sqrt div 1 mul +x -2 add dup 2 exp y 2 exp add sqrt div -1 mul add +\r \space sub}} +%% \'{e}quipotentielles +\multido{\r=-0.5+0.1}{10}{% +\psplotImp[linestyle=solid,linecolor=blue](-6,-6)(6,6){% +x 2 add 2 exp y 2 exp add sqrt 1 exch div 1 mul +x -2 add 2 exp y 2 exp add sqrt 1 exch div -1 mul add +\r \space sub}} +\end{verbatim} + +Das dargestellte Beispiel besitzt eine Ladung $+1$ in $(-2,0)$ und eine Ladung $-1$ in $(2,0)$ und +zeigt die \"{U}berlagerung der Resultate von impliziter Methode und direkter Integration. Das deckt +sich gut, jedoch ist die implizite Methode langsamer und auf ein zylindersymmetrisches Problem +eingeschr\"{a}nkt (Ladungsanordnung l\"{a}ngs einer Geraden). + + +\newpage +\section{Vorgeschlagene Methode von J\"{u}rgen Gilg} +Mit dem Paket \textsf{pst-func} und dem Befehl \verb+\psplotDiffEqn+ kann man Feldlinien \textbf{und} \"{A}quipotentiallinien zeichnen. + +\textbf{Feldlinien} + +Gegeben sind die Punktladungen $\{q_1, \,\ldots, \,q_n\}$ und ihre Ortsvektoren $\{\vec{r}_1, \,\ldots, \,\vec{r}_n\}$. +\begin{equation*} +\vec{r}_1=\begin{pmatrix} +x_1\\y_1 +\end{pmatrix},\,\ldots,\, +\vec{r}_n=\begin{pmatrix} +x_n\\y_n +\end{pmatrix};\, +\vec{r}=\begin{pmatrix} +x\\y +\end{pmatrix} +\end{equation*} +Mit dem Prinzip der Superposition erh\"{a}lt man die resultierende Feldst\"{a}rke im Punkt $M$ mit $\overrightarrow{r}(M)$: +\begin{equation} +\vec{E} = \frac{1}{4 \pi \varepsilon_0 \varepsilon_r} \sum\limits_{i=1}^n q_i \frac{\vec{r} - \vec{r}_i}{|\vec{r} - \vec{r}_i|^3} +\end{equation} +In Komponentendarstellung: +\begin{equation} +\vec{E} =\begin{pmatrix} +E_x\\E_y +\end{pmatrix}= + \frac{1}{4 \pi \varepsilon_0 \varepsilon_r} \sum\limits_{i=1}^n \frac{q_i}{\sqrt{(x-x_i)^2+(y-y_i)^2}^3}\begin{pmatrix} + x-x_i\\y-y_i + \end{pmatrix} +\end{equation} +oder +\begin{align*} +E_x&=\frac{1}{4 \pi \varepsilon_0 \varepsilon_r} \sum\limits_{i=1}^n \frac{q_i(x-x_i)}{\sqrt{(x-x_i)^2+(y-y_i)^2}^3}\\ +E_y&=\frac{1}{4 \pi \varepsilon_0 \varepsilon_r} \sum\limits_{i=1}^n \frac{q_i(y-y_i)}{\sqrt{(x-x_i)^2+(y-y_i)^2}^3} +\end{align*} +Feldlinien verlaufen tangential zu $\vec{E}$. +\begin{equation*} +\frac{\text{d}y}{\text{d}x}=\frac{E_y}{E_x} +\end{equation*} +Dies ist eine Differentialgleichung 1.~Ordnung. + +Es folgt ein Beispiel mit dem Befehl \verb!\psplotDiffEqn! zum Zeichnen der Feldlinien: +\begin{verbatim} +\pstVerb{% +/q1 1 def +/q2 -0.5 q1 mul def +/xA 1.8 def +} + +\multido{\rx=-250+10.2}{50}{% +\psplotDiffEqn[% +linewidth=0.25pt,% +linecolor=red,% +varsteptol=.001,% +method=rk4,% +algebraic, +plotpoints=200% +]{-20}{20}{\rx}{% +(q1*(y[0])/(sqrt((x+xA)^2+(y[0])^2))^3+q2*(y[0])/(sqrt((x-xA)^2+(y[0])^2))^3)% +/% +(q1*(x+xA)/(sqrt((x+xA)^2+(y[0])^2))^3+q2*(x-xA)/(sqrt((x-xA)^2+(y[0])^2))^3)% +}% +} +\pscircle*(!xA 0){0.25}\pscircle*(!xA neg 0){0.25} +\end{verbatim} + + + +\textbf{Elektrisches Potential} + +Das elektrische Potential $V$ ist gegeben durch: +\begin{equation} +\vec{E}=\begin{pmatrix} +E_x\\E_y +\end{pmatrix}=-\text{grad}\, V=-\nabla V =-\begin{pmatrix} +\frac{\partial V}{\partial x}\\[4pt] +\frac{\partial V}{\partial y} +\end{pmatrix} +\end{equation} +oder +\begin{align*} +E_x=-\frac{\partial V}{\partial x}\\ +E_y=-\frac{\partial V}{\partial y} +\end{align*} +\textbf{\"{A}quipotentiallinien} +\begin{equation*} +V=\text{Cste} +\end{equation*} +\"{A}quipotentiallinien stehen stets senkrecht auf den Feldlinien. +\begin{equation*} +\frac{\text{d}y}{\text{d}x}=-\frac{E_x}{E_y} +\end{equation*} +Dies ist eine Differentialgleichung 1.~Ordnung. Man benutzt erneut: \verb!\psplotDiffEqn! um die \"{A}quipotentiallinien zu zeichnen. +\begin{verbatim} +\pstVerb{% +/q1 1 def +/q2 1 q1 mul def +/xA 3.25 def +} +\multido{\rx=-4.1+0.75}{20}{% +\psplotDiffEqn[% +linewidth=0.85pt,% +linecolor=blue,% +varsteptol=.00001,% +method=rk4,% +algebraic, +plotpoints=300% +]{-6}{6}{\rx}{% +-((q1*(x+xA)/(sqrt((x+xA)^2+(y[0])^2))^3+q2*(x-xA)/(sqrt((x-xA)^2+(y[0])^2))^3)) +/ +(q1*(y[0])/(sqrt((x+xA)^2+(y[0])^2))^3+q2*(y[0])/(sqrt((x-xA)^2+(y[0])^2))^3)% +}% +} +\end{verbatim} +Hier ein vollst\"{a}ndiges Beispiel: \url{http://tug.org/mailman/htdig/pstricks/2010/007468.html} + +Dies ist eine einfache Methode, jedoch mit einem nicht befriedigendenden Resultat, was mit eine Motivation war, dieses Paket zu entwickeln. + + +\section{Feldlinien} +Das Zeichnen der Feldlininen wird mit dem Befehl \Lcs{psElectricfield}\OptArgs\ aufgerufen. Dieser besitzt folgende Parameter: +\begin{enumerate} + \item Die Ladungen, ihre Ortskoordinaten und die Anzahl der Linien, die von jeder einzelnen ausgeht (oder bei ihr endet) werden mit mit demselben Parameter aufgerufen $\mathsf{Q=\{[q_1\, x_1\, y_1\, N_1] [q_2\, x_2\, y_2\, N_2]\ldots[q_i\, x_i\, y_i\, N_i]\ldots [q_n\, x_n\, y_n\, N_n]\}}$. Die Anzahl der Linien ist hierbei optional -- wenn diese Angabe weggelassen wird, wird ein vordefinierter Wert \textsf{N=19} genommen, der sich aus 360/18=20\degres{} ergibt (zwischen zwei Feldlinien, die von jeder einzelnen Ladung ausgeht oder dort endet). + \item Die Farbe und Linienst\"{a}rke kann mit den g\"{a}ngigen Parametern von PSTricks gesetzt werden: \textsf{linecolor} und \textsf{linewidth}. + \item Die Anzahl der Berechnungspunkte einer jeden Linie ist vordefiniert mit \textsf{points=400} und die Schrittweite ist \textsf{Pas=0.025}. Sollten diese Voreinstellungen nicht optimal f\"{u}r eine Zeichnung sein, dann muss man sie \"{a}ndern. + \item Die Position eines Pfeils auf einer Feldlinie kann mit dem Parameter \textsf{posArrow=0.25} gesetzt werden, der das Verh\"{a}ltnis der Punktanzahl angibt, jeweils beginnend bei der Ladung. +\end{enumerate} +\section{\"{A}quipotentiallinien} +Die \"{A}quipotentiallinien werden mit folgendem Befehl gezeichnet: \verb+\psEquipotential[options](xmin,ymin)(xmax,ymax)+. Die Option f\"{u}r die Ladungen \textsf{Q} ist dieselbe wie bei den Feldlinien, es ist jedoch \"{u}berfl\"{u}ssig~\textsf{N} anzugeben. +\begin{enumerate} + \item Man muss den Maximal- und Minimalwert des Potential vorab berechnen: \textsf{Vmax=3} und \textsf{Vmin=-1} sind die voreingestellten Werte. + \item Intervall zwischen zwei Werten des Potentials \textsf{stepV=0.5}, dies bestimmt die Anzahl der \"{A}quipotentiallinien. + \item Die Farbe und Linienst\"{a}rke kann mit den g\"{a}ngigen Parametern von PSTricks gesetzt werden: \textsf{linecolor} und \textsf{linewidth}. +\end{enumerate} + +\section{Beispiele} + +\begin{LTXexample}[pos=t] +\begin{pspicture*}(-6,-6)(6,6) +\psframe*[linecolor=lightgray!50](-6,-6)(6,6) +\psgrid[subgriddiv=0,gridcolor=gray,griddots=10] +\psElectricfield[Q={[-1 -2 2][1 2 2][-1 2 -2][1 -2 -2]},linecolor=red] +\psEquipotential[Q={[-1 -2 2][1 2 2][-1 2 -2][1 -2 -2]},linecolor=blue](-6.1,-6.1)(6.1,6.1) +\psEquipotential[Q={[-1 -2 2][1 2 2][-1 2 -2][1 -2 -2]},linecolor=green,linewidth=2\pslinewidth,Vmax=0,Vmin=0](-6.1,-6.1)(6.1,6.1) +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t] +\begin{pspicture*}(-6,-6)(6,6) +\psframe*[linecolor=lightgray!50](-6,-6)(6,6) +\psgrid[subgriddiv=0,gridcolor=gray,griddots=10] +\psElectricfield[Q={[-1 -2 2 false][1 2 2 false][-1 2 -2 false][1 -2 -2 false]},radius=1.5pt,linecolor=red] +\psEquipotential[Q={[-1 -2 2][1 2 2][-1 2 -2][1 -2 -2]},linecolor=blue](-6,-6)(6,6) +\psEquipotential[Q={[-1 -2 2][1 2 2][-1 2 -2][1 -2 -2]},linecolor=green,linewidth=2\pslinewidth,Vmax=0,Vmin=0](-6.1,-6.1)(6.1,6.1) +\end{pspicture*} +\end{LTXexample} + + +\begin{LTXexample}[pos=t] +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=lightgray!40](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[-1 -3 1][1 1 -3][-1 2 2]},N=9,linecolor=red,points=1000,posArrow=0.1,Pas=0.015] +\psEquipotential[Q={[-1 -3 1][1 1 -3][-1 2 2]},linecolor=blue](-6,-6)(6,6) +\psEquipotential[Q={[-1 -3 1][1 1 -3][-1 2 2]},linecolor=green,Vmin=-5,Vmax=-5,linewidth=2\pslinewidth](-6,-6)(6,6) +\end{pspicture*} +\end{LTXexample} + + + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 -2 0][-1 2 0]},linecolor=red] +\psEquipotential[Q={[1 -2 0][-1 2 0]},linecolor=blue](-5,-5)(5,5) +\psEquipotential[Q={[1 -2 0][-1 2 0]},linecolor=green,Vmin=0,Vmax=0](-5,-5)(5,5) +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 -2 0][1 2 0]},linecolor=red,N=15,points=500] +\psEquipotential[Q={[1 -2 0][1 2 0]},linecolor=blue,Vmin=0,Vmax=20,stepV=2](-5,-5)(5,5) +\psEquipotential[Q={[1 -2 0][1 2 0]},linecolor=green,Vmin=9,Vmax=9](-5,-5)(5,5) +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-10,-5)(6,5) +\psframe*[linecolor=lightgray!40](-10,-5)(6,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[600 -60 0 false][-4 0 0] },N=50,points=500,runit=0.8] +\psEquipotential[Q={[600 -60 0 false][-4 0 0]},linecolor=blue,Vmax=100,Vmin=50,stepV=2](-10,-5)(6,5) +\psframe*(-10,-5)(-9.5,5) +\rput(0,0){\textcolor{white}{\large$-$}} +\multido{\rA=4.75+-0.5}{20}{\rput(-9.75,\rA){\textcolor{white}{\large$+$}}} +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-6,-5)(6,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 -2 -2][1 -2 2][1 2 2][1 2 -2]},linecolor={[HTML]{006633}}] +\psEquipotential[Q={[1 -2 -2][1 -2 2][1 2 2][1 2 -2]},Vmax=15,Vmin=0,stepV=1,linecolor=blue](-6,-6)(6,6) +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 2 0][1 1 1.732][1 -1 1.732][1 -2 0][1 -1 -1.732][1 1 -1.732]},linecolor=red] +\psEquipotential[Q={[1 2 0][1 1 1.732 12][1 -1 1.732][1 -2 0][1 -1 -1.732][1 1 -1.732]},linecolor=blue,Vmax=50,Vmin=0,stepV=5](-5,-5)(5,5) +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 2 0][1 1 1.732][1 -1 1.732][1 -2 0][1 -1 -1.732][1 1 -1.732][-1 0 0]},linecolor=red] +\psEquipotential[Q={[1 2 0][1 1 1.732 12][1 -1 1.732][1 -2 0][1 -1 -1.732][1 1 -1.732][-1 0 0]},Vmax=40,Vmin=-10,stepV=5,linecolor=blue](-5,-5)(5,5) +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-6,-5)(6,5) +\psframe*[linecolor=green!20](-6,-5)(6,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 -4 0][1 -2 0 12][1 0 0][1 2 0][1 4 0]},linecolor=red] +\psEquipotential[Q={[1 -4 0][1 -2 0][1 0 0][1 2 0][1 4 0]},linecolor=blue,Vmax=30,Vmin=0,stepV=2](-7,-5)(7,5) +\end{pspicture*} +\end{LTXexample} + + + +\clearpage +\section{Liste der optionalen Argumente f\"ur \texttt{pst-electricfield}} + +\xkvview{family=pst-electricfield,columns={key,type,default}} + +\nocite{*} +\bgroup +\raggedright +\bibliographystyle{plain} +\bibliography{pst-electricfield-doc} +\egroup + + +\printindex + + + + +\end{document} diff --git a/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-docEN.pdf b/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-docEN.pdf Binary files differnew file mode 100644 index 00000000000..404bfd094b4 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-docEN.pdf diff --git a/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-docEN.tex b/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-docEN.tex new file mode 100644 index 00000000000..1aab052e4bf --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-docEN.tex @@ -0,0 +1,332 @@ +%% $Id: pst-electricfield-docFR.tex 336 2010-05-29 18:38:59Z herbert $ +\documentclass[11pt,english,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings + headexclude,footexclude,oneside]{pst-doc} +\usepackage[latin1]{inputenc} +\usepackage{pst-electricfield} + +\usepackage{pst-electricfield} +\usepackage{pst-func} +\usepackage{pst-exa}% only when running pst2pdf +\usepackage{esint} + + +\let\pstEFfv\fileversion +\lstset{pos=t,language=PSTricks, + morekeywords={psElectricfield,psEquipotential},basicstyle=\footnotesize\ttfamily} +\newcommand\Cadre[1]{\psframebox[fillstyle=solid,fillcolor=black,linestyle=none,framesep=0]{#1}} +% +\begin{document} + +\title{\texttt{pst-electricfield}} +\subtitle{Electric field lines of charges; v.\pstEFfv} +\author{Juergen Gilg\\ Manuel Luque\\Patrice Megret\\Herbert Vo\ss} +%\docauthor{Juergen Gilg\\Manuel Luque\\Herbert Vo\ss} +\date{\today} +\maketitle + + +\section{Method based on electric flux (Patrice M�gret)} + +Equipotential surfaces and E-field lines can be drawn by using the package \LPack{pst-func} and the command \Lcs{psplotImp}\verb+[options](x1,y1)(x2,y2)+. + +The following explanations describe the theory on which this is based. + + +Gauss theorem states that the electric flux across a closed surface $S$ and defined by: +\begin{equation}\label{pm-eq-a} +\psi = \oiint\limits_S \vec{D} \cdot \vec{u}_n \mathrm{d} S = Q +\end{equation} +is equal to the real charge $Q$ inside $S$. As a consequence, in place where there is no charge ($Q=0$), the electric flux is a conservative quantity. + + +A tube of flux is a tube constructed on D-field lines and without charge, the flux going inside any cross-section of the tube is equal to the flux going outside any cross-section of the tube. This means that, by following a tube of a given flux, we automatically follow a D-field line. By using this technique, it is thus possible to obtain a scalar equation that describes the D-field lines. This equation is an implicit equation and can be derived for systems with simple geometrical properties. + +Here the analysis will be limited to point charges and the D-field lines will thus be identical to the E-field lines as there is no electric polarization. + + +For a point charge $q$, located at the origin of the coordinate system, the electric field and the potential are given by: +\begin{equation}\label{pm-eq-b} +\vec{E} = \frac{1}{4 \pi \varepsilon_0 \varepsilon_r} q \frac{\vec{r}}{|\vec{r}|^3} +\end{equation} +\begin{equation}\label{pm-eq-c} +V = \frac{1}{4 \pi \varepsilon_0 \varepsilon_r} \frac{q}{r} +\end{equation} + +The flux across a portion of a sphere of surface $S$ and with an aperture angle $\theta$, is simply given by: +\begin{equation}\label{pm-eq-d} +\psi = \varepsilon_0 \varepsilon_r E S = \frac{1}{2} q (1 -\cos\theta) +\end{equation} +because $S= 2\pi r^2 (1 - \cos\theta)$ and from (\ref{pm-eq-a}) $4 \pi r^2 \varepsilon_0 \varepsilon_r E =q$. + +\begin{center} +\begin{pspicture}(-3,-3)(3,3) +%\psgrid +\psdot[dotscale=2](0,0) +\uput[-135](0,0){$q$} +\psaxes[labels=none,ticks=none]{->}(0,0)(-2.5,-2.5)(2.5,2.5)[$x$,-90][$y$,0] +\pswedge(0,0){2}{-30}{30} +\psarc{->}(0,0){1}{0}{30} +\rput(1.2,0.2){$\theta$} +\rput(2.2,0.7){$S$} +\end{pspicture} +\end{center} + +To find the implicit expression of the E-field lines, it is sufficient to express the flux invariance: +\begin{equation}\label{pm-eq-e} +\psi(x,y) = \frac{1}{2} q (1 -\cos\theta) = \mathrm{cte} +\end{equation} +This relation simply shows that E-field lines correspond to $\theta=\mathrm{cte}$, so that they are clearly radial lines. + +For the E-field lines in the $xy$ plane, expression (\ref{pm-eq-e}) in Cartesian coordinates is: +\begin{equation}\label{pm-eq-f} +\frac{x}{\sqrt{x^2+y^2}} = \mathrm{cte} +\end{equation} + +For the equipotential surface, relation (\ref{pm-eq-c}) is already in implicit form, therefor $V=\mathrm{cte}$ is the wanted equation: +\begin{equation}\label{pm-eq-g} +\frac{1}{\sqrt{x^2+y^2}} = \mathrm{cte} +\end{equation} + +The following graph shows the field and equipotential for this point charge obtained by implicit plotting of functions (\ref{pm-eq-f}) and (\ref{pm-eq-g}). It is clear that the E-field lines are radial ones and the equipotential surfaces cross the $xy$ plane along circles orthogonal to the E-field lines. +\begin{center} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +% \psElectricfield[Q={[1 0 0]}] +% \psEquipotential[Q={[1 0 0]}](-5,-5)(5,5) +\multido{\r=-1+0.1}{20}{% +\psplotImp[linestyle=solid,linecolor=blue](-6,-6)(6,6){% +x y 2 exp x 2 exp add sqrt div \r \space sub}} +\multido{\r=0.0+0.1}{10}{% +\psplotImp[linestyle=solid,linecolor=red](-6,-6)(6,6){% +x 2 exp y 2 exp add sqrt 1 exch div \r \space sub}} +\end{pspicture*} +\end{center} + + +\begin{verbatim} +%% E-field lines +\multido{\r=-1+0.1}{20}{% +\psplotImp[linestyle=solid,linecolor=blue](-6,-6)(6,6){% +x y 2 exp x 2 exp add sqrt div \r \space sub}} + +%% equipotential +\multido{\r=0.0+0.1}{10}{% +\psplotImp[linestyle=solid,linecolor=red](-6,-6)(6,6){% +x 2 exp y 2 exp add sqrt 1 exch div \r \space sub}} +\end{verbatim} + + + +Let's now generalize to point charges distributed arbitrarily along a \textbf{line}. The charge $i$ is $q_i$ and is placed at $(x_i,0)$. +\begin{center} +\begin{pspicture}(0,-3)(12,3) +%\psgrid +\psset{dotscale=2} +\dotnode(0,0){NA}\nput{-45}{NA}{$q_1$} +\dotnode(2,0){NB}\nput{-90}{NB}{$q_2$} +\dotnode(5,0){NC}\nput{-90}{NC}{$q_n$} +\dotnode[linecolor=red](4,2){ND}\nput{90}{ND}{$P(x,y)$} +\ncline{NA}{ND}\naput{$r_1,\theta_1$} +\ncline{NB}{ND}\nbput{$r_2,\theta_2$} +\ncline{NC}{ND}\nbput{$r_n,\theta_n$} +\psaxes[labels=none,ticks=none]{->}(0,0)(0,-2.5)(11,2.5)[$x$,-90][$y$,0] +\psarc{->}(5,0){0.7}{0}{116.5} +\rput(6,0.5){$\theta_n$} +\dotnode[linecolor=blue](4,-2){NE} +\nccurve[ncurv=2,linecolor=green!40!black]{ND}{NE} +\end{pspicture} +\end{center} + +This problem possesses a cylindrical symmetry: it is thus sufficient to study the field and the potential in $xy$ half-plane and the complete results are obtained by rotation around the $x$-axis. + +By rotation around $x$-axis, the E-field line in $P$ creates a tube of flux. The flux across any surface including $P(x,y)$ and crossing $x$-axis beyond the last charge (the trace of this surface in the $xy$ plane is drawn in green) is obtained from (\ref{pm-eq-d}): +\begin{equation}\label{pm-eq-h} +\psi = \frac{1}{2} \sum_{i=1}^{n} q_i (1 -\cos\theta_i) +\end{equation} + +E-field lines are easily computed by the condition $\psi = \mathrm{cte}$, which is expressed as: +\begin{equation}\label{pm-eq-i} +\sum_{i=1}^{n} q_i \frac{x-x_i}{\sqrt{(x-x_i)^2+y^2}} = \mathrm{cte} +\end{equation} +in Cartesian coordinates. + +For the potential, the solution is trivial: +\begin{equation}\label{pm-eq-j} +\sum_{i=1}^{n} \frac{q_i}{\sqrt{(x-x_i)^2+y^2}} = \mathrm{cte} +\end{equation} + +\begin{center} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 -2 0][-1 2 0]}] +\psEquipotential[Q={[1 -2 0][-1 2 0]},Vmin=-2,Vmax=2,stepV=0.25](-5,-5)(5,5) +\multido{\r=-2+0.2}{20}{% +\psplotImp[linestyle=solid,linecolor=red](-6,-6)(6,6){% +x 2 add dup 2 exp y 2 exp add sqrt div 1 mul +x -2 add dup 2 exp y 2 exp add sqrt div -1 mul add +\r \space sub}} +\multido{\r=-0.5+0.1}{10}{% +\psplotImp[linestyle=solid,linecolor=blue](-6,-6)(6,6){% +x 2 add 2 exp y 2 exp add sqrt 1 exch div 1 mul +x -2 add 2 exp y 2 exp add sqrt 1 exch div -1 mul add +\r \space sub}} +\end{pspicture*} +\end{center} + +\begin{verbatim} +%% E-field lines +\multido{\r=-2+0.2}{20}{% +\psplotImp[linestyle=solid,linecolor=red](-6,-6)(6,6){% +x 2 add dup 2 exp y 2 exp add sqrt div 1 mul +x -2 add dup 2 exp y 2 exp add sqrt div -1 mul add +\r \space sub}} +%% equipotential +\multido{\r=-0.5+0.1}{10}{% +\psplotImp[linestyle=solid,linecolor=blue](-6,-6)(6,6){% +x 2 add 2 exp y 2 exp add sqrt 1 exch div 1 mul +x -2 add 2 exp y 2 exp add sqrt 1 exch div -1 mul add +\r \space sub}} +\end{verbatim} + + +The last example corresponds to one charge $+1$ in $(-2,0)$ and one charge $-1$ in $(2,0)$. Here we have superposed the results obtained by implicit functions and those obtained by the direct integration of the equations. +The superposition is perfect, but the method of implicit function is quite slow. Moreover, this method is limited to problem with cylindrical symmetry. + + +\section{Examples} + +\begin{LTXexample}[pos=t] +\begin{pspicture*}(-6,-6)(6,6) +\psframe*[linecolor=lightgray!50](-6,-6)(6,6) +\psgrid[subgriddiv=0,gridcolor=gray,griddots=10] +\psElectricfield[Q={[-1 -2 2][1 2 2][-1 2 -2][1 -2 -2]},linecolor=red] +\psEquipotential[Q={[-1 -2 2][1 2 2][-1 2 -2][1 -2 -2]},linecolor=blue](-6.1,-6.1)(6.1,6.1) +\psEquipotential[Q={[-1 -2 2][1 2 2][-1 2 -2][1 -2 -2]},linecolor=green,linewidth=2\pslinewidth,Vmax=0,Vmin=0](-6.1,-6.1)(6.1,6.1) +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t] +\begin{pspicture*}(-6,-6)(6,6) +\psframe*[linecolor=lightgray!50](-6,-6)(6,6) +\psgrid[subgriddiv=0,gridcolor=gray,griddots=10] +\psElectricfield[Q={[-1 -2 2 false][1 2 2 false][-1 2 -2 false][1 -2 -2 false]},radius=1.5pt,linecolor=red] +\psEquipotential[Q={[-1 -2 2][1 2 2][-1 2 -2][1 -2 -2]},linecolor=blue](-6,-6)(6,6) +\psEquipotential[Q={[-1 -2 2][1 2 2][-1 2 -2][1 -2 -2]},linecolor=green,linewidth=2\pslinewidth,Vmax=0,Vmin=0](-6.1,-6.1)(6.1,6.1) +\end{pspicture*} +\end{LTXexample} + + +\begin{LTXexample}[pos=t] +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=lightgray!40](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[-1 -3 1][1 1 -3][-1 2 2]},N=9,linecolor=red,points=1000,posArrow=0.1,Pas=0.015] +\psEquipotential[Q={[-1 -3 1][1 1 -3][-1 2 2]},linecolor=blue](-6,-6)(6,6) +\psEquipotential[Q={[-1 -3 1][1 1 -3][-1 2 2]},linecolor=green,Vmin=-5,Vmax=-5,linewidth=2\pslinewidth](-6,-6)(6,6) +\end{pspicture*} +\end{LTXexample} + + + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 -2 0][-1 2 0]},linecolor=red] +\psEquipotential[Q={[1 -2 0][-1 2 0]},linecolor=blue](-5,-5)(5,5) +\psEquipotential[Q={[1 -2 0][-1 2 0]},linecolor=green,Vmin=0,Vmax=0](-5,-5)(5,5) +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 -2 0][1 2 0]},linecolor=red,N=15,points=500] +\psEquipotential[Q={[1 -2 0][1 2 0]},linecolor=blue,Vmin=0,Vmax=20,stepV=2](-5,-5)(5,5) +\psEquipotential[Q={[1 -2 0][1 2 0]},linecolor=green,Vmin=9,Vmax=9](-5,-5)(5,5) +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-10,-5)(6,5) +\psframe*[linecolor=lightgray!40](-10,-5)(6,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[600 -60 0 false][-4 0 0] },N=50,points=500,runit=0.8] +\psEquipotential[Q={[600 -60 0 false][-4 0 0]},linecolor=blue,Vmax=100,Vmin=50,stepV=2](-10,-5)(6,5) +\psframe*(-10,-5)(-9.5,5) +\rput(0,0){\textcolor{white}{\large$-$}} +\multido{\rA=4.75+-0.5}{20}{\rput(-9.75,\rA){\textcolor{white}{\large$+$}}} +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-6,-5)(6,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 -2 -2][1 -2 2][1 2 2][1 2 -2]},linecolor={[HTML]{006633}}] +\psEquipotential[Q={[1 -2 -2][1 -2 2][1 2 2][1 2 -2]},Vmax=15,Vmin=0,stepV=1,linecolor=blue](-6,-6)(6,6) +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 2 0][1 1 1.732][1 -1 1.732][1 -2 0][1 -1 -1.732][1 1 -1.732]},linecolor=red] +\psEquipotential[Q={[1 2 0][1 1 1.732 12][1 -1 1.732][1 -2 0][1 -1 -1.732][1 1 -1.732]},linecolor=blue,Vmax=50,Vmin=0,stepV=5](-5,-5)(5,5) +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 2 0][1 1 1.732][1 -1 1.732][1 -2 0][1 -1 -1.732][1 1 -1.732][-1 0 0]},linecolor=red] +\psEquipotential[Q={[1 2 0][1 1 1.732 12][1 -1 1.732][1 -2 0][1 -1 -1.732][1 1 -1.732][-1 0 0]},Vmax=40,Vmin=-10,stepV=5,linecolor=blue](-5,-5)(5,5) +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-6,-5)(6,5) +\psframe*[linecolor=green!20](-6,-5)(6,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 -4 0][1 -2 0 12][1 0 0][1 2 0][1 4 0]},linecolor=red] +\psEquipotential[Q={[1 -4 0][1 -2 0][1 0 0][1 2 0][1 4 0]},linecolor=blue,Vmax=30,Vmin=0,stepV=2](-7,-5)(7,5) +\end{pspicture*} +\end{LTXexample} + + + + +\clearpage +\section{List of all optional arguments for \texttt{pst-electricfield}} + +\xkvview{family=pst-electricfield,columns={key,type,default}} + +\nocite{*} +\bgroup +\raggedright +\bibliographystyle{plain} +\bibliography{pst-electricfield-doc} +\egroup + + +\printindex + + + + + + + +\end{document} diff --git a/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-docFR.pdf b/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-docFR.pdf Binary files differnew file mode 100644 index 00000000000..135289389e6 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-docFR.pdf diff --git a/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-docFR.tex b/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-docFR.tex new file mode 100644 index 00000000000..921a3513ae6 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-electricfield/pst-electricfield-docFR.tex @@ -0,0 +1,495 @@ +%% $Id: pst-electricfield-docFR.tex 336 2010-05-29 18:38:59Z herbert $ +\documentclass[11pt,english,french,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings + headexclude,footexclude,oneside]{pst-doc} +\usepackage[latin1]{inputenc} +\usepackage{pst-electricfield} + +\usepackage{pst-electricfield} +\usepackage{pst-func} +\usepackage{pst-exa}% only when running pst2pdf +\usepackage{esint} + + +\let\pstEFfv\fileversion +\lstset{pos=t,language=PSTricks, + morekeywords={psElectricfield,psEquipotential},basicstyle=\footnotesize\ttfamily} +\newcommand\Cadre[1]{\psframebox[fillstyle=solid,fillcolor=black,linestyle=none,framesep=0]{#1}} +% +\begin{document} + +\title{\texttt{pst-electricfield}} +\subtitle{Electric field lines of charges; v.\pstEFfv} +\author{Juergen Gilg\\ Manuel Luque\\Patrice Megret\\Herbert Vo\ss} +%\docauthor{Juergen Gilg\\Manuel Luque\\Herbert Vo\ss} +\date{\today} +\maketitle + + +\begin{abstract} +Le package \texttt{pst-electricfield} a pour objet de tracer l'allure des lignes de champ et des +�quipotentielles d'un ensemble de charges ponctuelles. Ce package est n� d'une discussion sur le +trac� des lignes de champ et des �quipotentielles avec PStricks sur +\url{http://www.tug.org/pipermail/pstricks/}. Diff�rentes m�thodes sont possibles et ont �t� +utilis�es lors de cet �change, elles seront expos�es dans cette documentation. + +Pour ce package, le trac� des lignes de champ a �t� mod�lis� avec la m�thode d'Euler qui permet +d'une part une pr�cision satisfaisante et d'autre part une grande rapidit� du trac�. La r�solution +num�rique\footnote{L'algorithme a �t� adapt� de celui utilis� dans la commande +\textsf{$\backslash$psplotImp} du package \textsf{pst-func}.} de l'�quation implicite du potentiel +$V(x,y)=\Sigma V_i$ a permis le trac� des �quipotentielles, ce calcul est le plus long. Le package +comprend deux commandes, l'une pour le trac� des lignes de champ et l'autre celui des �quipotentielles, +on pourra ne peut pas �tre p�nalis� par la dur�e des calculs si on se limite au trac� des lignes de champ. + +Chaque charge est caract�ris�e par sa valeur $q_i$ et sa position $(x_i,y_i)$. Le choix du nombre de +charges est quelconque, la dur�e des calculs pour le trac� des �quipotentielles augmente avec ce nombre. +\end{abstract} + +\section{M�thode propos�e par Patrice M�gret} +Utilisation du package \LPack{pst-func} et de la commande \Lcs{psplotImp}\verb+[options](x1,y1)(x2,y2)+ +pour tracer les lignes de champ \textbf{et} les �quipotentielles. Comment d�duire la fonction +implicite permettant le trac� des lignes de champ � partir de l'expression du potentiel ? + + + + + +Le th�or�me de Gauss indique que le flux �lectrique � travers une surface ferm�e $S$ et d�fini par la relation: +\begin{equation}\label{pm-eq-a} +\psi = \oiint\limits_S \vec{D} \cdot \vec{u}_n \mathrm{d} S = Q +\end{equation} +est �gal � la charge r�elle $Q$ � l'int�rieur de $S$. Il en r�sulte qu'en dehors des charges ($Q=0$), le flux �lectrique est conservatif. + +Un tube de flux est un tube qui est b�ti sur des lignes de d�placement �lectrique $\vec{D}$ et en dehors des charges le flux entrant dans ce tube est �gal au flux sortant vu la conservation du flux. + +En suivant un tube � flux constant, on suit donc aussi une ligne de champ $\vec{D}$ et c'est cette d�marche qui sera utilis�e pour trouver les expressions implicites des lignes de champ dans des configurations g�om�triques simples. + +Dans notre cas, nous nous limiterons � des charges ponctuelles et les lignes de d�placement �lectrique seront donc identiques aux lignes de champ �lectrique vu l'absence de polarisation. + + +Pour une charge ponctuelle $q$, plac�e � l'origine du syst�me de coordonn�es, le champ �lectrique et le potentiel sont donn�s par: +\begin{equation}\label{pm-eq-b} +\vec{E} = \frac{1}{4 \pi \varepsilon_0 \varepsilon_r} q \frac{\vec{r}}{|\vec{r}|^3} +\end{equation} +\begin{equation}\label{pm-eq-c} +V = \frac{1}{4 \pi \varepsilon_0 \varepsilon_r} \frac{q}{r} +\end{equation} + +Le flux au travers une calotte sph�rique de surface $S$ et dont le demi-angle d'ouverture est $\theta$, est alors simplement �gal: +\begin{equation}\label{pm-eq-d} +\psi = \varepsilon_0 \varepsilon_r E S = \frac{1}{2} q (1 -\cos\theta) +\end{equation} +car $S= 2\pi r^2 (1 - \cos\theta)$ et en vertu de (\ref{pm-eq-a}) $4 \pi r^2 \varepsilon_0 \varepsilon_r E =q$. + +\begin{center} +\begin{pspicture}(-3,-3)(3,3) +%\psgrid +\psdot[dotscale=2](0,0) +\uput[-135](0,0){$q$} +\psaxes[labels=none,ticks=none]{->}(0,0)(-2.5,-2.5)(2.5,2.5)[$x$,-90][$y$,0] +\pswedge(0,0){2}{-30}{30} +\psarc{->}(0,0){1}{0}{30} +\rput(1.2,0.2){$\theta$} +\rput(2.2,0.7){$S$} +\end{pspicture} +\end{center} + +Pour trouver une expression implicite des lignes de champ, il suffit d'exprimer la constance du flux, ce qui s'�crit: +\begin{equation}\label{pm-eq-e} +\psi(x,y) = \frac{1}{2} q (1 -\cos\theta) = \mathrm{cte} +\end{equation} +On voit tout de suite que les lignes de champ correspondent � $\theta=\mathrm{cte}$, elles sont donc bien radiales. + +Ainsi, pour les lignes de champ dans le plan $xy$, on a simplement en repassant aux coordonn�es cart�siennes: +\begin{equation}\label{pm-eq-f} +\frac{x}{\sqrt{x^2+y^2}} = \mathrm{cte} +\end{equation} + +Pour les �quipotentielles, la relation (\ref{pm-eq-c}) est d�j� sous la forme implicite et il suffit d'exprimer $V=\mathrm{cte}$, ce qui donne: +\begin{equation}\label{pm-eq-g} +\frac{1}{\sqrt{x^2+y^2}} = \mathrm{cte} +\end{equation} + +La figure suivante montre les lignes de champ et les �quipotentielles pour une charge ponctuelle en $(0,0)$. On constate bien que les �quations implicites donnent des lignes de champ radiales et des �quipotentielles circulaires, orthogonales aux lignes de champ. + +\begin{center} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 0 0]}] +\psEquipotential[Q={[1 0 0]}](-5,-5)(5,5) +\multido{\r=-1+0.1}{20}{% +\psplotImp[linestyle=solid,linecolor=blue](-6,-6)(6,6){% +x y 2 exp x 2 exp add sqrt div \r \space sub}} +\multido{\r=0.0+0.1}{10}{% +\psplotImp[linestyle=solid,linecolor=red](-6,-6)(6,6){% +x 2 exp y 2 exp add sqrt 1 exch div \r \space sub}} +\end{pspicture*} +\end{center} + + +\begin{verbatim} +%% lignes de champ +\multido{\r=-1+0.1}{20}{% +\psplotImp[linestyle=solid,linecolor=blue](-6,-6)(6,6){% +x y 2 exp x 2 exp add sqrt div \r \space sub}} + +%% �quipotentielles +\multido{\r=0.0+0.1}{10}{% +\psplotImp[linestyle=solid,linecolor=red](-6,-6)(6,6){% +x 2 exp y 2 exp add sqrt 1 exch div \r \space sub}} +\end{verbatim} + + + +Nous allons maintenant g�n�raliser � une distribution de charges ponctuelles en \textbf{ligne}. Soit un ensemble de charges ponctuelles $q_i$ localis�es aux points $(x_i,0)$. +\begin{center} +\begin{pspicture}(0,-3)(12,3) +%\psgrid +\psset{dotscale=2} +\dotnode(0,0){NA}\nput{-45}{NA}{$q_1$} +\dotnode(2,0){NB}\nput{-90}{NB}{$q_2$} +\dotnode(5,0){NC}\nput{-90}{NC}{$q_n$} +\dotnode[linecolor=red](4,2){ND}\nput{90}{ND}{$P(x,y)$} +\ncline{NA}{ND}\naput{$r_1,\theta_1$} +\ncline{NB}{ND}\nbput{$r_2,\theta_2$} +\ncline{NC}{ND}\nbput{$r_n,\theta_n$} +\psaxes[labels=none,ticks=none]{->}(0,0)(0,-2.5)(11,2.5)[$x$,-90][$y$,0] +\psarc{->}(5,0){0.7}{0}{116.5} +\rput(6,0.5){$\theta_n$} +\dotnode[linecolor=blue](4,-2){NE} +\nccurve[ncurv=2,linecolor=green!40!black]{ND}{NE} +\end{pspicture} +\end{center} + +La sym�trie de ce probl�me est cylindrique; il suffit donc d'�tudier les lignes de champ et le potentiel dans le demi-plan $xy$ et par rotation autour de l'axe $x$, on a la solution compl�te. + +Par rotation autour de l'axe $x$, la ligne de champ qui passe par le point $P$ engendre un tube de flux dont le flux passant par une surface couvercle quelconque passant par $P(x,y)$ et coupant l'axe $x$ au del� de la derni�re charge (cette surface coupe le plan $xy$ selon l'arc en vert) vaut � partir de (\ref{pm-eq-d}): +\begin{equation}\label{pm-eq-h} +\psi = \frac{1}{2} \sum_{i=1}^{n} q_i (1 -\cos\theta_i) +\end{equation} + +Les lignes de champ s'obtiennent simplement en exprimant $\psi = \mathrm{cte}$, soit en coordonn�es cart�siennes: +\begin{equation}\label{pm-eq-i} +\sum_{i=1}^{n} q_i \frac{x-x_i}{\sqrt{(x-x_i)^2+y^2}} = \mathrm{cte} +\end{equation} + +Pour le potentiel, la solution est triviale: +\begin{equation}\label{pm-eq-j} +\sum_{i=1}^{n} \frac{q_i}{\sqrt{(x-x_i)^2+y^2}} = \mathrm{cte} +\end{equation} + +\begin{center} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 -2 0][-1 2 0]}] +\psEquipotential[Q={[1 -2 0][-1 2 0]},Vmin=-2,Vmax=2,stepV=0.25](-5,-5)(5,5) +\multido{\r=-2+0.2}{20}{% +\psplotImp[linestyle=solid,linecolor=red](-6,-6)(6,6){% +x 2 add dup 2 exp y 2 exp add sqrt div 1 mul +x -2 add dup 2 exp y 2 exp add sqrt div -1 mul add +\r \space sub}} +\multido{\r=-0.5+0.1}{10}{% +\psplotImp[linestyle=solid,linecolor=blue](-6,-6)(6,6){% +x 2 add 2 exp y 2 exp add sqrt 1 exch div 1 mul +x -2 add 2 exp y 2 exp add sqrt 1 exch div -1 mul add +\r \space sub}} +\end{pspicture*} +\end{center} + +\begin{verbatim} +%% lignes de champ +\multido{\r=-2+0.2}{20}{% +\psplotImp[linestyle=solid,linecolor=red](-6,-6)(6,6){% +x 2 add dup 2 exp y 2 exp add sqrt div 1 mul +x -2 add dup 2 exp y 2 exp add sqrt div -1 mul add +\r \space sub}} +%% �quipotentielles +\multido{\r=-0.5+0.1}{10}{% +\psplotImp[linestyle=solid,linecolor=blue](-6,-6)(6,6){% +x 2 add 2 exp y 2 exp add sqrt 1 exch div 1 mul +x -2 add 2 exp y 2 exp add sqrt 1 exch div -1 mul add +\r \space sub}} +\end{verbatim} + + +L'exemple ci-dessus correspond � une charge $+1$ en $(-2,0)$ et une charge $-1$ en $(2,0)$ et montre la superposition des r�sultats par la m�thode des fonctions implicites et celle de l'int�gration directe. La correspondance est parfaite, mais la m�thode des fonctions implicites est plus lente et est limit�e � un probl�me � sym�trie cylindrique (charges en ligne). + + + + + +\newpage +\section{M�thode propos�e par Gilg Juergen} +Utilisation du package \LPack{pstricks-add} et de la commande \Lcs{psplotDiffEqn} pour tracer les lignes de champ \textbf{et} les �quipotentielles. + +Soit le syst�me de charges ponctuelles $\{q_1, \,\ldots, \,q_n\}$ et leurs vecteurs position $\{\vec{r}_1, \,\ldots, \,\vec{r}_n\}$. +\begin{equation*} +\vec{r}_1=\begin{pmatrix} +x_1\\y_1 +\end{pmatrix},\,\ldots,\, +\vec{r}_n=\begin{pmatrix} +x_n\\y_n +\end{pmatrix};\, +\vec{r}=\begin{pmatrix} +x\\y +\end{pmatrix} +\end{equation*} +Le principe de superposition nous donne le champ r�sultant en un point $M$ d�fini par $\overrightarrow{r}(M)$ : +\begin{equation} +\vec{E} = \frac{1}{4 \pi \varepsilon_0 \varepsilon_r} \sum\limits_{i=1}^n q_i \frac{\vec{r} - \vec{r}_i}{|\vec{r} - \vec{r}_i|^3} +\end{equation} +Expression des composantes vectorielles : +\begin{equation} +\vec{E} =\begin{pmatrix} +E_x\\E_y +\end{pmatrix}= + \frac{1}{4 \pi \varepsilon_0 \varepsilon_r} \sum\limits_{i=1}^n \frac{q_i}{\sqrt{(x-x_i)^2+(y-y_i)^2}^3}\begin{pmatrix} + x-x_i\\y-y_i + \end{pmatrix} +\end{equation} +ou +\begin{align*} +E_x&=\frac{1}{4 \pi \varepsilon_0 \varepsilon_r} \sum\limits_{i=1}^n \frac{q_i(x-x_i)}{\sqrt{(x-x_i)^2+(y-y_i)^2}^3}\\ +E_y&=\frac{1}{4 \pi \varepsilon_0 \varepsilon_r} \sum\limits_{i=1}^n \frac{q_i(y-y_i)}{\sqrt{(x-x_i)^2+(y-y_i)^2}^3} +\end{align*} +Les lignes de champs sont tangentes \`{a} $\vec{E}$. +\begin{equation*} +\frac{\text{d}y}{\text{d}x}=\frac{E_y}{E_x} +\end{equation*} +C'est une \'{e}quation diff�rentielle d'ordre 1. + +Utilisons la commande : \verb!\psplotDiffEqn! pour dessiner les lignes de champ. +\begin{verbatim} +\pstVerb{% +/q1 1 def +/q2 -0.5 q1 mul def +/xA 1.8 def +} + +\multido{\rx=-250+10.2}{50}{% +\psplotDiffEqn[% +linewidth=0.25pt,% +linecolor=red,% +varsteptol=.001,% +method=rk4,% +algebraic, +plotpoints=200% +]{-20}{20}{\rx}{% +(q1*(y[0])/(sqrt((x+xA)^2+(y[0])^2))^3+q2*(y[0])/(sqrt((x-xA)^2+(y[0])^2))^3)% +/% +(q1*(x+xA)/(sqrt((x+xA)^2+(y[0])^2))^3+q2*(x-xA)/(sqrt((x-xA)^2+(y[0])^2))^3)% +}% +} +\pscircle*(!xA 0){0.25}\pscircle*(!xA neg 0){0.25} +\end{verbatim} + +Le potentiel : +\begin{equation} +\vec{E}=\begin{pmatrix} +E_x\\E_y +\end{pmatrix}=-\text{grad}\, V=-\nabla V =-\begin{pmatrix} +\frac{\partial V}{\partial x}\\[4pt] +\frac{\partial V}{\partial y} +\end{pmatrix} +\end{equation} +ou +\begin{align*} +E_x=-\frac{\partial V}{\partial x}\\ +E_y=-\frac{\partial V}{\partial y} +\end{align*} + +\textbf{�quipotentielles} +\begin{equation*} +V=\text{Cste} +\end{equation*} +Les �quipotentielles sont orthogonales aux lignes de champ. +\begin{equation*} +\frac{\text{d}y}{\text{d}x}=-\frac{E_x}{E_y} +\end{equation*} +C'est une \'{e}quation diff�rentielle d'ordre 1. On utilise encore : \verb!\psplotDiffEqn! pour tracer les �quipotentielles. +\begin{verbatim} +\pstVerb{% +/q1 1 def +/q2 1 q1 mul def +/xA 3.25 def +} +\multido{\rx=-4.1+0.75}{20}{% +\psplotDiffEqn[% +linewidth=0.85pt,% +linecolor=blue,% +varsteptol=.00001,% +method=rk4,% +algebraic, +plotpoints=300% +]{-6}{6}{\rx}{% +-((q1*(x+xA)/(sqrt((x+xA)^2+(y[0])^2))^3+q2*(x-xA)/(sqrt((x-xA)^2+(y[0])^2))^3)) +/ +(q1*(y[0])/(sqrt((x+xA)^2+(y[0])^2))^3+q2*(y[0])/(sqrt((x-xA)^2+(y[0])^2))^3)% +}% +} +\end{verbatim} +Le fichier d'exp�rimentation est ici : \url{http://tug.org/mailman/htdig/pstricks/2010/007468.html} + +C'est une m�thode simple, mais qui n'est pas facilement g�n�ralisable, ce qui a motiv� l'�laboration de ce package. + +\section{Les lignes de champ} +Elles se tracent avec la commande : \verb+\psElectricfield[options]+, les param�tres sont les suivants : +\begin{enumerate} + \item Les charges, les coordonn�es de leurs positions et le nombre de lignes partant ou aboutissant sur + chacune d'elles sont introduites par le m�me param�tre + $\mathsf{Q=\{[q_1\, x_1\, y_1\, N_1] [q_2\, x_2\, y_2\, N_2]\ldots[q_i\, x_i\, y_i\, N_i]\ldots [q_n\, x_n\, y_n\, N_n]\}}$. + Le nombre de lignes est optionnel, s'il n'y a rien, on prend par d�faut \textsf{N=19}, ce qui correspond � + 360/18=20\degres{} entre deux lignes partant(ou aboutissant) de(sur) chaque charge. + \item La couleur et l'�paisseur des lignes se r�glent avec les param�tres usuels de PStricks : \Lkeyword{linecolor} + et \Lkeyword{linewidth}. + \item Le nombre de points de chaque ligne \textsf{points=400} et le pas du trac� \textsf{Pas=0.025}, ce sont les + valeurs par d�faut qu'il vous appartient de modifier, si elles ne vous donnent pas satisfaction. + \item La position des fl�ches sur une ligne de champ peut �tre ajust�e avec le param�tre \textsf{posArrow=0.25}, + qui repr�sente la fraction du nombre de points de la ligne � partir de la charge. + \item Par d�faut le rayon des charges est proportionnel � la valeur de $|q|$. Si on souhaite d�sactiver cette + relation, il suffit de positionner le bool�en \textsf{chargeradius} � \textsf{false} : \textsf{chargeradius=false}. Le rayon de la charge est li� � \textsf{runit}, c'est donc cette valeur qu'il faudra modifier pour agrandir ou diminuer ce rayon. +\end{enumerate} +\section{Les �quipotentielles} +Elles se tracent avec la commande : \Lcs{psEquipotential}[options](xmin,ymin)(xmax,ymax)+. Les options de charge comprennent +les m�mes param�tres \textsf{Q} que pour les lignes de champ, il est inutile d'indiquer~\textsf{N}. +\begin{enumerate} + \item Il faut pr�voir les valeurs maximale et minimale du potentiel : \textsf{Vmax=3} et \textsf{Vmin=-1} : valeurs par d�faut. + \item L'intervalle entre deux valeurs de potentiel \textsf{stepV=0.5}, ce qui d�terminera le nombre d'�quipotentielles. + \item La couleur et l'�paisseur des �quipotentielles se r�glent avec les param�tres usuels de PStricks : \textsf{linecolor} et \textsf{linewidth}. + \item Le param�tre \textsf{stepFactor=0.67} fixe la largeur du pas du balayage horizontal et vertical du domaine choisi, + \textsf{(xmin,ymin)(xmax,ymax)}, lors de la r�solution num�rique de $\mathsf{V(x,y)=Cste}$, il d�termine la continuit� du trac�. + \item Pour dessiner une �quipotentielle particuli�re, par exemple $V=0$, il suffit de donner la m�me valeur � + \textsf{Vmax=0} et \textsf{Vmin=0} et de choisir une couleur diff�rente des autres. +\end{enumerate} + +\section{Exemples} + +\begin{LTXexample}[pos=t] +\begin{pspicture*}(-6,-6)(6,6) +\psframe*[linecolor=lightgray!50](-6,-6)(6,6) +\psgrid[subgriddiv=0,gridcolor=gray,griddots=10] +\psElectricfield[Q={[-1 -2 2][1 2 2][-1 2 -2][1 -2 -2]},linecolor=red] +\psEquipotential[Q={[-1 -2 2][1 2 2][-1 2 -2][1 -2 -2]},linecolor=blue](-6.1,-6.1)(6.1,6.1) +\psEquipotential[Q={[-1 -2 2][1 2 2][-1 2 -2][1 -2 -2]},linecolor=green,linewidth=2\pslinewidth,Vmax=0,Vmin=0](-6.1,-6.1)(6.1,6.1) +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t] +\begin{pspicture*}(-6,-6)(6,6) +\psframe*[linecolor=lightgray!50](-6,-6)(6,6) +\psgrid[subgriddiv=0,gridcolor=gray,griddots=10] +\psElectricfield[Q={[-1 -2 2 false][1 2 2 false][-1 2 -2 false][1 -2 -2 false]},radius=1.5pt,linecolor=red] +\psEquipotential[Q={[-1 -2 2][1 2 2][-1 2 -2][1 -2 -2]},linecolor=blue](-6,-6)(6,6) +\psEquipotential[Q={[-1 -2 2][1 2 2][-1 2 -2][1 -2 -2]},linecolor=green,linewidth=2\pslinewidth,Vmax=0,Vmin=0](-6.1,-6.1)(6.1,6.1) +\end{pspicture*} +\end{LTXexample} + + +\begin{LTXexample}[pos=t] +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=lightgray!40](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[-1 -3 1][1 1 -3][-1 2 2]},N=9,linecolor=red,points=1000,posArrow=0.1,Pas=0.015] +\psEquipotential[Q={[-1 -3 1][1 1 -3][-1 2 2]},linecolor=blue](-6,-6)(6,6) +\psEquipotential[Q={[-1 -3 1][1 1 -3][-1 2 2]},linecolor=green,Vmin=-5,Vmax=-5,linewidth=2\pslinewidth](-6,-6)(6,6) +\end{pspicture*} +\end{LTXexample} + + + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 -2 0][-1 2 0]},linecolor=red] +\psEquipotential[Q={[1 -2 0][-1 2 0]},linecolor=blue](-5,-5)(5,5) +\psEquipotential[Q={[1 -2 0][-1 2 0]},linecolor=green,Vmin=0,Vmax=0](-5,-5)(5,5) +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 -2 0][1 2 0]},linecolor=red,N=15,points=500] +\psEquipotential[Q={[1 -2 0][1 2 0]},linecolor=blue,Vmin=0,Vmax=20,stepV=2](-5,-5)(5,5) +\psEquipotential[Q={[1 -2 0][1 2 0]},linecolor=green,Vmin=9,Vmax=9](-5,-5)(5,5) +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-10,-5)(6,5) +\psframe*[linecolor=lightgray!40](-10,-5)(6,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[600 -60 0 false][-4 0 0] },N=50,points=500,runit=0.8] +\psEquipotential[Q={[600 -60 0 false][-4 0 0]},linecolor=blue,Vmax=100,Vmin=50,stepV=2](-10,-5)(6,5) +\psframe*(-10,-5)(-9.5,5) +\rput(0,0){\textcolor{white}{\large$-$}} +\multido{\rA=4.75+-0.5}{20}{\rput(-9.75,\rA){\textcolor{white}{\large$+$}}} +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-6,-5)(6,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 -2 -2][1 -2 2][1 2 2][1 2 -2]},linecolor={[HTML]{006633}}] +\psEquipotential[Q={[1 -2 -2][1 -2 2][1 2 2][1 2 -2]},Vmax=15,Vmin=0,stepV=1,linecolor=blue](-6,-6)(6,6) +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 2 0][1 1 1.732][1 -1 1.732][1 -2 0][1 -1 -1.732][1 1 -1.732]},linecolor=red] +\psEquipotential[Q={[1 2 0][1 1 1.732 12][1 -1 1.732][1 -2 0][1 -1 -1.732][1 1 -1.732]},linecolor=blue,Vmax=50,Vmin=0,stepV=5](-5,-5)(5,5) +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-5,-5)(5,5) +\psframe*[linecolor=green!20](-5,-5)(5,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 2 0][1 1 1.732][1 -1 1.732][1 -2 0][1 -1 -1.732][1 1 -1.732][-1 0 0]},linecolor=red] +\psEquipotential[Q={[1 2 0][1 1 1.732 12][1 -1 1.732][1 -2 0][1 -1 -1.732][1 1 -1.732][-1 0 0]},Vmax=40,Vmin=-10,stepV=5,linecolor=blue](-5,-5)(5,5) +\end{pspicture*} +\end{LTXexample} + +\begin{LTXexample}[pos=t,vsep=5mm] +\psset{unit=0.75cm} +\begin{pspicture*}(-6,-5)(6,5) +\psframe*[linecolor=green!20](-6,-5)(6,5) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10] +\psElectricfield[Q={[1 -4 0][1 -2 0 12][1 0 0][1 2 0][1 4 0]},linecolor=red] +\psEquipotential[Q={[1 -4 0][1 -2 0][1 0 0][1 2 0][1 4 0]},linecolor=blue,Vmax=30,Vmin=0,stepV=2](-7,-5)(7,5) +\end{pspicture*} +\end{LTXexample} + + +\clearpage +\section{Liste des arguments optionnel pour \texttt{pst-electricfield}} + +\xkvview{family=pst-electricfield,columns={key,type,default}} + +\nocite{*} +\bgroup +\raggedright +\bibliographystyle{plain} +\bibliography{pst-electricfield-doc} +\egroup + + +\printindex + + + + +\end{document} diff --git a/Master/texmf-dist/dvips/pst-electricfield/pst-electricfield.pro b/Master/texmf-dist/dvips/pst-electricfield/pst-electricfield.pro new file mode 100755 index 00000000000..8a73b36e96e --- /dev/null +++ b/Master/texmf-dist/dvips/pst-electricfield/pst-electricfield.pro @@ -0,0 +1,243 @@ +%% $Id: pst-3dplot.pro 236 2009-12-31 08:59:43Z herbert $ +%% +%% This is file `pst-electricfield.pro', +%% +%% IMPORTANT NOTICE: +%% +%% Package `pst-electricfield.tex' +%% Jürgen Gilg +%% Manuel Luque +%% Patrice Megrét +%% Herbert Voss +%% +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN archives +%% in directory macros/latex/base/lppl.txt. +%% +%% DESCRIPTION: +%% `pst-electricfield' is a PSTricks package to draw fields of charges +%% +%% version 0.04 / 2010-06-08 Herbert Voss <hvoss _at_ tug.org> +%% +% +/tx@EFieldDict 60 dict def +tx@EFieldDict begin +% +% helper functions +/getX { xCoor exch get } def +/getY { yCoor exch get } def +/getQ { Qcharges exch get } def +% /getR { Radius exch get } def +% +/setValues { + /xCoor [ + 0 1 NoQ { + /i exch def + /qi QXYN i get def + qi 1 get} for + ] def + /yCoor [ + 0 1 NoQ { + /i exch def + /qi QXYN i get def + qi 2 get} for + ] def +} def +/Radius {xP i getX sub yP i getY sub Pyth} def +% +/fleche { + gsave + x2 y2 moveto + y2 y1 sub x2 x1 sub atan rotate % 1 1 scale + -1 CLW mul 2 CLW mul rlineto + 7 CLW mul -2 CLW mul rlineto + -7 CLW mul -2 CLW mul rlineto + closepath + fill + grestore +} def +% +%% syntaxe : any isbool --> booleen +/isbool { type (booleantype) cvn eq } def +%% syntaxe : any isinteger --> booleen +/isinteger { type (integertype) cvn eq } def +% +/drawChargeCircle { % qi x y r on the stack + 0 360 arc + gsave + 0 ge {1}{0} ifelse setgray fill + grestore + 0 setgray stroke +} def +% +/Electricfield { + % extraction des donnees = qi, xi, yi, Ni, plotCharge + /NoQ QXYN length 1 sub def % nombre de charges -1 + /NL [ % les lignes + 0 1 NoQ { + /i exch def + /qi QXYN i get def + qi length 3 eq + { /nL N def } + { qi 3 get dup isinteger + { /nL ED } + { pop /nL N def } ifelse } ifelse + nL } for + ] def + /plotCharge [ % les lignes + 0 1 NoQ { + /i exch def + /qi QXYN i get def + qi length 3 eq + { /pC true def } + { qi length 4 eq + { qi 3 get dup isbool + { /pC ED } + { pop /pC true def } ifelse } + { qi 4 get /pC ED } ifelse } ifelse + pC } for + ] def + /Qcharges [ % les charges + 0 1 NoQ { + /i exch def + /qi QXYN i get def + qi 0 get} for + ] def + setValues + 0 0 moveto + /Lignes [ % on stroke dans un tableau toutes lignes + 0 1 NoQ { + /iQ ED % on considere chacune des charges + /dAngle 360 NL iQ get 1 sub div def + /pasX iQ getQ 0 ge {Pas} {Pas neg} ifelse def + /xStart iQ getX def + /yStart iQ getY def + [ + 0 dAngle 360 dAngle sub { + /iA ED % on en fait le tour + /xP xStart pasX iA cos mul add def + /yP yStart pasX iA sin mul add def + [ NbrePoints { % nombre de points + 0 0 + 0 1 NoQ { + /i ED + i getQ xP i getX sub mul Radius 3 exp Div add exch + i getQ yP i getY sub mul Radius 3 exp Div add exch + } for + /Ex ED + /Ey ED + /NormeE Ex Ey Pyth def + /dX Ex NormeE div pasX mul def + /dY Ey NormeE div pasX mul def + /xP xP dX add def /yP yP dY add def + [ xP xUnit mul yP yUnit mul ] + } repeat + ] + } for + ] + } for + ] def +% on lit les tableaux et on dessine les lignes + 0 1 Lignes length 1 sub { + /iQ ED % chaque charge + /qi iQ getQ def + /Lignes_Champ Lignes iQ get def + 0 1 Lignes_Champ length 1 sub { + /iLi ED + /Ligne_Champ Lignes_Champ iLi get def % une ligne + Ligne_Champ 0 get aload pop moveto % xP yP + 1 1 Ligne_Champ length 1 sub { + /iCompteur exch def + Ligne_Champ iCompteur get aload pop lineto + } for + stroke + % les fleches + Ligne_Champ dup length 1 sub posArrow mul cvi get aload pop + /y1 ED + /x1 ED + Ligne_Champ dup length 1 sub posArrow mul cvi 1 add get aload pop + /y2 ED + /x2 ED + /X1 x2 def + /X2 x1 def + /Y1 y2 def + /Y2 y1 def + qi 0 le { /x1 X1 def /x2 X2 def /y1 Y1 def /y2 Y2 def} if + fleche + } for + } for + 0 1 NoQ { + /i exch def + Qcharges i get dup /qi ED + xCoor i get xUnit mul + yCoor i get yUnit mul % now on stack: qi x y + plotCharge i get % relative or absolute radii? + { ChargeRadius qi abs mul drawChargeCircle } + { ChargeRadius 0 gt + { ChargeRadius drawChargeCircle } + { pop pop pop } ifelse } ifelse + } for +} def % Electricfield +% +% +/Equipotential { +% extraction des donnees = qi, xi, yi, + /NoQ QXYN length 1 sub def % nombre de charges -1 + /Qcharges [ % les charges + 0 1 NoQ { + /i exch def + /qi QXYN i get def + qi 0 get} for + ] def + setValues + /Func { + 0 + 0 1 NoQ {/i exch def + /qi QXYN i get def + qi 0 get + Radius div add } for + 9 mul % V en volts q en nC + V sub + } def + % code extrait de pst-func + /xPixel xMax xMin sub xUnit mul round cvi def + /yPixel yMax yMin sub yUnit mul round cvi def + /dx xMax xMin sub xPixel div def + /dy yMax yMin sub yPixel div def + /setpixel { + dy div exch + dx div exch + LW 2 div 0 360 arc fill + } bind def +% + Vmin StepV Vmax { + /V ED + /VZ true def % suppose that F(x,y)>=0 + /xP xMin def + /yP yMin def + Func 0.0 lt { /VZ false def } if % first value + xMin dx StepFactor mul xMax { + /xP exch def + yMin dy StepFactor mul yMax { + /yP exch def + Func 0 lt + { VZ { xP yP setpixel /VZ false def} if } + { VZ {}{ xP yP setpixel /VZ true def } ifelse } ifelse + } for + } for +% + /xP xMin def /y yMin def Func 0.0 lt { /VZ false def } if % erster Wert + yMin dy StepFactor mul yMax { + /yP exch def + xMin dx StepFactor mul xMax { + /xP exch def + Func 0 lt + { VZ { xP yP setpixel /VZ false def} if } + { VZ {}{ xP yP setpixel /VZ true def } ifelse } ifelse + } for + } for + } for +} def % Equipotential +% +end % tx@EFieldDict +%
\ No newline at end of file diff --git a/Master/texmf-dist/source/generic/pst-electricfield/Makefile b/Master/texmf-dist/source/generic/pst-electricfield/Makefile new file mode 100644 index 00000000000..ecb4d158cd3 --- /dev/null +++ b/Master/texmf-dist/source/generic/pst-electricfield/Makefile @@ -0,0 +1,84 @@ + +# `Makefile' for `pst-magneticfield.pdf', Rolf Niepraschk, 2010/05/21 + +.SUFFIXES : .tex .ltx .dvi .ps .pdf .eps .pro + +PACKAGE = pst-electricfield +MAIN = $(PACKAGE)-doc +LANGUAGES = DE EN FR +PRO = $(PACKAGE).pro + + +empty= +space=$(empty) $(empty) +DOC_SOURCES = $(addprefix $(PACKAGE)-doc,$(LANGUAGES)$(space)) +DOC_SOURCES := $(addsuffix .tex, $(DOC_SOURCES)) +DOCS = $(DOC_SOURCES:.tex=.pdf) + +TDS = ~/PSTricks/PSTricks-TDS + +LATEX = pst2pdf +PDFLATEX = pdflatex +OPTIONS= --Iext=.png --Iscale=0.5 --DPI=150 +#--noImages + +ARCHNAME = $(PACKAGE)-$(shell date +%Y%m%d) + +ARCHFILES = $(PACKAGE).sty $(PACKAGE).tex $(PACKAGE).pro $(DOC_SOURCES) \ + README Changes Makefile + +all : $(DOCS) clean + +%.pdf : %.tex + $(LATEX) $(basename $<) $(OPTIONS) +# makeindex -s gglo.ist -t $(basename $<)-pdf.glg -o $(basename $<)-pdf.gls $(basename $<)-pdf.glo + makeindex -s pst-doc.ist -t $(basename $<)-pdf.ilg -o $(basename $<)-pdf.ind $(basename $<)-pdf.idx + bibtex $(basename $<)-pdf + $(PDFLATEX) $(basename $<)-pdf + $(PDFLATEX) $(basename $<)-pdf + mv $(basename $<)-pdf.pdf $(basename $<).pdf + rm -f $(basename $<)-tmp.* $(basename $<)-pdf.* + +clean : + $(RM) $(foreach i,$(DOC_SOURCES:.tex=),$(addprefix $i, \ + .log .plog .preamble .aux .glg .glo .gls .ilg .idx .ind .tmp .toc .out .blg .bbl)) + +veryclean : clean + $(RM) $(foreach i,$(DOC_SOURCES:.tex=),$(addprefix $i, \ + .pdf .bbl .blg)) + +arch : + zip $(ARCHNAME).zip $(ARCHFILES) + +ifneq ($(strip $(PRO)),) +installPRO : + @echo "Installiere PRO-Dateien ($(PRO))..." + cp -u Changes $(TDS)/dvips/$(PACKAGE)/ + cp -u $(PACKAGE).pro $(TDS)/dvips/$(PACKAGE)/ + cp -u $(PACKAGE).pro ~/Links/dvips-local/ +else +installPRO : + @: +endif + +tds : installPRO + @echo "Installiere TeX-Zeug..." + cp -u Changes $(TDS)/doc/generic/$(PACKAGE)/ + cp -u README $(TDS)/doc/generic/$(PACKAGE)/ + cp -u *.pdf $(TDS)/doc/generic/$(PACKAGE)/ +# + cp -u Changes $(TDS)/tex/latex/$(PACKAGE)/ + cp -u $(PACKAGE).sty $(TDS)/tex/latex/$(PACKAGE)/ +# + cp -u Changes $(TDS)/tex/generic/$(PACKAGE)/ + cp -u $(PACKAGE).tex $(TDS)/tex/generic/$(PACKAGE)/ +# + cp -u Changes $(TDS)/source/$(PACKAGE)/ + cp -u *-doc??.tex $(TDS)/source/$(PACKAGE)/ + cp -u $(MAIN).bib $(TDS)/source/$(PACKAGE)/ + cp -u Makefile $(TDS)/source/$(PACKAGE)/ + +debug : + @echo $(DOC_SOURCES) + +# EOF diff --git a/Master/texmf-dist/source/generic/pst-electricfield/Makefile.latex b/Master/texmf-dist/source/generic/pst-electricfield/Makefile.latex new file mode 100644 index 00000000000..c2f5fb548b9 --- /dev/null +++ b/Master/texmf-dist/source/generic/pst-electricfield/Makefile.latex @@ -0,0 +1,98 @@ + +# `Makefile' for `pst-electricfield-doc.pdf', hv, 201?/??/?? + +.SUFFIXES : .tex .ltx .dvi .ps .pdf .eps .pro + +PACKAGE = pst-electricfield +MAIN = $(PACKAGE)-doc + +LANGUAGES = DE FR EN + +ifneq ($(LANGUAGES),) + DOC_SOURCES = $(addprefix $(PACKAGE)-doc,$(LANGUAGES)) +else + DOC_SOURCES = $(MAIN) +endif + +DOC_SOURCES := $(addsuffix .tex, $(DOC_SOURCES)) +DOCS = $(DOC_SOURCES:.tex=.pdf) + +TDS = ~/PSTricks/PSTricks-TDS + +LATEX = latex + +DVIPS = dvips + +PS2PDF = GS_OPTIONS=-dAutoRotatePages=/None ps2pdf + +ARCHNAME = $(PACKAGE)-$(shell date +%Y%m%d) + +PRO = $(PACKAGE).pro + +ARCHFILES = $(PACKAGE).sty $(PACKAGE).tex $(PACKAGE).pro $(DOC_SOURCES) \ + README Changes Makefile + +all : $(DOCS) clean + +%.pdf : %.ps + $(PS2PDF) $< $@ + +%.ps : %.dvi + $(DVIPS) -o $@ $< + +%.dvi : %.tex + $(LATEX) $< +# $(LATEX) $< +# if ! test -f $(basename $<).glo ; then touch $(basename $<).glo; fi +# if ! test -f $(basename $<).idx ; then touch $(basename $<).idx; fi +# makeindex -s gglo.ist -t $(basename $<).glg -o $(basename $<).gls $(basename $<).glo + makeindex -s pst-doc.ist -t $(basename $<).ilg -o $(basename $<).ind \ + $(basename $<).idx + bibtex $(basename $<) + $(LATEX) $< + $(LATEX) $< + +clean : + $(RM) $(foreach i,$(DOC_SOURCES:.tex=),$(addprefix $i, \ + .log .aux .glg .glo .gls .ilg .idx .ind .tmp .toc .out .blg .bbl)) + +veryclean : clean + $(RM) $(foreach i,$(DOC_SOURCES:.tex=),$(addprefix $i, \ + .pdf .bbl .blg)) + +arch : + zip $(ARCHNAME).zip $(ARCHFILES) + +ifneq ($(strip $(PRO)),) +installPRO : + @echo "Installiere PRO-Dateien ($(PRO))..." + cp -u Changes $(TDS)/dvips/$(PACKAGE)/ + cp -u $(PACKAGE).pro $(TDS)/dvips/$(PACKAGE)/ + cp -u $(PACKAGE).pro ~/Links/dvips-local/ +else +installPRO : + @: +endif + +tds : installPRO + @echo "Installiere TeX-Zeug..." + cp -u Changes $(TDS)/doc/generic/$(PACKAGE)/ + cp -u README $(TDS)/doc/generic/$(PACKAGE)/ + cp -u *.pdf $(TDS)/doc/generic/$(PACKAGE)/ +# + cp -u Changes $(TDS)/tex/latex/$(PACKAGE)/ + cp -u $(PACKAGE).sty $(TDS)/tex/latex/$(PACKAGE)/ +# + cp -u Changes $(TDS)/tex/generic/$(PACKAGE)/ + cp -u $(PACKAGE).tex $(TDS)/tex/generic/$(PACKAGE)/ +# + cp -u Changes $(TDS)/source/$(PACKAGE)/ + cp -u $(MAIN)*.tex $(TDS)/source/$(PACKAGE)/ + cp -u $(MAIN).bib $(TDS)/source/$(PACKAGE)/ + cp -u Makefile $(TDS)/source/$(PACKAGE)/ + +debug : + @echo $(DOC_SOURCES) + @echo $(DOCS) + +# EOF diff --git a/Master/texmf-dist/source/generic/pst-electricfield/Makefile.pst2pdf b/Master/texmf-dist/source/generic/pst-electricfield/Makefile.pst2pdf new file mode 100644 index 00000000000..ecb4d158cd3 --- /dev/null +++ b/Master/texmf-dist/source/generic/pst-electricfield/Makefile.pst2pdf @@ -0,0 +1,84 @@ + +# `Makefile' for `pst-magneticfield.pdf', Rolf Niepraschk, 2010/05/21 + +.SUFFIXES : .tex .ltx .dvi .ps .pdf .eps .pro + +PACKAGE = pst-electricfield +MAIN = $(PACKAGE)-doc +LANGUAGES = DE EN FR +PRO = $(PACKAGE).pro + + +empty= +space=$(empty) $(empty) +DOC_SOURCES = $(addprefix $(PACKAGE)-doc,$(LANGUAGES)$(space)) +DOC_SOURCES := $(addsuffix .tex, $(DOC_SOURCES)) +DOCS = $(DOC_SOURCES:.tex=.pdf) + +TDS = ~/PSTricks/PSTricks-TDS + +LATEX = pst2pdf +PDFLATEX = pdflatex +OPTIONS= --Iext=.png --Iscale=0.5 --DPI=150 +#--noImages + +ARCHNAME = $(PACKAGE)-$(shell date +%Y%m%d) + +ARCHFILES = $(PACKAGE).sty $(PACKAGE).tex $(PACKAGE).pro $(DOC_SOURCES) \ + README Changes Makefile + +all : $(DOCS) clean + +%.pdf : %.tex + $(LATEX) $(basename $<) $(OPTIONS) +# makeindex -s gglo.ist -t $(basename $<)-pdf.glg -o $(basename $<)-pdf.gls $(basename $<)-pdf.glo + makeindex -s pst-doc.ist -t $(basename $<)-pdf.ilg -o $(basename $<)-pdf.ind $(basename $<)-pdf.idx + bibtex $(basename $<)-pdf + $(PDFLATEX) $(basename $<)-pdf + $(PDFLATEX) $(basename $<)-pdf + mv $(basename $<)-pdf.pdf $(basename $<).pdf + rm -f $(basename $<)-tmp.* $(basename $<)-pdf.* + +clean : + $(RM) $(foreach i,$(DOC_SOURCES:.tex=),$(addprefix $i, \ + .log .plog .preamble .aux .glg .glo .gls .ilg .idx .ind .tmp .toc .out .blg .bbl)) + +veryclean : clean + $(RM) $(foreach i,$(DOC_SOURCES:.tex=),$(addprefix $i, \ + .pdf .bbl .blg)) + +arch : + zip $(ARCHNAME).zip $(ARCHFILES) + +ifneq ($(strip $(PRO)),) +installPRO : + @echo "Installiere PRO-Dateien ($(PRO))..." + cp -u Changes $(TDS)/dvips/$(PACKAGE)/ + cp -u $(PACKAGE).pro $(TDS)/dvips/$(PACKAGE)/ + cp -u $(PACKAGE).pro ~/Links/dvips-local/ +else +installPRO : + @: +endif + +tds : installPRO + @echo "Installiere TeX-Zeug..." + cp -u Changes $(TDS)/doc/generic/$(PACKAGE)/ + cp -u README $(TDS)/doc/generic/$(PACKAGE)/ + cp -u *.pdf $(TDS)/doc/generic/$(PACKAGE)/ +# + cp -u Changes $(TDS)/tex/latex/$(PACKAGE)/ + cp -u $(PACKAGE).sty $(TDS)/tex/latex/$(PACKAGE)/ +# + cp -u Changes $(TDS)/tex/generic/$(PACKAGE)/ + cp -u $(PACKAGE).tex $(TDS)/tex/generic/$(PACKAGE)/ +# + cp -u Changes $(TDS)/source/$(PACKAGE)/ + cp -u *-doc??.tex $(TDS)/source/$(PACKAGE)/ + cp -u $(MAIN).bib $(TDS)/source/$(PACKAGE)/ + cp -u Makefile $(TDS)/source/$(PACKAGE)/ + +debug : + @echo $(DOC_SOURCES) + +# EOF diff --git a/Master/texmf-dist/tex/generic/pst-electricfield/pst-electricfield.tex b/Master/texmf-dist/tex/generic/pst-electricfield/pst-electricfield.tex new file mode 100644 index 00000000000..d4fae4a2202 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pst-electricfield/pst-electricfield.tex @@ -0,0 +1,115 @@ +%% Package `pst-electricfield.tex' +%% +%% Manuel Luque +%% Jürgen Gilg +%% Patrice Megret +%% Herbert Voß +%% +%% This program can be redistributed and/or modified under +%% the terms of the LaTeX Project Public License Distributed +%% from CTAN archives in directory macros/latex/base/lppl.txt. +%% +%% A PSTricks related package to draw electric field lines +%% It uses the method from Euler +%% +\csname PSTElectricFieldLoaded\endcsname +\let\PSTElectricFieldLoaded\endinput +% +% Requires some packages +\ifx\PSTricksLoaded\endinput\else \input pstricks \fi +\ifx\MultidoLoaded\endinput\else \input multido.tex\fi +\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi +% +\def\fileversion{0.13} +\def\filedate{2010/06/09} +\message{`pst-electricfield' v\fileversion, \filedate\space (ml,jg,hv)} +% +\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax +% +\SpecialCoor +\pst@addfams{pst-electricfield} + +%% prologue for postcript +\pstheader{pst-electricfield.pro}% + +%% [q1 x1 y1 N1 plotCharge] [q2 x2 y2 N2 plotCharge] [...] etc +%% [charge, coordonnees, nombre de lignes, plotCircle] +%% number of lines and boolean for the circle are optional +\define@key[psset]{pst-electricfield}{Q}[{[1 -2 0 10][1 1 0][1 0 1 15]}]{\def\psk@electricfieldQ{#1}} +\psset[pst-electricfield]{Q=[1 -2 0 10][1 1 0][1 0 1 15]} +\define@key[psset]{pst-electricfield}{N}[17]{\def\psk@electricfieldN{#1 }} %% par defaut 16 lignes +\psset[pst-electricfield]{N=17} +%% nombre de points du trace +\define@key[psset]{pst-electricfield}{points}[400]{\def\psk@electricfieldpoints{#1 }} +\psset[pst-electricfield]{points=400} +%% pas du trace +\define@key[psset]{pst-electricfield}{Pas}[0.025]{\def\psk@electricfieldPas{#1 }} +\psset[pst-electricfield]{Pas=0.025} +\define@key[psset]{pst-electricfield}{posArrow}{\def\psk@ElectricFieldposArrow{#1 }} +\psset[pst-electricfield]{posArrow=0.25} +% +\def\tx@EFieldDict{ tx@EFieldDict begin } +% +\def\psElectricfield{\pst@object{psElectricfield}} +\def\psElectricfield@i{% + \pst@killglue% + \addbefore@par{radius=1mm}% + \begin@OpenObj% + \pssetlength\pst@dimb\psk@radius + \addto@pscode{% + \tx@EFieldDict + /QXYN [\psk@electricfieldQ] def + /ChargeRadius \pst@number\pst@dimb def + /N \psk@electricfieldN def + /NbrePoints \psk@electricfieldpoints def + /Pas \psk@electricfieldPas def + /posArrow \psk@ElectricFieldposArrow def + /xUnit \pst@number\psxunit def + /yUnit \pst@number\psyunit def + Electricfield + end + }% + \end@OpenObj% + \ignorespaces} + +\define@key[psset]{pst-electricfield}{Vmax}[10]{\def\psk@electricfieldVmax{#1 }} +\psset[pst-electricfield]{Vmax=10} +\define@key[psset]{pst-electricfield}{Vmin}[-10]{\def\psk@electricfieldVmin{#1 }} +\psset[pst-electricfield]{Vmin=-10} +\define@key[psset]{pst-electricfield}{stepV}[2]{\def\psk@electricfieldStepV{#1 }} +\psset[pst-electricfield]{stepV=2} +\define@key[psset]{pst-electricfield}{stepFactor}[0.67]{\def\psk@electricfieldStepFactor{#1 }} +\psset[pst-electricfield]{stepFactor=0.67} +% +\def\psEquipotential{\pst@object{psEquipotential}} +\def\psEquipotential@i(#1,#2)(#3,#4){% + \pst@killglue% + \addbefore@par{radius=1mm}% + \begin@OpenObj% + \pssetlength\pst@dimb\psk@radius + \addto@pscode{% + \tx@EFieldDict + /QXYN [\psk@electricfieldQ] def + /ChargeRadius \pst@number\pst@dimb def + /N \psk@electricfieldN def + /NbrePoints \psk@electricfieldpoints def + /Vmax \psk@electricfieldVmax def + /Vmin \psk@electricfieldVmin def + /StepV \psk@electricfieldStepV def + /StepFactor \psk@electricfieldStepFactor def + /posArrow \psk@ElectricFieldposArrow def + /xUnit \pst@number\psxunit def + /yUnit \pst@number\psyunit def + /LW \pst@number\pslinewidth def + /xMin #1 def + /xMax #3 def + /yMin #2 def + /yMax #4 def + Equipotential + end + }% +\end@OpenObj% + \ignorespaces} +\catcode`\@=\PstAtCode\relax +%% END +\endinput diff --git a/Master/texmf-dist/tex/latex/pst-electricfield/pst-electricfield.sty b/Master/texmf-dist/tex/latex/pst-electricfield/pst-electricfield.sty new file mode 100644 index 00000000000..ebfe4b8fa6b --- /dev/null +++ b/Master/texmf-dist/tex/latex/pst-electricfield/pst-electricfield.sty @@ -0,0 +1,11 @@ +\RequirePackage{pstricks} +\ProvidesPackage{pst-electricfield}[2010/05/15 package wrapper for + pst-electricfield.tex] +\input{pst-electricfield.tex} +\IfFileExists{pst-electricfield.pro}{% + \ProvidesFile{pst-electricfield.pro} + [2010/06/08 v. 0.04, PostScript prologue file (hv)] + \@addtofilelist{pst-electricfield.pro}}{}% +\ProvidesFile{pst-electricfield.tex} + [\filedate\space v\fileversion\space `pst-electricfield' (ml&jg&pm&hv)] +\endinput diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 9e1eced71cb..a32d0d8b386 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -254,7 +254,7 @@ my @TLP_working = qw( pst-2dplot pst-3d pst-3dplot pst-abspos pst-am pst-asr pst-bar pst-barcode pst-bezier pst-blur pst-bspline pst-calendar pst-circ pst-coil pst-cox pst-dbicons pst-diffraction - pst-eps pst-eucl pst-exa pst-fill + pst-electricfield pst-eps pst-eucl pst-exa pst-fill pst-fr3d pst-fractal pst-fun pst-func pst-gantt pst-geo pst-grad pst-infixplot pst-jtree pst-knot pst-labo pst-lens pst-light3d pst-magneticfield pst-math pst-mirror pst-node diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index dbc1a32f352..7566a2da6ae 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -527,7 +527,8 @@ $Master = "$mydir/../.."; 'pst-coil', "&MAKEpst", 'pst-cox', "&MAKEflatten", 'pst-dbicons', "&MAKEpst", - 'pst-diffraction', "&MAKEpst", + 'pst-diffraction', "&MAKEpst", + 'pst-electricfield', "&MAKEpst", 'pst-eps', "&MAKEpst", 'pst-eucl', "&MAKEpst", 'pst-fill', "&MAKEpst", diff --git a/Master/tlpkg/tlpsrc/collection-pstricks.tlpsrc b/Master/tlpkg/tlpsrc/collection-pstricks.tlpsrc index 3bdb5da7903..1e95a3f2bd0 100644 --- a/Master/tlpkg/tlpsrc/collection-pstricks.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-pstricks.tlpsrc @@ -22,6 +22,7 @@ depend pst-coil depend pst-cox depend pst-dbicons depend pst-diffraction +depend pst-electricfield depend pst-eps depend pst-eucl depend pst-exa diff --git a/Master/tlpkg/tlpsrc/pst-electricfield.tlpsrc b/Master/tlpkg/tlpsrc/pst-electricfield.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/pst-electricfield.tlpsrc |