1

I’m unable to create the electric field lines of a capacitor shown in the uploaded picture. Could anyone give me please a hint? Thanks in advance. This is what i need :-)

schtl
  • 11
  • Welcome to TeX SX! 1) Could you post the code you've got so far? 2) What do you mean exactly with ‘paint the electric field lines’? Adding colour to the lines? The same for everyline? – Bernard Feb 21 '18 at 11:06
  • Have edit the main text and hope the question is now better to understand ... @Bernard: thx for your fast reply – schtl Feb 21 '18 at 11:28
  • The problem is we don't what model is used (and I'm not a physicist). The package allows to plot the electric fields for a finite number of charges. – Bernard Feb 21 '18 at 11:40

1 Answers1

2

This is too long for a comment, and you asked for a nudge, not a solution, so I will post it as an answer.

Looking at the documentation for the package pst-electricfield I found the following example:

\documentclass[border=5pt,pstricks]{standalone} 
\usepackage{pst-electricfield} 
\usepackage{xcolor} 
\begin{document} 
\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{document}

I think that if you can figure out how to create negatively charged wall to the right, and draw a bigger area, you are pretty much done.

That being said, I do not know a great deal about the package (I just find it very cool every time I look at Nice scientific pictures show off)

Edit

The code yields: enter image description here

Edit 2

SO I had a go at creating a capacitor myself, and I think it turned out rather poorly, but here it is anyways:

\documentclass[border=5pt,pstricks]{standalone}
\usepackage{pst-electricfield}
\usepackage{xcolor}
\begin{document}
\begin{pspicture*}(-7,-7)(7,7)
        \psframe*[linecolor=lightgray!40](-10,-5)(6,5)
        \psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10]
        \psElectricfield[Q={
        [-6 -3 0 PtoC][6 3 0 30]
        [-6 -3 1 30][6 3 1 30]
        [-6 -3 2 30][6 3 2 30]
        [-6 -3 3 30][6 3 3 30]
        [-6 -3 -1 30][6 3 -1 30]
        [-6 -3 -2 30][6 3 -2 30]
        [-6 -3 -3 30][6 3 -3 30]
        [-6 -3 0.5 30][6 3 0.5 30]
        [-6 -3 -0.5 30][6 3 -0.5 30]
        [-6 -3 1.5 30][6 3 1.5 30]
        [-6 -3 2.5 30][6 3 2.5 30]
        [-6 -3 3.5 30][6 3 3.5 30]
        [-6 -3 -1.5 30][6 3 -1.5 30]
        [-6 -3 -2.5 30][6 3 -2.5 30]
        [-6 -3 -3.5 30][6 3 -3.5 30]
}
,N=50,points=500,runit=0.8]
\end{pspicture*}
\end{document}

yields:

enter image description here

To create something closer to your wish I would need to know how to control the density of the field lines and how to supress the drawing of the actual charges.