import math class Point: def __init__(self, x, y): self.x = x self.y = y def __str__(self): return f"P({self.x},{self.y})" def degree_at_angle(self, P2, P3): at1 = math.atan2(P3.y - self.y, P3.x - self.x) at2 = math.atan2(P2.y - self.y, P2.x - self.x) return abs(math.degrees(at1-at2)) def tan(deg): return math.tan(math.radians(deg)) AD_LENGTH = 1 A = Point(0,0) D = Point(AD_LENGTH, 0) _Bx = (AD_LENGTH * tan(4)) / (tan(10) + tan(4)) _By = _Bx * tan(10) B = Point(_Bx, _By) _Cx = (AD_LENGTH * tan(50)) / (tan(74) + tan(50)) _Cy = _Cx * tan(74) C = Point(_Cx, _Cy) print(A, B, C, D) print("CAB", A.degree_at_angle(C, B)) print("BAD", A.degree_at_angle(D, B)) print("BDA", D.degree_at_angle(A, B)) print("BDC", D.degree_at_angle(C, B)) print("CAD", A.degree_at_angle(C, D)) print("CDA", D.degree_at_angle(C, A)) print("ACD", C.degree_at_angle(D, A)) print("ACB", C.degree_at_angle(B, A)) print("BCD", C.degree_at_angle(B, D)) """ P(0,0) P(0.28396237552505965,0.05007022831113708) P(0.2546934804038715,0.888221722312573) P(1,0) CAB 64.0 BAD 10.000000000000002 BDA 4.000000000000005 BDC 45.999999999999986 CAD 74.0 CDA 49.99999999999999 ACD 55.99999999999999 ACB 18.0 BCD 37.99999999999999 """