# Questions tagged [vectors]

The tag has no usage guidance.

23 questions
57 views

### Finding the normals of a tileable 2D surface extracted from 4D space

If I use a 4D noise function which returns a noise value and a four-part analytically derived gradient vector, I can create a 2D tile which is seamless (i.e. the opposite edges match) through ...
95 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 ...
149 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 ...
99 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 ...
128 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 <...
70 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 ...
283 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: ...
93 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 ...
296 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 ...
314 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: ...
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 ...
291 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 ...
117 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 ...
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 ...
747 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: ...
928 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 ...
102 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 ...
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 ...
136 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 ...
587 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 ...
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 ...