Creating uniform random quaternion and multiplication of two quaternions

后端 未结 2 1544
执念已碎
执念已碎 2021-01-25 09:47

I have a python (NumPy) function which creates a uniform random quaternion. I would like to get two quaternion multiplication as 2-dimensional returned array from the same or an

2条回答
  •  醉梦人生
    2021-01-25 10:01

    A 2-Dimensional Array is an array like this: foo[0][1]

    You don't need to do that. Multiplying two quaternions yields one single quaternion. I don't see why you would need a two-dimensional array, or how you would even use one.

    Just have a function that takes two arrays as arguments:

    def multQuat(q1, q2):
    

    then return the relevant array.

    return array([-q2[1] * q1[1], ...])
    

提交回复
热议问题