clear all;

e0 = 8.854e-12;
k = 1/(4*pi*e0);
q1 = 1;

[X,Y] = meshgrid([-0.2:0.01:0.2]);


r = sqrt(X.^2+Y.^2);
E = k*q1./r.^2;

rx = X./r;
ry = Y./r;

Ex = E.*rx;
Ey = E.*ry;

figure(1);
quiver(X,Y,Ex,Ey);

figure(2);
contour(X,Y,E);

figure(3);
V = q1./(4*pi*e0*r);
contour(X,Y,V);

