# Search Results

Results tagged with Search options answers only user 5864
16 results

A 2D array of numbers, symbols or expressions, arranged in rows and columns. Each row must have the same number of columns. The numbers, symbols or expressions themselves are called elements or entries.

Any combination of the order S*R*T gives a valid transformation matrix. However, it is pretty common to first scale the object, then rotate it, then translate it: L = T * R * S If you do not do it …
answered May 18 '12 by sam hocevar
The coefficient computations are correct. I can think of two things: you do not appear to ensure (x,y,z) is a unit vector; if the caller does not take care of this, you should divide each component …
answered Apr 29 '12 by sam hocevar
of rotation q) v' = -~q v q (transform of -v by the inverse of rotation q) If you only do translations and rotations, it is simpler to not use transformation matrices until the final matrix is constructed. …
answered May 10 '12 by sam hocevar
::matrix_transform::ortho(-320 * X, 320 * X, -200 * X, 200 * X); Component-wise, this will divide the first two diagonal terms of the resulting matrix by X. …
answered Nov 4 '13 by sam hocevar
If I understand correctly, you have three points A, B, C, and three points P, Q, R and you would like to know the affine transform (i.e. preserving distances) that transforms the first set into the se …
answered May 29 '14 by sam hocevar
You are correct that a combined axis-angle representation like the one you describe has a stronger expressive power than many other systems because it can more conveniently store a rotation speed. Ho …
answered Dec 19 '13 by sam hocevar
parameters and v your translation vector. The final matrix transformation is T(p)R(r)T(-p)S(s)T(v) instead of R(r)S(s)T(v). What you want is new transformation parameters v', r' and s' such that the … final matrix transformation is R(r')S(s')T(v') and we have: T(p)R(r)T(-p)S(s)T(v) = R(r')S(s')T(v') Behaviour at infinity indicates that rotation parameters and scaling parameters cannot change …
answered Nov 1 '11 by sam hocevar
Because if you only divide [x, y, z] by z you get [x/z, y/z, 1] and you lost the actual value of z, which is actually useful if you want to do near/far plane clipping or fill a Z-buffer. The best way …
answered Jul 9 '15 by sam hocevar
. This is the latitude/longitude notation. The corresponding transformation matrix is: |cosθ cosφ -sinθ -cosθ sinφ| |sinθ cosφ cosθ -sinθ sinφ| | sinφ 0 cosφ | See the first … column? That’s your vec3, since it’s the image of [1 0 0]. So the good thing is that we already know a lot of the matrix values. The following code computes the remaining values: mat3 rotation_matrix …
answered Dec 10 '12 by sam hocevar
Your first method is the correct one. According to the OpenGL FAQ: The translation components occupy the 13th, 14th, and 15th elements of the 16-element matrix It can also be seen in the glm …
answered Nov 26 '11 by sam hocevar
Indeed, you need an additional orientation hint for this to work. It is quite common to use an “up” vector in addition to the view vector that you computed. Most 3D libraries have some kind of “looka …
answered Apr 23 '16 by sam hocevar
It looks like you are confusing rows and columns in your matrices, either in the way your load or store them, or when you perform the matrix×vector multiplication. The w coordinate should always yield 1 with the matrices you are using. …
answered Mar 6 '11 by sam hocevar
Switching a combination of rotations from object space to world space is trivial: you just have to reverse the order in which rotations are applied. In your case, instead of multiplying matrices Z × …
answered Dec 14 '13 by sam hocevar
-Bryan angles into a rotation matrix. Here is some code to build a rotation matrix from three Tait-Bryan angles and the order of the rotations: /* i, j and k are the integers 0, 1 and 2 in any order …
answered Dec 24 '12 by sam hocevar
You can make objects appear smaller or larger simply by moving the camera further or closer to them, so you will need to change the view matrix. However, since the numbers you are dealing with are … potentially large, be sure to also fix the projection matrix for the near and far clipping plane values. Finally, note that astronomy pictures are often taken with a very small field of view. This is also set up in the projection matrix. …
answered Jan 6 '15 by sam hocevar

15 30 50 per page