Share Your Experience: Take the 2024 Developer Survey

Tag Info

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

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
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

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
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

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