Dismiss
InnovationQ will be updated on Sunday, Jan. 21, from 9am - 11am ET. You may experience brief service interruptions during that time.
Browse Prior Art Database

Method for Accurately Rendering Edges on Simple and Complex Polygons

IP.com Disclosure Number: IPCOM000122565D
Original Publication Date: 1991-Dec-01
Included in the Prior Art Database: 2005-Apr-04
Document File: 4 page(s) / 140K

Publishing Venue

IBM

Related People

Einkauf, MA: AUTHOR [+2]

Abstract

Edges on polygons are often rendered as lines. This results in the values and visual results of the edges being inaccurate. This method generates numerically and visually accurate edges of any width and pattern styles.

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

Method for Accurately Rendering Edges on Simple and Complex Polygons

      Edges on polygons are often rendered as lines.  This
results in the values and visual results of the edges being
inaccurate. This method generates numerically and visually accurate
edges of any width and pattern styles.

      Typically, computer graphics systems render polygon edges by
first rendering a normal polygon, then connecting the polygon
vertices with lines.  Drawing the edge as a line requires that the
line have a substantial positive z offset to prevent "pixel-popping"
since line and triangle interpolation algorithms produce different z
values along a line or triangle edge.  This required z offset
introduces significant numerical inaccuracy, which often produces
incorrect visual effects.  Also, drawing the edge as a polygon will
produce inaccurate results if frame buffer updates are conditioned on
logical operations.

      Accurate edges contain only pixels which contain the same x, y,
and z values as the polygon itself, e.g., they are stenciled on the
polygon.  To produce polygon edges that are numerically accurate, it
is necessary to draw the edge itself as a polygon.  However, the
"edge polygon" cannot simply be drawn on top of the original polygon
for two reasons:
1)   Errors inherent to integer interpolation cause the interior
x,y,z values of the edge polygon to be very close to but not
identical to the interior values of the original polygon.  Therefore,
portions of the original polygon would "bleed through" the overlaying
edge.
2)   Updating portions of the polygon's interior twice can create
errors if logical operations are used, as described above.

      In the method disclosed herein, both of these errors are
prevented by using a single bit plane (called the "microcode plane
mask", or MPM).  By rendering portions of the polygon into the MPM a
"mask" is created. Portions of the polygon are then rendered to the
frame buffer while comparing to the MPM to produce accurate polygon
edges.  The method has been adapted for convex and concave polygons
of various fill styles (hollow, solid, empty, pattern, hatch). Edges
of arbitrary width and style (i.e., dotted, dashed, etc.) are
supported.

      There are several basic operations which are used in various
sequences to support the different edge styles/widths for convex or
concave polygons of various interior fill styles.  They are as
follows:
      Operations which set conditions:
      INIT: Initialize state to z-buffer update ON, MPM compare OFF.
       Z_OFF: Disable updating of z-buffer while rendering to frame
buffer
       FB_WITH_MPM_COMPARE: Set condition to render following objects
to frame buffer while comparing with MPM contents.
      Operation which render polygons:
       EDGED_PAT/HATCH_POLYGON: Render entire polygon to MPM.
       MPM_POLYGON:             Render entire polygon to MPM.
       SIMP...