import numpy as np
import math
point1 = np.array([23 , 9])
point2 = np.array([13 , 10.79])
point3 = np.array([17 , 19])
vector1 = point1 - point2
vector2 = point3 - point2
cos_theta = np.dot(vector1, vector2) / (((vector1[0] ** 2 + vector1[1] ** 2) ** 0.5) * ((vector2[0] ** 2 + vector2[1] ** 2) ** 0.5))
theta = np.arccos(cos_theta)
degree = math.degrees(theta)
print('point1 = ',point1)
print('point2 = ',point2)
print('point3 = ',point3)
print('vector1 = ',vector1)
print('vector2 = ',vector2)
print('cos_theta = ',cos_theta)
print('vector1[0] = ',vector1[0])
print('vector1[1] = ',vector1[1])
print('角度余弦是:',cos_theta)
print('弧度是:',theta)
print('角度是:',degree)
import numpy as np
point1 = np.array([13, 10.79])
point2 = np.array([17, 19])
vector = point1 - point2
distance = ((vector[0] ** 2 + vector[1] ** 2) ** 0.5)
print('两点之间的距离是:',distance)