Cross product of two vectors in Python

后端 未结 5 729
盖世英雄少女心
盖世英雄少女心 2021-02-18 13:25

How can I calculate the cross product of two vectors without the use of programming libraries?

E.g given vectors a = (1, 2, 3) and b = (4, 5, 6)

5条回答
  •  孤街浪徒
    2021-02-18 13:49

    If you want to implement the cross product yourself you may see http://en.wikipedia.org/wiki/Vector_cross_product or a math/physics book. Shortly (a1, a2, a3) X (b1, b2, b3) = (a2*b3-a3*b2, a3*b1-a1*b3, a1*b2-a2*b1)

提交回复
热议问题