temp

TAPESTRY: The Art of Representation and Abstraction

Modeling Errors: Non-planar, or Twisted Polygons


Twisted Polygons

Sounds like a rock group, doesn't it?

A "well behaved" polygon is like a shape cut from a piece of cardboard. It has corners, or vertexes, that all reside in one plane. It has edges that don't cross each other. Usually it doesn't have any holes in it (see elsewhere). Alas, not all polygons are well-behaved!

[Twisted Polygon] There are really two kinds of twisted polygon, one which is pretty hard to make, and one which is actually pretty easy to make. The 'hard to make' kind arise from getting the order of a set of points wrong. Thus, the points of the polygon shown in the left-hand figure at right should go (a b c d) but one could imagine accidentally entering (a b d c ) in some manual-entry situation, resulting in the polygon shown to the right. These types of twisted poly may also appear during translation of data from one program to another. Fixing them usually involves replacing them with correct data. Ouch!

Non-planar Polygons

The more likely type of twisted polygon is the "non-planar" polygon, in which there is no plane that passes through all the vertex points. They are really quite easy to make by accident and some modeling tools or editing commands make them during normal operation. The existence of these wild-children in your data may not even be noticed, or be a problem, until you perform certain operations where their true nature comes out. How can that be? Consider the following scenario, in which a cylinder is to be subtracted (via a boolean operation) from a cubical (or nearly cubical) shape.

[Simple Example that Works] At left we see the result of subtracting a cylinder from a simple rectangular solid. A rounded piece is missing.


[A cuboid with a twisted top] The shape at right is the same shape as that shown above, except the point on the top at the right-hand edge has been moved straight up above it's former position.

The sides of the shape remain four sided and planar, though no longer rectangular. The top however, has been twisted and is no longer planar. In most viewing operations this presents little problem, but if it is necessary to perform an operation such as our boolean difference, there is a problem -- the line of intersection between the top of the cuboid and the side of the cylinder is no longer well defined!


[One interpretation] The images shown here and below show two of an infinite number of possible interpretations of how the four edges of the cuboid's top might meet the cylinder. The problem is that as soon as we relax the requirement that the surface of the polygon be planar, which we must in this case, we no longer know exactly where it is. So we no longer know where a line of intersection with another shape should be. That's "Not good".


[Another interpretation] These two graphics also show a simple way of fixing the problem--we simply insert a new edge diagonally across the top of the cuboid (as shown in red), along either one diagonal or the other, and create two triangular pieces. Triangles are ALWAYS planar, which is why some programs present opportunities or commands to "Triangulate" the data.



Last updated: April, 2014

Valid HTML 4.01 Transitional Valid CSS! [report bug]