Calculation of Electric Field Direction