quaternions

Help me with Rigid Body Physics/Transformations

I want to instance a slider constraint, that allows a body to slide between point A and point B. To instance the constraint, I assign the two bodies to constrain, in this case, one dynamic body constrained to the static world, think sliding door. The third and fourth parameters are transformations, reference Frame A and reference Frame B...

Can someone explain how I can use Quanternions to use the mouse to look around like a FPS?

Yesterday I asked: How could simply calling Pitch and Yaw cause the camera to roll? Basically, I found out because of "Gimbal Lock" that if you pitch + yaw you will inevitably produce a rolling effect. For more information you can read that question. I'm trying to stop this from happening. When you look around in a normal FPS shooter ...

Quaternion from Orthogonal Basis

I have a projectile object that is moving along a velocity vector. I need to ensure that the object is always facing in the direction of the velocity vector. Furthermore, I am representing object rotation using quaternions, not matrices. I know that the first step is to find an orthogonal basis: forward = direction of velocity vector...

Intuitive 3D Math Resources

I have been trying to find some well presented and explained Vector and Quaternion resources recently to brush up on my 3D skills, and have been having some trouble. Most of the resources I have found tend skip over the high-level reason that performing a particular operation is useful, and dives straight into jargon and proofs that te...

How to rotate about the center of screen using quaternions in opengl?

I am trying implement arcball/trackball rotation but I have a problem with the center of rotation. I want the center to be the center of my screen no matter what. Let me explain what I have done so far. I've created a quaterion (rotation axis: vector_start x vector_end, angle: vector_start * vector_end) From that quaternion...

iPhone GLGravity example using quaternions

Hello, GLGravity iPhone example showing how to use accelerometer and OpenGL suffers from Gimbal Lock problem. I'm wondering is there any code available using quaternion rotation instead of Euler angles? Any help will be greatly appreciated, I'm struggling with this from a long time without having a success ... ...

opengl matrix rotation quaternions

Im trying to do a simple rotation of a cube about the x and y axis: I want to always rotate the cube over the x axis by an amount x and rotate the cube over the yaxis by an amount y independent of the x axis rotation first i naively did : glRotatef(x,1,0,0); glRotatef(y,0,1,0); then but that first rotates over x then rotates over ...

Source code needed for calculating quaternions

I have gyroscope + accelerometer data at each time period T. I want to calculate the rotation of the object at each time - it can rotate on its axises. So I've read that it is convenient to represent the rotation of the system in terms of quaternions (not in Euler angles). Is there any source code that can transform from angular veloci...