FAQ Database Discussion Community

## Separating axis theorem: rotation around center of mass

c++,math,rotation,rotational-matrices,separating-axis-theorem
The problem is in Polygon::FindAxisLeastPenetration: double Polygon::FindAxisLeastPenetration(unsigned int *faceIndex, const Polygon &polygonA, const Polygon &polygonB) const { double bestDistance = -std::numeric_limits<double>::infinity(); unsigned int bestIndex; for (unsigned int i = 0; i < polygonA.points.size(); i++) { Vector2D n = polygonA.normals[i]; Vector2D nw = polygonA.rotationMatrix * n; //ROTATION Matrix22 buT = polygonB.rotationMatrix.Transposed();...

## OpenGL fixed coordinate transformations

opengl,coordinate-systems,rotational-matrices
Was just trying to do some rendering with OpenGL and I happened to think about that: how would you run transformations in a fixed coordinate system. In other words, if you rotate an object around one axis you will see that the others are going to rotate too? Therefore, following...

## Fast Quaternion-Vector Multiplication with other Transformation Matrices

math,matrix,3d,quaternions,rotational-matrices
I am currently trying to find an equivalent for the following equation: vec_res = inverse(VM) * (q * (VM * vec_input) * conjugate(q)) where VM is a standard view matrix , q is a normalized quaternion, and vec_input a vector. In the form: vec_res = A * vec_input; or vec_res...

## How to rotate objects in OpenGL relative to local or global axes

c#,opengl,quaternions,rotational-matrices,sharpgl
I'm asking a question that has been asked a million times before, but I still haven't found a good answer after going through these and also resorting to other sites: How to rotate a graphic over global axes, and not to local axes? rotating objects in opengl How to rotate...

## Finding the right kind of Android sensors and using them

android,opengl-es,android-sensors,rotational-matrices,sensormanager
I've tried to search both on google and here the solution to my problem and I don't think it has been asked before (or may I be using the wrong words in my search? ^^') Anyway, this is what I want to have: a OpenGL surface view (showing a cube...

## Sparse Rotation Matrix Python SciPy

python,numpy,scipy,sparse-matrix,rotational-matrices
I'm working with quite large rotation matrices, which have the inherent property to have a large number of zeros. In order to reduce memory use and possibly reduce computation cost when multiplying these rotation matrices with other matrices/vectors, I would like to use a sparse matrix data structure. I have...

## Android Rotation Vector and Rotation Matrix

android,opengl-es,linear-algebra,android-sensors,rotational-matrices
So I previously asked a question more about what ind of sensor to use for the application I'm building. After some research I know now that it's the rotation vector that I want to use for I want to be able to move a virtual cube on my tablet according...