# Tag Info

25

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 some matrix $M$. In other words, I want to find a new plane equation $n' \cdot Mx + d' = 0$ that is satisfied for exactly the same $x$ values that satisfy the ...

23

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", GDC 2014) and "Killzone: Shadow Fall" uses 7 LOD meshes per character (Michal Valient - "Killzone: Shadow fall demo postmortem", Devstation2013). Most of them ...

16

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 increasing the detailing of the mesh geometry? Human eyes cant actually see curvature except on the edges of objects. All they can do is approximate the smoothness and ...

16

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 points $P_i$ into $P^\prime_{2i}$ and $P^\prime_{2i+1}$; then, moving each point to the midpoint between it and the next point, so $P^\prime_i \rightarrow \... 12 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 point on a sphere is trivial to compute. Put simply, when you know the derivative of the function, you also know the normal. If your case is narrow enough to ... 11 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. But that is of no importance here, we can use that method by adding a rejection clause to it. In this case you simply want certain parts not to be smoothed ... 9 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 by a scalar ($a\cdot k$) before taking the logarithm, like so:$\theta=\frac{\ln (ak\cdot r)}{a}$Therefore, if we take the natural log of theta multiplied ... 9 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 basic ideas will translate to other structures. Or not, hard to say. "For example for ray tracing an oct tree, near misses will cause you to iterate through a ... 8 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 the box can cut off one corner of the polygon, replacing one vertex with two. So 3 vertices + 6 added vertices due to clipping = 9 total. 8 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 using some numerical optimization solver. I'm just going to give you some names and some libraries you can use eventually. I'll give you few names (both classic ... 7 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 coincide, but as the viewing camera gets close to a horizontal perspective, the projection camera deviates and tries to keep a minimum inclination, i.e. it hovers ... 7 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 transformation is just one operation that behaves differently. A great resource for learning more about this is Eric Lengyel's presentation on Grassman Algebra. 7 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 algorithm or DDA to draw lines in between. If you want to fill them too you can use scanline (you can find it on Wikipedia). For ellipsoids, you can either just turn ... 7 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 position or origin and was not what I wanted. What I needed was for each point to follow the Archimedean spiral with a certain space between the spirals. ... 6 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 few links: The Crust Curve Reconstruction Applet Curve Reconstruction by Tamal Dey Curve and Surface Reconstruction: Algorithms with Mathematical Analysis, book ... 6 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 models. This paper is made for you: http://maverick.inria.fr/Publications/2010/BNH10/index.php (see also Yoube videos) 6 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 familiar with Lua, it seems you are solving for the exact intersection of a scan line with the quadratic Bezier which, though admirable, is possibly overkill. ... 6 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" In that, he uses (U,V) to access the image data (see the page labeled 36 in the above) MAPPING Photographs, drawings, or any picture can be mapped onto ... 5 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 are so close to the center. Image 1: Ratio of the inbound angles We can check the situation visually by drawing a 2 point perspective grid. For this we need ... 5 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 world or global coordinate system. In order to test an nAABB for intersection, one first needs to apply the world-to-local transformation on the ray (origin and ... 5 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 the distance from the origin to the point. The other function, vSize2() returns the square of that distance. This is used in calculating the distance, and in some cases it may be useful to work ... 5 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 k is the row index and n is the column index of control point. l is the elevation factor and is equal to {-1, -1/3, 1/3, 1}. p(k) is the center of the k'th row. Rationale: From the new images, red ... 5 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 lines to intersect between the endpoints. Now the answer to this question depends on how you define what is inside of the polygon. If you consider some a even odd ... 5 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 interacting particles on a Core 2 Duo in real time. The spatial hash worked great for that if you tuned it. I've since replaced the spatial hash with a binary AABB tree ... 5 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 coordinates of the parameterisation might be arbitrary (it could be an angle, or a function of the Euclidean coordinates$(x,y,z)$, or something else), it is helpful to ... 4 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 to generate 3D spirals in blender using Python (could easily be converted to drawing with PIL or Matplotlib in 2D). So here's the algorithm and result: import ... 4 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 step. If the curve does not intersect itself and the points are sufficiently densely packed on the curve (and by that I mean they have to be closer than any ... 4 That is, to my knowledge, a problem without a proper solution. You're seeing the discrepancy between shading normal and geometry normal and it becomes obvious, that the shading normal is just a trick. PBRT has a paragraph on this, their solution is to look at the geometric normal to determine whether to call the BRDF (reflection) or the BTDF (transmission), ... 4 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 and find the line of the planes' intersection. That will be the rotation axis. If all mid-planes are coplanar then you can use the planes of the triangles ... 4 As I said in the comments, this is indeed called torus or toroidal space when it comes to the topology. Even if the images suggest something 3 dimensional, this is just a visualization of the embedding of such a space in$\mathbb R^3$. Regarding the distance between two points, I think you mean following: Just consider the coordinates$p=(x_1,y_1)$and$q=(...

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