電気双極子の電場(対数)

関数の定義

q=1.;
h=2.;
r[x_,y_]:=(Sqrt[(x^2)+(y^2)]);
Ex[x_,y_]:=(q/((r[x-h,y])^2))(((x-h))/(r[x-h,y]))-(q/((r[x+h,y])^2))(((x+h))/(r[x+h,y]));
Ey[x_,y_]:=(q/((r[x-h,y])^2))(y/(r[x-h,y]))-(q/((r[x+h,y])^2))(y/(r[x+h,y]));

電場グラフ(対数スケール)

Ran = 2.1;
VectorPlot[{Ex[x,y],Ey[x,y]},{x,-2 Ran,2 Ran},{y,-Ran,Ran},PlotRange->{{-5.,5.},{-2.5,2.5}},AspectRatio->0.5,VectorPoints->{18,9},VectorStyle->Black,VectorScale->{0.2,0.2,Log[#5+2] &},  RegionFunction->Function[{x,y,vx,vy,n},0<n<5],Frame->False]