AP don't you have an account. It's not so pleasant to speak with the invisible man.
Quote:Original post by Anonymous Poster
Rotation of a vector by a quaternion while it is possible it is about 8 time more expensive than rotation by the matrix equivalent.
False, it's of the same order of magnitude. I benchmark math functions all day long for my math lib. I remember a thread where I compared Q*V against M<-Q then M*V. The balance point was around 6 vertices. So you can easilly infer from these data, that Q*V is roughly 100%-50% slower than M*V. This depends on wether you use the FPU, 3DNow or SSE. Thus if you have less than 6 vertices. Quat*Vert is fine. Else with more verts the Quat to Matrix transfo, will be marginal.
Quote:
If you do not belief me then you look and two mayor graphics apis OpenGL and direct3d they use matrices to form matrix stack, not quaternion.
You missed the point. It's first principally because matrices are not isomorph to quaternions. Matrices enable projections, non uniform scaling etc ... It's only for this reason : generality of the matrices that any RENDERER uses them in their API. It's also because the RENDERER obviously prefers to deal with matrices, the fastest way to transform many vertices, as you said it's the fastest general way.
BUT :Obviously accumulation of rotations between frames concerns ANIMATION which is obviously of the user responsibility and the IN TOPIC for this thread. Quaternions are more accurate, because made of 4 floats. Implicitely a rotation and a uniform scaling. Exactly what's required, not less not more. That's for this precise reason that you could intuitively understand why it's far less sensible to numeric deviations than general matrices. Now if you want a true math proof Dmytry or I can surely deliver that. Still I have other cats to beat. But you could also possibly Google by yourself. That'd be fair. I also remember my first year in "Mathematiques Superieures", the teacher warned us very clearly that matrices are highly unstable numerically. So you could also ask to your local math teacher if you know one.
OpenGL and D3D do not cope with such accumulations. Well you could use the matrix stack this way but be prepared to see your scene shrink and post a noob question like : "Why does my scene disappear ?"