[pstricks] Re : about pst-electricfield

Kari Eloranta kari.eloranta at me.com
Sun Feb 20 07:34:27 CET 2011


Dear Manuel,
Thank you very, very much. I was only hoping my problem would be solved. I am writing material for my students, and now I am able to send them the text tomorrow. What a beautiful way to start a sunny Sunday morning :-)
I modified the suggested code a bit to maintain symmetry (changed 16 to 15 in \psElectricfield).
 
\begin{center}
\begin{pspicture*}(-4,-4)(4,4)
 \psframe*[linecolor=green!20](-4,-4)(4,4)
 \psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10]
\rput{90}(0,0){\psElectricfield[Q={[2 0 2 15][2 0 -2 15]}]}
 \rput[0](-2,0){\large{$+$}}
 \rput[0](2,0){\large{$+$}}
\end{pspicture*}
\end{center}
Best regards,
 Kari

Dear Kari,

Try with this code :

\documentclass{article}
\usepackage{pst-electricfield}
\begin{document}
\begin{center}
\begin{pspicture*}(-4,-4)(4,4)
 \psframe*[linecolor=green!20](-4,-4)(4,4)
 \psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10]
\rput{90}(0,0){\psElectricfield[Q={[2 0 2 16][2 0 -2 16]}]}
 \rput[0](-2,0){\large{$+$}}
 \rput[0](2,0){\large{$+$}}
\end{pspicture*}
\end{center}
\end{document} 


 Best regards,
 

M.L.

 


 

 

-----E-mail d'origine-----
De : Kari Eloranta <kari.eloranta at me.com>
A : pstricks at tug.org
Envoyé le : Samedi, 19 Février 2011 15:25
Sujet : [pstricks] about pst-electricfield




I have used the pst-electricfield package to draw the field of two positive point charges. However, the code below produces
a line connecting the two charges. I do not think that it should be like that, but more like in http://dev.physicslab.org/Document.aspx?doctype=3&filename=Electrostatics_PointChargesElectricFields.xml.


Am I mistaken? If I am not, is there a way of correcting it?


Best regards,
  Kari




\begin{center}
\begin{pspicture*}(-4,-3)(4,3)
 \psframe*[linecolor=green!20](-4,-3)(4,3)
 \psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10]
 \psElectricfield[Q={[2 -2 0][2 2 0]}]
 \rput[0](-2,0){\large{$+$}} \rput[0](2,0){\large{$+$}}
\end{pspicture*}\label{fig:twoEqPointCharges}\caption{The electric field of two equal positive point charges.}
\end{center}


***************************************
Kari Eloranta
Ketunpolku 1
40400 Jyväskylä
Puh: +358 40 586 7654


***************************************
Kari Eloranta
Ketunpolku 1
40400 Jyväskylä
Puh: +358 40 586 7654





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20110220/d2a0c6ec/attachment.html>


More information about the PSTricks mailing list