EM fields generated by lightning channels with arbitrary location and slope