Tag Info

Hot answers tagged

2

To succinctly answer the "why" question, it's because a 4x4 matrix can describe rotation, translation, and scaling operations all at once. Being able to describe any of these in a consistent manner simplifies a lot of things. Different kinds of transformations can be more simply represented with a different mathematical operations. As you note, ...


1

If you have conflicting comments and code, either one or both of them are incorrect. In this case, it seems likely that the 3D rotation in the comment is supposed to be a 3D translation. In general, a 4x3 transformation matrix is like a regular 4x4 transformation matrix, but the fourth part with [0 0 0 1] is omitted for saving space and work.


1

Floating point math is not perfect. You're trying to compress an infinite set (all real numbers) into an extremely finite space (32 bits). Consequently, not every number can be accurately represented, and some numbers will suffer from rounding error. Basically, as you do increasingly more math on some particular value, you increase the chance(*) that the ...


1

Three.JS has a function for this based upon this principle. BTW Matrix4x4 are represented internally as Column-Major, not sure what bullet uses. Three.js Matrix4x4.makeRotationFromQuaternion(Quaternion) makeRotationFromQuaternion: function ( q ) { var te = this.elements; var x = q.x, y = q.y, z = q.z, w = q.w; var x2 = x + x, y2 = y + y, z2 ...


1

This sounds similar to polyomino puzzle solving, which I've played with... With a 10 x 10 grid, you can reasonably do an exhaustive search for each shape. Starting from the top left, and going to the lower right, try to set the shape onto the grid. If it contradicts one of the known misses, discard it. If it overlaps some of the known hits, rank it as more ...



Only top voted, non community-wiki answers of a minimum length are eligible