# Tag Info

Accepted

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

When you scale along the X-axis, the X-coordinate (parallel to the axis) gets stretched, while the Y-coordinate (perpendicular to the axis) remains the same. You can think of scaling along an ...
Accepted

### Why does an affine transform work only on three of the corners?

An affine transformation doesn't have enough freedom to do what you want. Affine transforms can be constructed to map any triangle to any other triangle, but they can't map any quadrilateral to any ...

### How to keep an object constant in screen space?

Scale the object proportional to its depth (z in camera space) and it will retain the same size on screen regardless of its position in world space. Additionally, you might also wish to scale the ...
Accepted

### How to calculate ray

Read up on the basics for ray-tracing here, Usually we don't mess up with viewports and stuff in raytracing, So I'm just telling you for the case where viewport equals the Image Width and Height. ...

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

In a linear transformation system, your origin is always a fixed point, since 0*anything = 0. So imagine you have a cinema screen, and the origin is at the centre of the screen. Using linear ...
Accepted

### How to derive a perspective projection matrix from its components?

The second matrix translates the eye [...] You don't do that in a projection matrix. You do that with your view matrix: Model (/Object) Matrix transforms an object into World Space View Matrix ...
Accepted

### Want to study computer graphics

First, graphics is full of linear algebra, so you'll need that whatever you do. If you want to do any research into shaders, or to write a ray-tracer, you'll also need to understand integration and ...

### How to calculate ray

First, the viewport size: $$h_x = 2*d*tan(\theta_x/2)$$ $$h_y = 2*d*tan(\theta_y/2)$$ Each pixel (from your diagram) has the following size in the eye coordinate system: $$W = h_x / (k-1)$$ H = h_y ...

### Skeletal animation: What is the purpose of multiplying interpolated bone matrix with parent's matrix?

The bone transforms are relative to their parent in the hierarchy. That's the point of the hierarchy, i.e. when you move your arm, your hand and fingers go along with it. So when an animation (or ...
Accepted

### Confusion about how inverse bind pose is actually calculated and used?

To get a vertex in root space into C space, I would have to do (CBA) * v. Well, yes. But that's not actually what you want to do in skeletal animation. You have it reverse. It's the other way around....
Accepted

### Project vertex onto plane

To answer your question we just need to write it as linear algebra equations and solve them. Although your question doesn't state it, I assume that $v$ and $d$ are unit vectors. Let's call the ...
Accepted

### Deciphering Affine/Projective Transformation Code

Your understanding of the matrix structure in Q3 is correct. This code just does not construct a matrix explicitly and the matrix multiplication is applied implicitly. I think this part might cause ...
Accepted

### Usage of Jacobi transformation in computer graphics

I wasn't familiar with the "Jacobi transformation", and after googling, it seems there are multiple things with that name; but given the mention of eigenvalues, I'm guessing they were ...
Accepted

### Plotting points along a 3D line segment

You shouldn’t need to use any trigonometry here at all. If you get the vector from v1 to v2 and divide it by the number of points you want along the line, each subsequent point is v1 + (that vector) × ...
1 vote

### Finding vertices of a polytope?

(I'm going to use the word “polyhedron” instead of “polytope” because I haven't considered how to generalize it to more dimensions.) Being constructed of the intersection of half-spaces, the ...
1 vote

### Custom LookAt and Perspective Matrix functions not rendering in Vulkan

The perspective matrix as written is setup for OpenGL here is one setup for vulkan: ...
1 vote

### convert right handed matrix into left handed forward/up/right vectors

I was applying the transform twice, here the solution: ...
1 vote
Accepted

### Can you encode a reflection in a quaternion?

No; quaternions can only represent proper rotations (i.e. without reflection). If you use non-unit quaternions, you can represent a combination of rotation and uniform scaling, but still not ...
1 vote

### How to apply transformation matrices from multiple primitives on a mesh

In the glTF format, "primitives" are just a way to specify separate draw calls (and hence, separate materials or shader programs) for a single mesh. There is no transform, as you've ...
1 vote
Accepted

### Determinants as another way to multiply two vectors

I think they just mean $\boldsymbol{a}\boldsymbol{b} = \begin{bmatrix} (x_a \boldsymbol{x} + y_a \boldsymbol{y}) & (x_b \boldsymbol{x} + y_b \boldsymbol{y}) \end{bmatrix}$, where the vectors are ...
1 vote
Accepted

### What are viewport transformation matrixes for this coordinate system?

The z-axis is indeed not correct if you want to transform to the space depicted in the second picture, because you perform no transformations on the z-axis. So your coordinate origin lies in the ...
1 vote

### Why negate z when constructing projection matrix OpenGL

What could be the purpose behind that? Have a look at the first lines and the first image in the Perspective Projection section of this link. For the answer to your question, it is not important that ...
1 vote

### Why negate z when constructing projection matrix OpenGL

I'm assuming your scene is constructed based on right-handed coordinates. If you are using OpenGL, yes. If you are using Direct3D, no. The projection matrix maps [-n, -f] into [0, 1]. This weird ...
1 vote
Accepted

### pseudoinverse Jacobian and adding more control in computer animation

I think I found your misunderstanding, but it's IMHO based on a little inconsistency (or at least lack of clarity) in the book. But, the θ is always zero vector because J+J=I, so θ=0z. This is not ...
1 vote
Accepted

### Building view transform matrices

To solve the problem, we will flow three steps, first, calculate translation matrix, second, calculate rotation matrix, third, get transformation matrix. Because translation is a affine ...

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