% Example from Cheng
% E and V plotted for a static electric dipole.
% Note that they are perpendicular at every intersection!

clf

theta = 0:0.01:2*pi;
polaraxes
title('E (blue) and V (red) of Electric Dipole. Angle \Theta referred to y-axis. ')
hold on

for cv = -2:0.5:2
    rho = cv*sqrt(cos(pi/2-theta));
    polarplot(theta, abs(rho), 'r')
end

for cE = -2:0.5:2
    rho = cE*sin(pi/2-theta).^2;
    polarplot(theta, rho, 'b--')
end
hold off

%
%