# Tag Info

### Get vector length with GLM

Sorry folks for posting such a trivial issue! The issue is solved. I was using the wrong function. Here goes the correct one: ...

### What is the difference between a point transformation and a vector transformation?

Here's the simple answer. In 4D, to be able to multiply them by a 4x4 matrix, vectors are represented as (x,y,z,0) and points are represented as (x,y,z,1). Since the 4th row of a 4x4 matrix ...
Accepted

### Graphics Pipeline: Viewspace & Back face culling incorrectly

I (believe) I've solved this (even if it has taken 2 days). My problem was essentially I wanted to take the dot product of the face normal, and line-of-sight vector like below And determine the angle ...

### Ray tracing with thin lens camera

In a traditional camera, the photons from the scene travel through the lens of the camera, then hit the sensor at the focal length. A consequence of the lens is that the image is upside down and ...

### Test if a point is on a line segment

Let's say you have your two points that define the line segment: $A$ and $B$, and a point $P$ that you are testing to see if it is on the line segment. Firstly, you get a normalized vector from $A$ ...
Accepted

### Interpolating vectors on a grid

I did some research and found the answer I was looking for. The three most common ways to interpolate vectors are: Slerp - short for "spherical interpolation", this is the most correct way, but is ...
Accepted

### Calculating the angle between two polygons

I suggest computing the normal vector for each polygon and compute the angle between the normal vector of one triangle and the normal vector of a plane perpendicular to the other surface that passes ...

### Correct view-space transform

I've done some small changes to how I usually construct my view matrix, here is what I've modified: ...
Accepted

### Normal vector in Phong Illumination Model should be normalized?

Short answer: yes. Longer answer: yes, because the vectors you’re using are meant to represent directions, not directions-and-distances. Think of it in terms of light: it doesn’t matter how far a ...