CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   Rotation using quaternion (

cwang5 June 29, 2010 09:45

Rotation using quaternion
Hi guys,

I am working on a program that would allow 1DoF rotation about an arbitrary axis in 3D space. From what I've been reading on the forum on the 3/6DoF motion solver, it appears that the quaternion method is the best for the job. However, when I implemented the quaternion into my code, the total angle rotated by the quaternion.R() does not match up with the total angle theta that was input into the quaternion in the form quaternion(AxisOfRotation, theta). I'm wondering if I have somehow mis-read the source code in quaternion.H and messed up the quaternion. Any help would be appreciated, thanks in advance.


All times are GMT -4. The time now is 16:30.