def getXY(r, degree):
#Grad in Bogenmaß umrechnen
rad = math.radians(degree)
x = r * math.cos(rad)
y = r * math.sin(rad)
print(x, y)
return x, y
def getRD(x, y):
r = math.sqrt(x**2+y**2)
rad = math.atan2(y, x)
degree = math.degrees(rad)
print(r, degree)
return r, degree
def getxy_RD(x, y, X, Y):
_x, _y = (X-x), (Y-y)
r = math.sqrt(_x**2+_y**2)
rad = math.atan2(_y, _x)
degree = math.degrees(rad)
print(r, degree)
return r, degree
Recommended Posts