Questions tagged [vectors]
The vectors tag has no summary.
41 questions
-1 votes
1 answer
65 views
Projecting Vectors (3D to 2D) Using Homogeneous Coordinates, With Known Camera Calibration
Suppose I have vectors in a 3D space (their starting points, dx, dy, and dz), and I would like to project them onto a camera, which I already have as a 3x4 projection matrix. I can of course project ...
3 votes
1 answer
161 views
What to do with the homogeneous $w$ during vector operations
As I understand it: In graphics, 3D vectors are usually represented as homogeneous coordinates by storing an additional $w$ component known as the weight. The vector is divided by $w$ to obtain the ...
0 votes
1 answer
152 views
With a light source at (0,2,0) and unit cube (from [-1,1]) using a given shading formula, how is the r,g,b for each surface calculated?
The above problem is from a past Computer Graphics exam. I am particularly confused about the explanation given, firstly for the top and bottom planes (since the direction of normal for top plane ...
0 votes
1 answer
344 views
Split a string of line segments into several other line segments
I have written a code to extend "n" points, constituting "n-1" lines ,to constitute more lines so you can map "m" data to "m" lines with m > n-1. This is the ...
1 vote
1 answer
118 views
Help understanding tangent from dot product and max distance from component wise vector multiplication
I am looking through this code and seeing two things which confuse me (well, the whole functions does) in the top functions. First, dir * p where ...
0 votes
0 answers
119 views
How do I figure rotation from the difference between two vectors?
I've been playing around with an idea, but I'm struggling with some of the math involved. Now, each face of a mesh has a normal vector, and that the normal map fragment shader modifies that face ...
0 votes
1 answer
114 views
Extending an orthogonal set of vectors (graphics application?)
Sorry if this is OT, but I'm wondering if there's a specific graphics technique in which it is required to extend a preexisting orthogonal set of vectors (not necessarily to a full basis, but perhaps ...
2 votes
0 answers
154 views
When should operations on 4D (homogeneous/projective) vectors use the w-coordinate?
Various operations on 2D vectors naturally generalise to 3D vectors simply by including the $z$-coordinate. The ones that come to mind are: Vector sum and difference Dot product Magnitude (Euclidean ...