# simple pthon program to generate the Q-matrix

Walter Verbrugggen
Posts:

**22**
In video U Q1 04: The Development of Q-Vectors, R.Distinti describes the actual way to build a matrix

Here is a little python script which does the construction automatic.

https://drive.google.com/file/d/0B_zj9m ... sp=sharing

When you change the vectors to only x and y components, the result gives the dot product in the diagonal top-left to bottom-right

and the cross product on the other diagonal

Here is a little python script which does the construction automatic.

https://drive.google.com/file/d/0B_zj9m ... sp=sharing

When you change the vectors to only x and y components, the result gives the dot product in the diagonal top-left to bottom-right

and the cross product on the other diagonal

## Comments

176Sounds very interesting, I just sent you a request to see the file.

22I forgot to share the file for everybody with the link....

| Cq Cx Cy Cz |

|Dq| | +AqBq+AxBx+AyBy+AzBz +AxBq+AqBx-AzBy+AyBz +AyBq+AzBx+AqBy-AxBz +AzBq-AyBx+AxBy+AqBz |

|Dx| = | +AxBq+AqBx-AzBy+AyBz +AqBq+AxBx+AyBy+AzBz -AzBq+AyBx-AxBy-AqBz +AyBq+AzBx+AqBy-AxBz |

|Dy| | +AyBq+AzBx+AqBy-AxBz +AzBq-AyBx+AxBy+AqBz +AqBq+AxBx+AyBy+AzBz -AxBq-AqBx+AzBy-AyBz |

|Dz| | +AzBq-AyBx+AxBy+AqBz -AyBq-AzBx-AqBy+AxBz +AxBq+AqBx-AzBy+AyBz +AqBq+AxBx+AyBy+AzBz |

gives a matrix for [D] = [AB]*[C]