# 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: ...
• 1,279

### 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 ...
• 7,801
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 ...
• 410
Accepted

### Video-games; Rendering textures on scope zoom-in. Texture compression problem?

Well there's no way to know for sure unless you look at the source code but my guess is that they do zooming by lowering the FOV (field of view) of the camera. This is easy to implement and actually ...
• 296
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 ...
• 2,222

### Creating vector shapes using only C++

What you are looking for is a way to get access to individual pixels in an image, in a way that you can modify those pixels with CPU code. Once you have that you'll want to find software rendering / ...
• 7,801
Accepted

• 2,438
1 vote

### Rotation of a random unit vector at a point in 3D space by an angle

Rotation matrix | wikipedia.org in section that says "in three dimensions". It's the first search result when searching about rotating a vector about an axis. Let me know if you have any questions. ...
• 121
1 vote

### Morph Targets Normal adding math

It would seem that, in the second example, the morphNormals are targets while in in the first they are deltas. This explains the difference in math used between the two pieces of code.
1 vote
Accepted

### How can I draw a tube on basis of position and angle between two 3d points?

The simplest solution is to use a lookat matrix. This is a matrix calculated from a "eye" point, a "target" point and an up vector. The resulting matrix will then make the Z axis point from the eye ...
• 5,950
1 vote

### intersection between line segments - narrowed precondition

the arbitrary line can be represented as $P = (x,y) = P_0 + \lambda. \vec{dir}$ (works in n dimensions, no special case). If your other line is $x=x_1$ simply inject this in to solve for $\lambda$ and ...
• 1,266
1 vote

### intersection between line segments - narrowed precondition

The arbitrary line can be expressed as y = a*x+b (assuming it's not parallel to the y axis). If the other line is parallel to the y axis then you can simply fill ...
• 5,950

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