summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pst-magneticfield
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-23 17:45:15 +0000
committerKarl Berry <karl@freefriends.org>2010-05-23 17:45:15 +0000
commit92340e505f4c0e3f83c00b704210af77705df1ec (patch)
tree9f531ee9fea186426e12be41e5b77b72be3241f6 /Master/texmf-dist/tex/generic/pst-magneticfield
parentfdfa1bfca0c03b6397e20cdc42328953a144b97b (diff)
pst-magneticfield 1.11 (20may10)
git-svn-id: svn://tug.org/texlive/trunk@18433 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pst-magneticfield')
-rw-r--r--Master/texmf-dist/tex/generic/pst-magneticfield/pst-magneticfield.tex35
1 files changed, 22 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-magneticfield/pst-magneticfield.tex b/Master/texmf-dist/tex/generic/pst-magneticfield/pst-magneticfield.tex
index 8d8e583baba..5e18949bd2f 100644
--- a/Master/texmf-dist/tex/generic/pst-magneticfield/pst-magneticfield.tex
+++ b/Master/texmf-dist/tex/generic/pst-magneticfield/pst-magneticfield.tex
@@ -20,7 +20,7 @@
\ifx\MultidoLoaded\endinput\else \input multido.tex\fi
\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi
%
-\def\fileversion{1.10}
+\def\fileversion{1.11}
\def\filedate{2010/05/16}
\message{`pst-magneticfield' v\fileversion, \filedate\space (ml,jg,hv)}
%
@@ -59,7 +59,7 @@
\def\psmagneticfield{\pst@object{psmagneticfield}}
\def\psmagneticfield@i{%
\pst@killglue%
-% \ifPst@AntiHelmholtz\addto@par{N=2}\fi
+ \ifPst@AntiHelmholtz\addbefore@par{N=2}\fi
\begin@SpecialObj%
\pst@Verb{% make it global
/NombreSpires \psk@magneticfieldN\space def
@@ -327,25 +327,28 @@
%
\def\psmagneticfieldThreeD{\pst@object{psmagneticfieldThreeD}}
\def\psmagneticfieldThreeD@i(#1,#2)(#3,#4){%
-% \ifPst@AntiHelmholtz\addto@par{N=2}\fi
+ \ifPst@AntiHelmholtz\addbefore@par{N=2}\fi
\begingroup
\use@par
\ifPst@AntiHelmholtz
+ \ThreeDput{%
+ \psframe*[style=cadre](#1,#2)(#3,#4)
+ \psgrid[style=grille](#1,#2)(#3,#4)}
\pstFPdiv\yA{\psk@magneticfieldR}{2}
+ \ThreeDput[normal=0 1 0](0,\yA,0){%
+ \psarc[linecolor=red,linewidth=1\pslinewidth,linestyle=dashed](0,0){\psk@magneticfieldR}{180}{360}}
+ \ThreeDput[normal=0 1 0](0,-\yA,0){%
+ \psarc[linecolor=red,linewidth=1\pslinewidth,linestyle=dashed](0,0){\psk@magneticfieldR}{180}{360}}
\ThreeDput{%
\begin{psclip}{\psframe(#1,#2)(#3,#4)}
- \psframe*[style=cadre](#1,#2)(#3,#4)
- \psgrid[style=grille](#1,#2)(#3,#4)
\psmagneticfield[drawSelf=false]%
\end{psclip}}
\ThreeDput[normal=0 1 0](0,\yA,0){%
\psarc[linecolor=red,linewidth=3\pslinewidth](0,0){\psk@magneticfieldR}{0}{180}
- \psarc[linecolor=red,linewidth=3\pslinewidth]{<-}(0,0){\psk@magneticfieldR}{80}{90}
- \psarc[linecolor=red,linewidth=1\pslinewidth,linestyle=dashed](0,0){\psk@magneticfieldR}{180}{360}}
+ \psarc[linecolor=red,linewidth=3\pslinewidth]{<-}(0,0){\psk@magneticfieldR}{80}{90}}
\ThreeDput[normal=0 1 0](0,-\yA,0){%
\psarc[linecolor=red,linewidth=3\pslinewidth](0,0){\psk@magneticfieldR}{0}{180}
- \psarc[linecolor=red,linewidth=3\pslinewidth]{->}(0,0){\psk@magneticfieldR}{80}{90}
- \psarc[linecolor=red,linewidth=1\pslinewidth,linestyle=dashed](0,0){\psk@magneticfieldR}{180}{360}}
+ \psarc[linecolor=red,linewidth=3\pslinewidth]{->}(0,0){\psk@magneticfieldR}{80}{90}}
\else
\ifnum\psk@magneticfieldN=1
\def\MF@inter{0}
@@ -356,9 +359,16 @@
\pstFPdiv\yA{\psk@magneticfieldL}{2}
\fi
\ThreeDput{%
+ \psframe*[style=cadre](#1,#2)(#3,#4)
+ \psgrid[style=grille](#1,#2)(#3,#4)}
+ \multido{\iN=1+1,\iS=0+1}{\psk@magneticfieldN}{%
+ \pstFPmul\MF@calcA{\iS}{\MF@inter}
+ \pstFPsub\posSpire{\yA}{\MF@calcA}
+ \ThreeDput[normal=0 1 0](0,\posSpire,0){%
+ \psarc[linecolor=red,linewidth=1\pslinewidth,linestyle=dashed](0,0){\psk@magneticfieldR}{180}{360}}
+ }%
+ \ThreeDput{%
\begin{psclip}{\psframe(#1,#2)(#3,#4)}
- \psframe*[style=cadre](#1,#2)(#3,#4)
- \psgrid[style=grille](#1,#2)(#3,#4)
\psmagneticfield[drawSelf=false]%
\end{psclip}}
\multido{\iN=1+1,\iS=0+1}{\psk@magneticfieldN}{%
@@ -366,8 +376,7 @@
\pstFPsub\posSpire{\yA}{\MF@calcA}
\ThreeDput[normal=0 1 0](0,\posSpire,0){%
\psarc[linecolor=red,linewidth=3\pslinewidth](0,0){\psk@magneticfieldR}{0}{180}
- \psarc[linecolor=red,linewidth=3\pslinewidth]{->}(0,0){\psk@magneticfieldR}{80}{90}
- \psarc[linecolor=red,linewidth=1\pslinewidth,linestyle=dashed](0,0){\psk@magneticfieldR}{180}{360}}%
+ \psarc[linecolor=red,linewidth=3\pslinewidth]{->}(0,0){\psk@magneticfieldR}{80}{90}}
}%
\fi
\endgroup}