21 lines
547 B
Python
21 lines
547 B
Python
import sympy as sp
|
|
|
|
#Beipsiel aus Luhmann S. 76
|
|
# Ausgangssystem
|
|
p1 = sp.Matrix([110, 100, 110])
|
|
p2 = sp.Matrix([150, 280, 100])
|
|
p3 = sp.Matrix([300, 300, 120])
|
|
p4 = sp.Matrix([170, 100, 100])
|
|
p5 = sp.Matrix([200, 200, 140])
|
|
|
|
# Zielsystem
|
|
P1 = sp.Matrix([153.559, 170.747, 150.768])
|
|
P2 = sp.Matrix([99.026, 350.313, 354.912])
|
|
P3 = sp.Matrix([215.054, 544.420, 319.003])
|
|
P4 = sp.Matrix([179.413, 251.030, 115.601])
|
|
P5 = sp.Matrix([213.431, 340.349, 253.036])
|
|
|
|
#1) Näherungswertberechnung
|
|
m0 = (P2 - P1).norm() / (p2 - p1).norm()
|
|
|
|
print(m0.evalf()) |