A three-dimensional beam element undergoing finite rotations based on slopes and distance measures