CoursElectriciteMagnetisme/Gnuplot/vector.UndipoleAdd.gnu

28 lines
1003 B
Gnuplot

set xrange [-6:6]
set yrange [-6:6]
set iso 37 # taille de la grille de points
set samp 37 # nombre de points utilisés
set zeroaxis
unset key
a = .0001
k = 9e9
# La charge positive
Q = 1e-6
set object 1 circle front at -1,0 size 0.1 fillcolor rgb "black" lw 1
set arrow from -1.06,0 to -0.94,0 nohead
set arrow from -1,-0.07 to -1,0.07 nohead
#set arrow from -1,-6 to -1,6 ls 4 nohead
# La charge négative
q = -1e-6
set object 2 circle front at 1,0 size 0.1 fillcolor rgb "black" lw 1
set arrow from 0.94,0 to 1.06,0 nohead
#set arrow from 1,-6 to 1,6 nohead
# Le graphe
#plot '++' using ($1-1):2:(a*k*Q*$1/($1**2+$2**2)**1.5):(a*k*Q*$2/($1**2+$2**2)**1.5) w vec size .06, 15 filled,\
# '++' using ($1+1):2:(a*k*q*$1/($1**2+$2**2)**1.5):(a*k*q*$2/($1**2+$2**2)**1.5) w vec size .06, 15 filled
plot '++' using 1:2:\
(a*k*Q*($1+1)/(($1+1)**2+$2**2)**1.5+a*k*q*($1-1)/(($1-1)**2+$2**2)**1.5):\
(a*k*Q*$2/(($1+1)**2+$2**2)**1.5+a*k*q*$2/(($1-1)**2+$2**2)**1.5)\
w vect size .06, 15 filled
pause -1