Comments on: How to Rotate a Vertex by a Quaternion in GLSL (*Updated*) https://www.geeks3d.com/20141201/how-to-rotate-a-vertex-by-a-quaternion-in-glsl/ Graphics Cards and GPUs News, Graphics Programming, Home of FurMark Fri, 24 Nov 2017 16:00:13 +0000 hourly 1 https://wordpress.org/?v=6.7.1 By: Kristine https://www.geeks3d.com/20141201/how-to-rotate-a-vertex-by-a-quaternion-in-glsl/#comment-75148 Wed, 10 Dec 2014 17:27:10 +0000 http://www.geeks3d.com/?p=8953#comment-75148 @Reza: I agree with you. Also when it comes to books I like “Visualizing Quaternions” by Andrew Hanson.

]]>
By: Reza Nezami https://www.geeks3d.com/20141201/how-to-rotate-a-vertex-by-a-quaternion-in-glsl/#comment-74326 Sat, 06 Dec 2014 06:44:48 +0000 http://www.geeks3d.com/?p=8953#comment-74326 With respect to the optimized version of vertex rotation, I suggest keep the original one and provide the optimized version as what it is,i.e. an optimization. The code you have provided above, as I understand, is mostly for educational purpose and your original method was educational, but the optimized method is really not! I mean first it must be shown how this is equivalent to the original version, if you really want to replace yours with the more efficient one! Good job.

]]>
By: JeGX https://www.geeks3d.com/20141201/how-to-rotate-a-vertex-by-a-quaternion-in-glsl/#comment-73590 Tue, 02 Dec 2014 08:20:10 +0000 http://www.geeks3d.com/?p=8953#comment-73590 Yes you’re right, the code is not optimized, but I wanted to detail this popiular method to rotate a vector (qPq-1). I updated the article with your code. Thanks!

]]>
By: Kristine https://www.geeks3d.com/20141201/how-to-rotate-a-vertex-by-a-quaternion-in-glsl/#comment-73579 Tue, 02 Dec 2014 07:26:02 +0000 http://www.geeks3d.com/?p=8953#comment-73579 This strikes me as highly complicated and inefficient compared to (q is the quaternion, v the vector to rotate):

return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);

Taken from here: http://code.google.com/p/kri/wiki/Quaternions

]]>