optimize calculate_new_point_in_random_direction