7

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 arbitrary axis as stretching along some diagonal. Here's a pic of a square being scaled along the main diagonal (the axis pointing to <1, 1> ) by factors of 2 and 0....


6

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 other quadrilateral. One way to see this is that the matrix for a 2D affine transform has only 6 free coefficients. That's enough to specify what it does to 3 ...


4

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. There are two cases when the field of view changes. Either you move the image plane back and forth or you increase the size. We choose to change $d$ ( former ...


4

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 transforms all objects from world space to Eye (/Camera) Space (no projection so far!) Projection Matrix transforms from Eye Space to Clip Space Therefore you don't ...


4

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 transformations, you can rotate, scale or shear the image, what you can't do is move it, since you have a fixed point in the middle. Now add a dimension, and move your ...


3

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 probably some statistics (to understand Monte Carlo integration). I want to know if I can teach myself the math necessary for CG We can't answer that question ...


3

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 object proportional to the field of view so that it retains the same screen size regardless of the camera zoom. (Specifically, scale it by tan(fov/2)). Finally, ...


3

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 whatever) changes the transform of A, then bones B and C are supposed to move along with it. This is accomplished by defining bone B relative to A, and C relative ...


3

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 / (m-1)$$ Note that usually the field of view encompasses whole pixels and doesn't stop at the center of the edge pixels like your diagram shows. If $P_c$ is ...


2

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 projected point $x$. First, because the projected point is in the direction $d$, we can write: $$\vec{vx} = \lVert\vec{vx}\rVert d $$ Second, because $p$ and $x$ are ...


2

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 your confusion. Instead of deciphering the code, I would rather derive the transform and compare it with the code. The affine (6 degrees of freedom) and ...


2

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 referring to a method of matrix diagonalization using "Jacobi rotation matrices", which are better known as Givens rotations. In other words, the Jacobi ...


1

Since homography is not my topic, I can't really tell if I am missing some important edge cases, but after some research, I think I got the basics. I will use the same variable names, the guy in the video uses on slide 15 (slide numbers are in the bottom right corner on the red background). You start by defining 4 points in the plane $X$ where you say you ...


1

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) × (the index of the point). Works in any number of dimensions, faster than the trigonometric approach. v1 = Vector(100, 200, 300) v2 = Vector(500, 400, 300) ...


1

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 you used an orthographic projection, even though there is also a corresponding section in the link. The issue is how OpenGL defines its coordinate systems. ...


1

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 property comes from the fact that the eye coordinates are right-handed, but the clip space (NDC) uses left-handed coordinates. Hence the implementation of ortho(). ...


1

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. You assume you have a point in C space and want to compute its position in root/global space, in order to pump it further through the transformation pipeline, ...


1

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 true, $J^+J$ is not necessarily $I$. $JJ^+=I$ but the multiplication by the pseudoinverse is not commutative. Let's look at this in more detail: $JJ^+ = JJ^T(...


1

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 transformation, we need to use a 4x4 matrix to represent translation. I find you use column vector post-multiply matrix. the result of the translation matrix is same as ...


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