CoursElectriciteMagnetisme/Gnuplot/vector.Undipole.gnu

24 lines
806 B
Plaintext
Raw Permalink Normal View History

2024-02-03 20:45:14 +01:00
set xrange [-6:6]
set yrange [-6:6]
set iso 12 # taille de la grille de points
set samp 12 # nombre de points utilisés
set zeroaxis
unset key
a = .0003
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
pause -1