给定两个向量,使用叉积创建一组三个正交向量

Given two vectors, use the cross product to create a set of three orthonormal vectors

谁能帮我解决这个问题:

给定两个向量,使用叉积创建一组三个正交向量:

from compas.geometry import cross_vectors
from compas.geometry import angle_vectors
import math as m

v1 = [1,2,3]
v2 = [4,5,6]

替换...并在那里填写:

x1 = #...
x2 = #...
x3 = #...
print(x1)
print(x2)
print(x3)
print(m.degrees(angle_vectors(x1, x2)))
print(m.degrees(angle_vectors(x1, x3)))
print(m.degrees(angle_vectors(x2, x3)))

给定AB,两个独立的向量,一组3个正交向量可以这样得到:

C = A x B
D = A x C

ACD 正交并跨越 3D space

如果你想要 orthonormal:

则归一化

A/|A|C/|C|D/|D|

我让你排序左右手性。