Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [vectors]

The tag has no usage guidance.

0
votes
0answers
32 views

What vectors are used to assign light intensities?

What vectors are used to assign light intensities to surface points during the rasterization process in the Phong Lighting Model? A diagram would really help to see how this works.
0
votes
1answer
85 views

How do I derive this transformation

If I had two right handed frames where one has vectors [i, j, k] and another with corresponding vectors [u v w], how would I derive the transform M[i j k] <-- [u v w] when applied to any point P in ...
0
votes
3answers
133 views

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

I have a scenario where I need rotate a vector ( unit vector) at a point in space by an angle along Z-axis. Is it possible to help me to understand a procedure to achieve this. I'm using vb.net ...
5
votes
2answers
94 views

Refraction: given an incoming and transmitted direction, can I deduce the normal?

It's easy to find guides to calculating the transmitted direction of light given an incoming direction, the normal, and indexes of refraction. However, I can't find anything about determining the ...
2
votes
1answer
124 views

Morph Targets Normal adding math

I am trying to verify that if I have my inNormal and some N amount of morph normals that I would want to do something such as <...
3
votes
1answer
69 views

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

This is general question. In the multitude of video-games that are not specialized in scoped warfare (like Sniper Elite), I've noticed that when you zoom in with a scope, the textures and normal maps ...
2
votes
1answer
261 views

Vector Math for Raytracer

So i am working through the book "Raytracing in one weekend". At the point where i am at we want to check if a ray hits a sphere. For that we have the equation: ...
1
vote
0answers
86 views

Basis vectors and plane equation

I'm trying to understand basis vectors and the plane equation and I am confused. From what I saw, if we take a basis vector i, j, k, each variable point to the axe (x, y, z). Are i,j,k scalars or ...
1
vote
1answer
273 views

Perlin Noise with Smooth function vs Lerp

I tried implementing Perlin Noise using the Wikipedia as my main resource. From what I can tell my implementation of the ...
2
votes
2answers
264 views

Can somebody explain this Ray Tracing Function?

I am currently reading through Peter Shirley's Ray Tracing in One Weekend. In the beginning chapters where the author introduces diffuse surfaces we a presented with this function: ...
12
votes
3answers
2k views

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

This is what my lecturer told me in the coursework: We only consider 4*4 matrices. These are used to rotate, scale or translate objects (or any combination of these operations). Matrices are also ...
5
votes
1answer
267 views

Normal vector in Phong Illumination Model should be normalized?

I'm studying Illumination subject these days and I was given a problem which asks to calculate the intensity using phong illumination model. I'm little bit confused whether I should calculate normal ...
5
votes
1answer
114 views

Where should I project a polygon corner when it is behind me?

I am creating a simple 3D engine as a learning project to get the hang on spherical trigonometry. I am using the following approach. 1. A model consists of a lot of triangular faces. 2. Each triangle ...
4
votes
1answer
70 views

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

I'm struggling with this idea of creating two particles in 3d and draw a tube between them. I can't figure out how to properly set the angle of the tube. I've used two approaches: calculating the ...
4
votes
0answers
721 views

Represent vector with arrow

Another code review question. I am trying to draw an arrow to represent a vector. I have started with an unit arrow with vertices defined as follows: ...
1
vote
1answer
828 views

Creating vector shapes using only C++ [closed]

I've been researching for quite a while and I couldn't find any explanation or at least a how to create a vector graphic application (specifically in windows) where I can create a 3D vector shape, say ...
4
votes
2answers
100 views

intersection between line segments - narrowed precondition

I believe that the issue may already have been discussed here. I want to find if two line segments does intersect and if they do then find and store and intesection points. Now it is already confirmed ...
12
votes
1answer
5k views

Get vector length with GLM

I am quite confused over how GLM library is behaving or I am using it improperly. glm::vec2 testVec(6,-4); float len = testVec.length(); I get the value ...
5
votes
1answer
134 views

Test if a point is on a line segment

I have a line segment defined by two end points. And I have another randomly chosen third point and I want to find out if the third point is on the line segment or not. By "On the line segment", I ...
5
votes
1answer
548 views

Interpolating vectors on a grid

If you have values on a grid and you want to find the value of a point within one of the cells, you can use techniques like bilinear or bicubic interpolation to get the data at that point. What ...
7
votes
2answers
1k views

Ray tracing with thin lens camera

I'm reading Cook's paper "Stochastic Sampling and Distributed Ray Tracing", I don't understand how the rays are generated. He says: Determine the focal point by constructing a ray from the eye ...
3
votes
2answers
543 views

Correct view-space transform

I am attempting to model a simple graphics pipeline (i.e. Local->Word->View->Screen->2D spaces). I've been looking at the algorithm required to transform from world to view-space and using the ...
6
votes
1answer
182 views

Graphics Pipeline: Viewspace & Back face culling incorrectly

I'm attempting to model a simple graphics pipeline - using Matlab at the moment as a modelling tool to get the transformations correct. I appreciate there are software tools that would make this ...