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 ...
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 ...
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.
...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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....
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 ...
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 ...
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 ...
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) × ...
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
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
Related Tags
linear-algebra × 37transformations × 8
mathematics × 8
opengl × 7
3d × 7
matrix × 7
computational-geometry × 4
projections × 4
c++ × 3
camera × 3
affine-transformations × 3
raytracing × 2
rendering × 2
image-processing × 2
mesh × 2
geometry × 2
perspective × 2
animation × 2
vector-graphics × 2
vectors × 2
ui × 2
shader × 1
algorithm × 1
vulkan × 1
shading × 1