Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [matrix]

The tag has no usage guidance.

0
votes
3answers
105 views

Rotation of a random unit vector at a point in 3D space by an angle

I have a scenario where I need rotate a vector ( unit vector) at a point in space by an angle along Z-axis. Is it possible to help me to understand a procedure to achieve this. I'm using vb.net ...
1
vote
0answers
31 views

How to apply scale, translate, rotate with different origin and get new rectangle coordinates

I was reading other questions in this topic but I couldn't apply any viable solution to solve my use case. I have a crop area described with two dimensions (cropWidth, cropHeight) I can easly compute ...
0
votes
0answers
8 views

Stacking vertex rotations around different axes of rotation

I have a binary tree, each node being a vertex with a 3D coordinate. I have to traverse the tree in a way to rotate each child node around an axis going through it's parent. The catch is that every ...
0
votes
0answers
66 views

How to solve the equation x = Mx + b using markov chains?

I am unable to find the mistake in my code. I've used the following input: M = [0.5,0.0, 0.0,0.25] b = [1.0,1.0] The answer for x should be ...
0
votes
0answers
17 views

Move a camera (orbiting camera) togheter with the Earth around the Sun

I modeled, Phong shaded and animated 2 spheres in a simple way to approximate in a naif way the solar system (with Earth and Sun alone). There is the Sun at the center and the Earth that goes around ...
2
votes
1answer
39 views

Correctness or otherwise of the procedure for generating an orbiting camera in WebGl

I have to create a orbiting camera. I created the model of sun (a sphere) around (0,0,0) , triangulated and Phong shaded it. I would have a camera that goes around the sun thus an orbiting camera and ...
1
vote
1answer
63 views

How do I build my tangent space matrix?

I'd like to understand how the process of building the "tangent space" matrix for normal mapping works. I'm following several tutorials, and other stackexchange questions, but I'm unfamiliar with the ...
2
votes
0answers
62 views

What does different tangent basis mean for a normal map

What does it mean that a normal map was computed with a different tangent basis and is the reason why the normal map does not render correctly. I used the following code (very generic) for my ...
4
votes
1answer
198 views

Inverse value in a Perspective Matrix

I am a new leaner of computer graphics. I'm trying to understand a code I found online and I got stuck in the following formula: ...
2
votes
1answer
67 views

Inverse matrix order of operation

If I have a rotation, $A$, and a translation, $B$, which I multiply like so $C = AB$ Does the inverse of $C$ not only inverse the magnitudes of $A$ and $B$ but also become the reverse of operations? ...
1
vote
1answer
888 views

How to derive a perspective projection matrix from its components?

