Tag Info

Hot answers tagged

3

Not sure if this is the most performant, but it can be visualized easily: //assuming you're starting with a relatively orthonormal matrix 1.) Take one of your matrix's 3 basis vectors and dot it against the 6 world orthogonal vectors and set it to the one whose result is closest to 1.0. 2.) Do the same for one of the 2 remaining basis vectors. 3.) Cross ...


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 ...


1

Please note, that the quad is in 3d space and I particularly need it's VERTICES to be distorted and NOT to rotate a perspective camera. The quad is laying on a plane with Z=0, all of the quad's vertices have their Z components equal to 0 and they should have their Z component equal to 0 after the transformation. Please note that even though you wish to ...


1

An orthographic projection is better described as a kind of parallel projection, because if you were to draw lines between the points in "world space" (ie 3d) to "projected space" (ie 2d) they would be parallel to each other. All projections map one space to another, though for the most part when we're talking about orthographic projections we're ...


1

Wow that was fast. It's crazy how sometimes just writing out the question helps you figure out how to approach a solution. Here is my matrixPerspective function: void matrixPerspective(float angle, float near, float far, float aspect, mat4 m) { //float size = near * tanf(angle / 360.0 * M_PI); float size = near * tanf(degreesToRadians(angle) / ...



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