[pstricks] Magnetic Fieldlines in wrong direction

Herbert Voss Herbert.Voss at FU-Berlin.DE
Sun May 1 08:27:40 CEST 2011


Am 29.04.2011 15:38, schrieb Thomas Söll 1und1:

> I have tested the following example, but the direction of the fieldlines shows wrong, if the current shows the direction of electrons.
> Do anybody knows how I can change the direction?

the arrow direction was hardcoded in the tex file.
With this version:
http://texnik.dante.de/tex/generic/pst-magneticfield/pst-magneticfield.tex 
(version 1.14 from today)

\documentclass[]{article}
\pagestyle{empty}
\setlength\parindent{0pt}
\newcommand\Cadre[1] 
{\psframebox[fillstyle=solid,fillcolor=black,linestyle=none,framesep=0]{#1}}
\usepackage{pst-magneticfield}
\psset{unit=0.7cm}

\begin{document}
\newpsstyle{grille}{subgriddiv=0,gridcolor=blue!50,griddots=10}
\newpsstyle{cadre}{linecolor=yellow!50}

\addtopsstyle{sensCourant}{arrowscale=2}

\begin{pspicture}(-7,-6)(7,6)
\psmagneticfieldThreeD[N=8,R=2,L=8,pointsB=1200,linecolor=blue,
    pointsS=1000](-7,-8)(7,8)
\end{pspicture}

\addtopsstyle{sensCourant}{arrows=-<}% change direction of the current
\begin{pspicture}(-7,-6)(7,6)
\psmagneticfieldThreeD[N=8,R=2,L=8,pointsB=1200,
     linecolor=blue,pointsS=1000](-7,-8)(7,8)
\end{pspicture}

\end{document}

Herbert


More information about the PSTricks mailing list