Started logic for segment_from_x_y_rotation