As of May 31, 2023, we have updated our Code of Conduct.
7 votes
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 ...
russ's user avatar
  • 2,332
6 votes
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 ...
Nathan Reed's user avatar
  • 24.4k
5 votes
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. ...
gallickgunner's user avatar
5 votes

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 ...
russ's user avatar
  • 2,332
4 votes
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 ...
Tare's user avatar
  • 1,477
4 votes

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 ...
Nathan Reed's user avatar
  • 24.4k
3 votes
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 ...
Dan Hulme's user avatar
  • 6,650
3 votes

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 ...
bernie's user avatar
  • 810
3 votes

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 ...
Nathan Reed's user avatar
  • 24.4k
2 votes
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....
Christian Rau's user avatar
2 votes
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 ...
Julien Guertault's user avatar
2 votes
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 ...
TheBusyTypist's user avatar
2 votes
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 ...
Nathan Reed's user avatar
  • 24.4k
2 votes
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) × ...
Noah Witherspoon's user avatar
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: ...
pmw1234's user avatar
  • 2,832
1 vote

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

I was applying the transform twice, here the solution: ...
ytrox's user avatar
  • 31
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 ...
emackey's user avatar
  • 369
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 ...
lightxbulb's user avatar
  • 1,951
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 ...
wychmaster's user avatar
  • 1,233
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 ...
wychmaster's user avatar
  • 1,233
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 ...
intergula's user avatar
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 ...
Christian Rau's user avatar
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 ...
Craig.Li's user avatar
  • 176

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