1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
\documentclass[pstricks]{standalone}
\usepackage{pst-contourplot,pst-math,multido}
\begin{document}
% 4 dipôles de Hertz aux sommets d'un carré
% dont les sommets se rapprochent
\multido{\rX=1.1+-0.05}{22}{%
\begin{pspicture}(-6.25,-6.25)(6.25,6.25)
\pstVerb{/t 0 def /k0 2 PI mul def
/xi1 -\rX\space def /xi2 \rX\space def /xi3 -\rX\space def /xi4 \rX\space def
/yi1 -\rX\space def /yi2 \rX\space def /yi3 \rX\space def /yi4 -\rX\space def}%
\psframe*(-6.25,-6.25)(6.25,6.25)
\multido{\rc=-1.1+0.2,\n=0.0+0.1}{11}{
\definecolor{HERTZ}{hsb}{\n,1,1}
\psContourPlot[unit=5,a=0.0125,linewidth=0.01,linecolor=HERTZ,
function=/r1 x xi1 sub dup mul y yi1 sub dup mul add sqrt k0 mul def
/theta1 y yi1 sub x xi1 sub atan def
/r2 x xi2 sub dup mul y yi2 sub dup mul add sqrt k0 mul def
/theta2 y yi2 sub x xi2 sub atan def
/r3 x xi3 sub dup mul y yi3 sub dup mul add sqrt k0 mul def
/theta3 y yi3 sub x xi3 sub atan def
/r4 x xi4 sub dup mul y yi4 sub dup mul add sqrt k0 mul def
/theta4 y yi4 sub x xi4 sub atan def
r1 t sub COS r1 t sub SIN r1 div add theta1 sin dup mul mul
r2 t sub COS r2 t sub SIN r2 div add theta2 sin dup mul mul add
r3 t sub COS r3 t sub SIN r3 div add theta3 sin dup mul mul add
r4 t sub COS r4 t sub SIN r4 div add theta4 sin dup mul mul add
\rc\space sub](-1.25,-1.25)(1.25,1.25)}%
\end{pspicture}}
\end{document}
|