Browse Prior Art Database

Efficient Vertex Clipping in Window Based Graphics and Image Applications

IP.com Disclosure Number: IPCOM000105338D
Original Publication Date: 1993-Jul-01
Included in the Prior Art Database: 2005-Mar-19
Document File: 2 page(s) / 60K

Publishing Venue

IBM

Related People

Karim, F: AUTHOR [+3]

Abstract

Window based graphics applications require to run a clipping algorithm on each vertex to determine whether to display the vertex or not. Typically the clipping algorithm has three steps. The first step is to generate the region codes, the second step is to run the trivial accep- tance tests and the third step is to determine the cross over point for a set of vertices if one vertex is outside the window and the other vertex is inside the window.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Efficient Vertex Clipping in Window Based Graphics and Image Applications

      Window based graphics applications require to run a clipping
algorithm on each vertex to determine whether to display the vertex
or not.  Typically the clipping algorithm has three steps.  The first
step is to generate the region codes, the second step is to run the
trivial accep- tance tests and the third step is to determine the
cross over point for a set of vertices if one vertex is outside the
window and the other vertex is inside the window.

      The region codes are generated from assigning a bit pattern to
each region.  The trivial acceptance test step requires a compound if
state- ment (Figure) as follows:

         if (( -w < x) || (-w < y) || (-w < Z) ||
               (w > x) || ( w > y) || (w > z)) clip_vertex( );

Trivial acceptance test traditionally requires six floating point
compares and six conditional branches and needs to be done on all
vertices.  Reducing the number of compares in the compound if
statement improves the performance for each vertex processing.

      Traditionally, the trivial acceptance sequence has been done
using six floating point compares and six branch instructions.  Using
an absolute compare instruction fcmpa, this can be reduced to three
com- pares and three conditional branches.  The trivial acceptance
testing sequence can now be constructed as follows:

                        fcmpa:            # test x-coordinate
                        fcmpa:            # test y-coordinate
                        fcmpa:            # test z-coordinate
                        bc:               # branch on x out of bounds
         ...