Vertical normals for a cube

The cube has 8 unique vertices. Is it true that each of these 8 vertex normals (unit vectors) is 135 degrees with respect to each of the edges that share this vertex? And is the vertex normal pointing out / out of the cube? Your answer must be technically correct. Or does it depend on how the cube is defined (drawn), like the use of triangles or indices that define 2 triangles for each side of the cube? The goal of the vertex normal is smooth shading and lighting in the OpenGL ES application.

+4
source share
4 answers

If the cube is defined by 8 unique vertices, then, in your opinion, the normals are likely to have an angle of 135 degrees to each edge.

However, a cube is often determined using 24 vertices for precisely this reason. This allows you to have vertex normals perpendicular to each face, by “duplicating” the vertices in each corner. The definition of a cube in this way effectively defines only 6 separate faces, each of which is directed outward, respectively.

+11
source

There is no point in smoothing an 8-vertex cube to make it look like a sphere. This way you get an extremely ugly sphere. The only reasonable way to draw a cube is to use 24 unique vertices.

+4
source

The center-oriented normals of the eight corner vertices of the cube actually form an angle of 125 degrees, 16 minutes with each connected edge.

A good discussion of this topic elsewhere on SO.

0
source

What does “normal peak” mean?

I understand what a normal vector means for each of the faces.

Since each vertex is divided by three faces (as long as the cube is not degenerate anywhere), the corner point is indeed a singularity. The value you get for a regular vector depends on which person you are traveling with.

So, does “vertex normal” mean the average of the normals of common faces for you?

A trilinear cube will have linear edges and flat sides, but this is the only way to define a three-dimensional shape. You can use higher order polynomials as a function of form; it will complicate your life. Can your graphics library allow such a thing?

-2
source

Source: https://habr.com/ru/post/1340382/


All Articles