Browse Prior Art Database

Method for Efficiently Computing Rectangles to Represent Wide Lines for Computer Graphics Systems

IP.com Disclosure Number: IPCOM000121090D
Original Publication Date: 1991-Jul-01
Included in the Prior Art Database: 2005-Apr-03
Document File: 3 page(s) / 85K

Publishing Venue

IBM

Related People

Einkauf, MA: AUTHOR

Abstract

In computer graphics systems, three-dimensional (3D) lines are projected onto a two-dimensional (2D) screen. Often, it is desired that the 2D projection of a line be displayed with a width of more than one pixel (i.e., as a "wide" line). Furthermore, it is desired that the display of wide lines not significantly degrade system performance. Treating wide lines as rectangles provides a great deal of visual accuracy. A method is given here which efficiently and accurately computes the vertices of the "wide line rectangle" for lines at any angle, and for any arbitrary width. Also, two endstyles are supported by the method.

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

Method for Efficiently Computing Rectangles to Represent Wide Lines
for Computer Graphics Systems

      In computer graphics systems, three-dimensional (3D)
lines are projected onto a two-dimensional (2D) screen.  Often, it is
desired that the 2D projection of a line be displayed with a width of
more than one pixel (i.e., as a "wide" line).   Furthermore, it is
desired that the display of wide lines not significantly degrade
system performance. Treating wide lines as rectangles provides a
great deal of visual accuracy.  A method is given here which
efficiently and accurately computes the vertices of the "wide line
rectangle" for lines at any angle, and for any arbitrary width.
Also, two endstyles are supported by the method.

      Fig. 1 shows a line, AB, for which the rectangle 1234 is
computed as the wide line rectangle.  dX is B.x-A.x, dY is B.y-A.y, W
is the desired width.  Fig. 1 also shows the derivation of dxw and
dyw which are used to produce vertex 1 of the rectangle.

      dxw and dyw are used to compute all four vertices of the
rectangle, as shown in Fig. 2.  It has been analytically and
experimentally verified that the formulation in Fig. 2 is correct for
all line widths and orientations.

      The formulation in Fig. 2 provides a wide line with a "Flat"
endstyle.  Another desired endstyle is "Square", in which the
rectangle ends are extended by 1/2 the line width in a direction
parallel to the original line.  Fig. 3 shows the derivat...