Because you asl for arrow for each field line, so fx,fy arrays are coordinnate where the arrow are drawn. fdx,fdy are vector for the arrow.
Code are added to find fx,fy, fdx and fdy.