# Thread: X, Y, Z to P, Q, R orthonormal basis (rotation only)

1. ## X, Y, Z to P, Q, R orthonormal basis (rotation only)

Not entirely sure where this should go, as the math is beyond what I ever did. Anyway, I am writing a program to output scripts and one of the data points requires it be in orthonormal basis. However, an XYZ rotation is more intuitive. So I want to have XYZ input and convert that to PQR. I've found some information on Wikipedia and such, but trying to figure it out is making my head hurt! Generally, I have good math comprehension; computation is not always the greatest. I'm starting to ramble. Anyway a cut and past solution would be greatly appreciated. (The lang I am using is MS Visual Basic if that matters.)

2. I have a number of questions/comments:

1. How are you thinking of "an XYZ rotation"? Do you mean rotations about each axis? Or do you mean that you're simply inputting the x, y, and z components?
2. If the latter is the answer to my question # 1 above, then here's another question: the xyz coordinate system IS an orthonormal basis. Is that not adequate?
3. If you need to translate from one orthonormal basis to another orthonormal basis, then you're dealing with a rotation. You need to know what that rotation does to the xyz basis. Then you'll know what it does to any other vector.

3. I would like to enter the X,Y,Z rotations. Degrees around each in, this new system out. I think your signiture said you have programing experiance? My output needs to fit in: Base.Ship (room0, 'ship', (0,-.3*2,2*2),(0,.93,-.34) ,(-1,0,0)). Unfortunatly, I did not write the program that uses the script. As such I am not sure exactly what I am doing, if I had I would have started with xyz. I'll do some more diging if you need more info yet.

4. Yeah, I'm not understanding what you need at all. Can you draw a picture or something? What is the new orthonormal base? I do have programming experience, but I'm not sure that's going to help you much, since it does look like your problem is mathematical in nature.

5. Know python? Like I said I didn't write the program, and the forum where it is developed no one seems sure how to do the crossover either. I can send you the code that reads the script, a working script, but not the 3d engine. (not sure where it is)

6. Hmm. You persist in pushing programming, particularly Python, onto this problem. I'm not going to be able to help you with that, I'm afraid. Someone like undefined might be able to help you, if it is even possible to help with a problem where, apparently, so little of the underlying mathematics is known. I'll point his attention to the thread, and maybe he can help.

Cheers.

7. Thanks, The problem arose and is destend to end up in programing, so that's the only way I can think of to relate to it. I'm also willing to do guess and check, assuming I can get the right equation to play with the variables.