How are these Newell's method implementations for surface normals equivalent?

1.5k Views Asked by At

Newell's method for surface normals is described here in the final section. In summary, the normal vector of a plane in 3D can be computed by representing each component of the vector as the sum of the trapezoidal areas of that edge on its 2D projection, that is to say:

$$n = \langle n_{x}, n_{y}, n_{z} \rangle$$ where each component can be defined as:

$$n_{x} = -\frac{1}{2} \sum_{i=1}^{n}(z_{i} + z_{i+1})(y_{i+1} - y_{i})$$ $$n_{y} = -\frac{1}{2} \sum_{i=1}^{n}(x_{i} + x_{i+1})(z_{i+1} - z_{i})$$ $$n_{z} = -\frac{1}{2} \sum_{i=1}^{n}(x_{i} + x_{i+1})(y_{i+1} - y_{i})$$

where for a polygon with vertices $V_{1} = (x_{1}, y_{1}, z_{1})$ to $V_{n} = (x_{n}, y_{n}, z_{n})$ where $n = 4$. This represents a closed polygon where the following holds:

$$V_{n+1} = V_{1}$$

That is, the edge of the polygon that "wraps" or closes the polygon.

My question is on implementations seen here (pseudo-code), here (PDF) and here (PDF, page 493). It appears that they all take the form:

$$n_{x} = \sum_{i=0}^{n}(y_{i} - y_{i+1})(z_{i} + z_{i+1})$$ $$n_{y} = \sum_{i=0}^{n}(z_{i} - z_{i+1})(x_{i} + x_{i+1})$$ $$n_{z} = \sum_{i=0}^{n}(x_{i} - x_{i+1})(y_{i} + y_{i+1})$$

where for a polygon with vertices $V_{0} = (x_{0}, y_{0}, z_{0})$ to $V_{n-1} = (x_{n-1}, y_{n-1}, z_{n-1})$ where $n = 4$, the following holds:

$$V_{n} = V_{0}$$

and again "wraps" or closes the polygon. These implementations however, as noted on the page in the last PDF link, yield twice the signed area of the trapezoidal projection.

So why is it that these implementations are accepted when they fail to compute the area of a trapezoid as defined by dividing by half? Wont this make the normal vector twice what it should be?

1

There are 1 best solutions below

0
On

I see three different computations in these links.

  1. a surface normal with magnitude equal to the sum of the trapezoidal areas
  2. a surface normal of any magnitude
  3. a surface normal of unit magnitude

Case 1 is both a correct sum of the areas and a surface normal. But if the sum aka magnitude isn't interesting then the following cases save work.

Case 2 isn't concerned with magnitude, only the direction (perpendicular and outward to the polygon face) is important, so they omit scaling the result by 1/2. It is therefore twice what it should be as you pointed out.

Case 3 is presumably the reason case 2 is acceptable. If a surface normal of magnitude 1 is desired then any intermediate scaling is redundant.