Three-Dimensional Clipping


Problem statement

Like most everything else we've seen this semester, clipping in three dimensions is more complicated than clipping in two dimensions.

But before we dive in lets take a step back and ask a few questions.

What is clipping?

Why do we clip?

Clipping is an important optimization.

Cohen-Sutherland Outcode Clipping

Cohen-Sutherland outcode clipping is used primarily in partioning applications or for trivial rejection for visiblity computation. The idea is very simple and it can be explained in two dimensions.

For each primitive that we test we will assign a single bit to each clipping boundary. In this two-dimensional example, we are clipping against four boundaries, thus we will need four bits.

We then consider each of the vertices defining the primitive under consideration. If all of these vertices are have an out code of all zeros the primitive is trivially accepted. It is trivially rejected if the bit-by-bit logical and of the codes for each vertex is not all zeros.

Let's consider some simple examples:

For lines only the two end points are considered. In trangles, or any convex polygon we consider each vertex.

Sutherland-Hodgman Plane-at-a-time Clipping


Other Clipping algorithms


This page was last modified on Monday, November 04, 1996