# Tag Info

Accepted

### Why is the transposed inverse of the model view matrix used to transform the normal vectors?

Here's a simple proof that the inverse transpose is required. Suppose we have a plane, defined by a plane equation $n \cdot x + d = 0$, where $n$ is the normal. Now I want to transform this plane by ...
Accepted

### What is the state of art in geometric LOD in games?

For the geometry LOD most games simply switch between a number of predefined LOD meshes. For example "Infamous: Second Son" uses 3 LOD meshes (Adrian Bentley - "inFAMOUS: Second Son engine postmortem",...
Accepted

### Why smoothed meshes in 3D studio end up with the same number of vertices/triangles? How then can they be smoothed with the same geometry?

Smooth in this case just makes the surface normals at vertices point the same way, when interpolated it looks smooth. Meshsmooth would add vertices. 1) how is the smoothing possible without ...
Accepted

### Visualizing the Lane-Riesenfeld Algorithm

The Lane-Riesenfeld algorithm subdivides the control polygon of a B-spline to create a new control polygon with the same limit spline. It's made up of two steps: first, duplicating all of the control ...

### How to Calculate Surface Normals for Generated Geometry

I see mainly three ways of computing normals for a generated shape. Analytic normals In some cases you have enough information about the surface to generate the normals. For example, the normal of any ...
Accepted

### How to Calculate Surface Normals for Generated Geometry

You simply dont want fully smooth results. While the commented method by Nathan Reed: "Calculate each vertex to face normal, sum them, normalize sum", generally works it sometimes fails spectacularly. ...
Accepted

### Maximum number of vertices after clipping a triangle against an AABB

Funnily enough, I asked this exact question on Math.SE a couple years ago: Maximum number of vertices in intersection of triangle with box. The answer is 9 vertices, because each of the 6 planes of ...
Accepted

### Logarithmic spiral with equal vertex spacing, what equations?

Since a logarithmic spiral is defined by $r=e^{a\cdot\theta}$, the inverse of the equation is this: $\theta=\frac{\ln{r}}{a}$. If we want to be able to control our step value, we can multiply it ...

### Why are oct trees so much more common than hash tables?

Lots of things here. "When reading papers". What papers? If the topic of the paper is about something other than the spatial partitioning structure, it could be fair to use whatever knowing that the ...
Accepted

### How does UV unwrapping work?

UV unwrapping is a difficult topic. They can be both combinatorial algorithms or variational methods but in general they're optimization based, i.e. you setup an optimization problem and you solve it ...
Accepted

### Projected grid water horizon detail

I believe a common solution is to split the camera transform used to project the grid from the camera transform that is used to render the grid. At perspectives close to top-down, the two cameras ...

### Why is the transposed inverse of the model view matrix used to transform the normal vectors?

This is simply because normals are not really vectors! They are created by cross products, which results in bivectors, not vectors. Algebra works much different for these coordinates, and geometric ...

### What formula or algorithm can I use to draw a 3D Sphere without using OpenGL?

Scratchapixel has a nice tutorial on writing a basic rasterizer here. Also, you could use the projection algorithm here to get the position of the vertices in screen space, then use Bresenham's ...
Accepted

### Archimedean spiral in C++

Figured it out :) The dominos are now being placed along the X and Y coordinates generated by the function. The original code in the question was plotting a wave of points outwards from the centre ...
Accepted

### What are 'mesh clusters' / hierarchical cluster culling (with LOD?) / triangle cluster culling and how do they relate?

First, to preface: the reason it's hard to find details about these hierarchical cluster culling systems because they are a still emerging field, at the very cutting edge of real-time rendering ...

### Ordering a set of unorganized points along a curve

You have an instance of a problem called curve reconstruction from unorganized points. Now that you know what to search for you'll find several methods, such as the crust, NN-crust, etc. Here are a ...

### Projected grid water horizon detail

You can be both realistical and real-time. the secret is to change representation each time the information get under the Shannon-Nyquist (i.e. grid) scale: from geometry to normal maps to shading ...
Accepted

### How should I fill a shape consisting of Bezier curves and straight lines?

If you are in a hurry to get your renderer working and you already have the filled polygonal routine functioning correctly, can I suggest an alternative, possibly easier approach? Though I'm not ...

### Why are texture coordinates often called UVs?

This is not a definitive answer, but it is generally accepted that Ed Catmull introduced Texture Mapping in his 1974 thesis, "A SUBDIVISION ALGORITHM FOR COMPUTER DISPLAY OF CURVED SURFACES" ...
Accepted

### Calculate aspect ratio from 2D shape in 3D space

The ratio is with a quick and dirty visual measurement $665:501$ which is approximately $5:4$. You can measure it by taking the ratio of the vanishing angles $\alpha/\beta$ (see picture 1) because we ...
Accepted

### How to convert Non-Axis Aligned Bounding Boxes to AABB

You can assign a coordinate system to each nAABB in such a way that the nAABB becomes an AABB in its own coordinate system. We call this a local coordinate system. I assume rays are expressed in a ...
Accepted

### Does a point have a length?

No, a point does not have a length. A point is only a location - it has no extent in any direction. You are correct in guessing that the function vSize() returns ...
Accepted

### Apply distortion to Bézier surface

Edit: changed the answer according to new images and clarification. for every control point p(k, n) p'(k, n) = ( p(k, n) - p(k) ) * d * l(k) + p(k, n) where <...
Accepted

### Convex non simple polygon?

For a polygon to be convex the outside angle of the polygon has to be more than or equal to 180 degrees. Now at intersection of 2 lines the outermost angle has to be less than 180 degrees for the ...
Accepted

### Why are oct trees so much more common than hash tables?

My 2 cents from writting the Chipmunk2D physics engine is that spatial hashing is great when you have a lot of objects that are all the same size. I had a demo 10 years ago that ran with 20k ...

### Why are texture coordinates often called UVs?

In math, geometry and physics it is common practice to use the coordinates $(u,v)$ to represent an arbitrary parameterization, including those of a surface in a 3d Euclidean space. Since the ...

### Archimedean spiral in C++

This isn't really a direct answer to this question (that already has an answer anyway), but might interest people who want to implement this algorithm in 3D. I had to try implementing this algorithm ...

### Ordering a set of unorganized points along a curve

After some clarifications, there is probably a much better approach that doesn't even require knowing the parametric form of the curve, and also avoids the potentially problematic numeric minimisation ...
Take a point $P$ and it's rotated point $P'$. Find the plan that runs through the middle between them $C = \frac{P+P'}{2}$ and is perpendicular to the line connecting them. Do this for all 3 of them ...