This has been haunting me for several days now. I want to find the component that makes up of this 4x4 perspective projection matrix, with $l$(left), $r$(right), $b$(bottom), $t$(top), $n$(near), $f$(...
5
votes
2answers
45 views

Modulo vs Scaling vs Capping when performing filters

I'm currently taking a graphics course and we've recently covered cross-correlation with regards to using a filter matrix that is applied to a region of pixels in a sort of continual raster-type scan ...
4
votes
1answer
150 views

why is translating in 3D space the same as shearing in 4D space?

I was reading "3D Math Primer for Computer Graphics and Game Development" and there was something the author had said that I thought was particularly interesting, he stated It is important to ...
1
vote
2answers
437 views

Screen space coordinates to Eye space conversion

I'm trying to figure out how to reverse Eye space -> projection -> clip(divide by w) -> screen space conversion. Basically, I want to get Screen space (still have z value for z-buffer) -> undivide? ...
1
vote
1answer
51 views

Why inverse of an allignment matrix is the same as its transpose?

$A_{v}^{-1}$ = $A_{v}^{T}$ $A_{v}$ = Allignment matrix that alligns vector v with z axis $=$\begin{bmatrix} \frac{\lambda}{|v|} & \frac{-ab}{\lambda|v|} & \frac{-ac}{\lambda|v|} &...
2
votes
1answer
710 views

How to decompose projection matrix?

I want to decompose projection matrices into near, far, top, bottom, left and right values to create a bounding box for view frustum. I used the formula described in this site Decompose the OpenGL ...
4
votes
1answer
171 views

What does it *mean* to scale in an arbitrary direction?

My graphics text explains rotating along the cardinal axes, then generalizes the math to show how to make a rotation matrix for rotating around an arbitrary vector. That all makes sense and I can both ...
1
vote
1answer
53 views

Finding all possible reflection matrices for a given Wythoff construction

As a pet project, I'm trying to build a small app that visualizes 4D polytopes. I want to use the Wythoff Construction method, where the shape is generated kaleidoscopically by the interaction of 4 ...
3
votes
2answers
549 views

Inverse-Transpose of Vertex Normals

For the past month, I have been learning on my own and writing a little graphics library and am currently working on the transformation of vertex normals to soon support lighting/shading. I understand ...
4
votes
2answers
274 views

Why do we multiply vertex from left side in vertex shader with matrices?

I have been learning OpenGL 3.3 and I saw this expression: gl_Position = projection * view * model * vertex I am confused because I read in some book that if the ...
8
votes
1answer
646 views

Why are width and height divided by 2 in the perspective projection matrix?

I'm using OpenGL to learn computer graphics. I'm trying to understand projection matrices. The following are shown in the OpenGL 'Red Book': I don't understand why the width and height are divided ...
3
votes
2answers
502 views

row and column majored rotation matrix pre- or post- multiplied

For column-major rotation matrices (right up forward in columns) do you right-multiply (post-multiply?) a row vector or left-multiply (pre-multiply) a column vector to result in a correct/valid ...
5
votes
1answer
270 views

Rotation matrix for a 3D object in space

This is the follow-up question from here: Minimum requirements to uniquely represent a 3D object in space Assume I have 3 original points in a 3D object (in 3D space) as ...
6
votes
1answer
491 views

Render with camera perspective off-center

So ordinarily we have this But I'm after this! Is it possible to do this? Ideally by changing the projection matrix? The reasoning is kinda interesting - I am developing for mobile VR, and I have ...
1
vote
0answers
131 views

Octave matrix to image pixels too small (do not have 1 pixel per integer)

I am working on a project which plots points over a checkerboard (representing seats for people). I would like each pixel in the image to represent each integer matrix entry. After updating my ...
1
vote
1answer
222 views

Final transformation matrix to transform world coordinate into vrc [duplicate]

For a 3D scene in the world coordinates, its View Reference Point $\mathrm{VRP}$ is at $(5,2,1)$, and a viewer is looking towards point $A=(1,1,1)$. Construct a transform matrix which will map world ...
1
vote
0answers
166 views

Tilting a 3d object to face a camera and have it look like it's spinning on the y axis

I have a scene kit app I'm working on and at a certain point I move the camera under a list of objects and tilt it up to give a star wars type view of them. I then need to pull the objects up one at a ...
2
votes
1answer
510 views

Building view transform matrices

For a 3D scene in the world coordinates, its View Reference Point $\mathrm{VRP}$ is at $(5,-2,1)$, and a viewer is looking towards point $A=(1,1,1)$. Construct a transform matrix which will map world ...
1
vote
0answers
59 views
2
votes
2answers
759 views

Correcting my “look-at” matrix so that it works on non-camera objects?

I'm familiar with the "look-at" matrix and the goal of being able to rotate a Camera at a specific location towards a specified target. When I tell the ...
4
votes
1answer
539 views

Unable to pass custom Matrix4 to GLSL as a uniform

I am fairly new to graphics programming and I am trying to pass a custom Matrix4 (non-glm) to my vertex shader by using a uniform. ...
4
votes
2answers
231 views

What's a parent vector space or coordinate system?

After asking this question, a few new terms that I had never heard of came up. Note, I'm quite familiar with linear algebra, but I've never heard these terms in the context of linear algebra. ...
4
votes
2answers
202 views

How is that possible that matrices can be thought as coordinate systems?

I've been reading around that matrices (for example, rotation matrices, but not only) can be thought somehow as coordinate systems. My question is: how is that possible? I've seen for example that ...
4
votes
1answer
117 views

Detect a lossy matrix decomposition?

I am writing a plugin to export data from 3DS Max. 3DS Max's geometry pipeline is... interesting. As part of my plugin I decompose a transform matrix into a translation, (quaternion) rotation & ...
6
votes
2answers
2k views

How to translate object to origin?

I want to rotate a 3D object. On this website http://paulbourke.net/geometry/rotate/ the first step says: (1) translate space so that the rotation axis passes through the origin What is meant by "...
3
votes
1answer
110 views

Ladder to DNA using Transformation Matrix

In my last Graphic mid-term, the exam contained a Transformation Matrices problem, its statement was: Question Rotate the following ladder to form a DNA-shaped ladder using a transformation matrix....
5
votes
2answers
116 views

Correctness of logical steps for create the matrix of viewing transformation

In general, I understand the creation of viewing transformation matrix, but I have my doubts. For example, let's say that a world coordinate (called $A$) has a center at $(1,1,1)$, and the view ...
6
votes
1answer
153 views

Solving a problem from *Foundations of Computer Graphics*:

From Gortler's Foundations of Computer Graphics (i.e., self-study): Let $\mathbf{\vec{e}}^t = \mathbf{\vec{w}}^t E$ and let $P$ be a camera matrix that is just some arbitrary $4$ by $4$ matrix with ...
4
votes
1answer
256 views

Rotating an Object Around an Axis

I have a circular shape object, which I want to rotate like a fan along it's own axis. I can change the rotation in any direction i.e. dx, dy, dz using my transformation matrix. The following it's ...
6
votes
1answer
331 views

Do we use 3x3 matrices in computer graphics?

I've been doing some side-research on computer graphics as a hobby and came across this article on quaternions: http://www.opengl-tutorial.org/assets/faq_quaternions/index.html#Q2 In the first ...
7
votes
1answer
460 views

Animating a smooth linear transformation

After watching this video on matrices, I tried to make a simple animation of 2D linear transformations. Starting with a set of 2D points in a grid, I applied a 2x2 matrix to each point and obtained a ...
11
votes
2answers
370 views

How to unproject quadrilateral into rectangle?

tl;dr: Math problem in projective geometry: How does one find some 4x4 camera matrix that gives a projection as illustrated below, such that points A,B,C,D are somewhere on the edges of the unit box (...
7
votes
1answer
72 views

Confusion about notation in a paper

I have been trying to understand "Fast Simulation of Mass-Spring Systems" by Liu et al., which can be found here. There is one part in the methods section that is confusing me. Just after equation 12, ...
3
votes
1answer
284 views

Object rotating around origin instead of object center?

I am implementing simple rotation but the object is not rotating around the local center instead it is rotating around world origin. This is the code: ...
4
votes
0answers
154 views

View Reference Coordinate System

For a 3D scene in the World Coordinates, its View Reference Point is at c=(0,3,4), and a viewer is looking towards its origin O (0,0,0). Construct a transform matrix which will map World Coordinate ...
3
votes
2answers
389 views

3D rotation matrix around vector

I am using matrix for performing 3D rotations. I know that in 3D space the matrix product order is important - changing the order of the matrices can effect the rotate result. So I am interesting ...
4
votes
1answer
141 views

Affine Transformation

We have a matrix $$\begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix}$$ This matrix represents a ...
4
votes
1answer
115 views

Image based lighting, tangent space coordinates, and optimization

When I saw an implementation of normal mapping that computed the TBN matrix in the vertex shader and converted everything (in particular the view vector and light vector) to tangent space at that ...
2
votes
0answers
132 views

Coordinate system transformation in motion capture files

I am trying to align two motion capture files from different sources. The motion capture file consist of a skeleton specified as a hierarchy of joints. Each joint i.e. "shoulder" has three pieces of ...
4
votes
1answer
395 views

Choosing & Using a Projection Matrix

I'm looking into the graphics pipeline processes and at the moment in particular, perspective projection matrices. After looking in several different sources, and across the breadth of previous ...