I have 2d geometry and corresponding X and Y coordinates. How can find the rotation angle (in degree) of geometry with respect to X or Y axis? Suggestions will always be welcomed.
X = [0.71, 1.41, 2.12, 2.83, 2.12, 2.83, 3.54, 4.24, 4.95, 5.66, 4.95, 4.24, 3.54, 2.83, 2.12, 1.41]
Y = [-0.71, 0.0, 0.71, 1.41, 2.12, 2.83, 2.12, 1.41, 0.71, 0.0, -0.71, 0.0, 0.71, 0.0, -0.71, -1.41]
I have mentioned coordinates as above. My aim is to align the geometry's principal axis to the X or Y coordinates.