METHOD AND APPARATUS FOR SPAN SORTING RENDERING SYSTEM

Abstract: The invention (Figure 5) provides for a data shifting capability that permits sorting the data in addition to searching for obtaining real-time performance in color, with high quality imagery through a simple search of a spatial database based on a rectangularly shaped search region or range search (see figure 13). A Sorting Magnitude Comparison Content Addressable Memory (SMCCAM) performs a range search, introducing a conservative approximation of the ideal Occluding Region, and provides an MCCAM wherein the data words stored in the fields is shifted to corresponding fields in an adjacent word, based on the magnitude comparisons (see figure 7). The 3D graphics method stores the parameters of a polygon span in a spatial database (804-814) and a query operation is performed on the database to determine which of those spans, or portions of spans, are visible (816 and 818), and applies a rule for comparing new span portion to an old span portion on a subspan-by-subspan basis, thereby providing additional polygon edge information within a raster line, providing antialiasing.

Description: Method and Apparatus for Span Sorting Rendering System Field of the Invention The field of this invention is twofold: 1) three-dimensional computer graphics; and 2) computer memories, and more specifically. Content Addressable Memories (CAM). Background of the Invention Three-dimensional Computer Graphics Computer graphics is the ait and science of generating pictures with a computer. Generation of pictures, or images, is commonly called rendering. Generally, in three-dimensional (3D) computer graphics, geometry that represents surfaces (or vol¬ umes) of objects in a scene is translated into pixels stored in a frame buffer, and then displayed on a display device. Real-time display devices, such as CRTs used as computer monitors, refresh the display by continuously displaying the image over and over. This refresh usually occurs row-by-row, where each row is called a raster line or scan line. In this document, raster lines are numbered from bottom to top, but are displayed in order from top to bottom. In a 3D animation, a sequence of images is displayed, giving the illusion of motion in three-dimensional space. Inter¬ active 3D computer graphics allows a user to change his viewpoint or change the geometry in real-time, thereby requiring the rendering system to create new images on-the-fly in real-time. In 3D computer graphics, each renderable object generally has its own local object coordinate system, and therefore needs to be translated 202 (or transformed) from object coordinates to pixel display coordinates. Conceptually, this is a 4-step process: 1) translation (including scaling for size enlargement or shrink) from object coordinates to world coordinates, which is the coordinate system for the entire scene; 2) translation from world coordinates to eye coordinates, based on the viewing point of the scene; 3) translation from eye coordinates to perspective translated eye coordinates, where perspective scaling (farther objects appear smaller) has been performed; and 4) translation from perspective translated eye coordinates to pixel coordinates, also called screen coordinates. Screen coordinates are points in three-dimensional space, and can be in either screen-precision (i.e., pixels) or object-precision (high precision numbers, usually floating-point), as described later. These translation steps can be compressed into one or two steps by precomputing appropriate translation matrices before any translation occurs. Once the geometry is in screen coordinates, it is broken into a set of pixel color values (that is "rasterized") that are stored into the frame buffer. Many techniques are used for generating pixel color values, including Gouraud shading, Phong shading, and texture map¬ ping. A summary of the prior art rendering process can be found in: "Fundamentals of Three-dimensional Computer Graph¬ ics", by Watt, Chapter 5: The Rendering Process, pages 97 to 113, published by Addison-Wesley Publishing Company, Reading, Massachusetts, 1989, reprinted 1991, ISBN 0-201-15442-0 (hereinafter referred to as the Watt Reference). Figure 1 shows a three-dimensional object, a tetrahedron 110, with its own coordinate axes (fo b v o b j > 2 o b j)- Ω> e three- dimensional object 110 is translated, scaled, and placed in the viewing point's 130 coordinate system based on (x eye , y tyt , Zq t ). The object 120 is projected onto the viewing plane 102, thereby correcting Cor perspective. At this point, the object appears to have become two-dimensional; however, the object's z-coordinates are preserved to they can be used later by hidden surface removal techniques. The object is finally translated to screen coordinates, based on fr, ,„,, y^na,, Zιcm t a) > where 2, 0 -*-, is going perpendicularly into the page. Points on the object now have theirx and y coordinates described by pixel location (and fractions thereof) within the display screen 104 and their z coordinates in a scaled version of distance from the viewing point 130. Because many different portions of geometry can affect the same pixel, the geometry representing the surfaces closest to the scene viewing point 130 must be determined. Thus, for each pixel, the visible surfaces within the volume subtended by the pixel's area determine the pixel color value, while hidden surfaces are prevented from affecting the pixeL Non-opaque surfaces closer to the viewing point than the closest opaque surface (or surfaces, if an edge of geometry crosses the pixel area) affect the pixel color value, while all other non-opaque surfaces are discarded. In this document, the term "occluded" is used to describe geometry which is hidden by other non-opaque geometry. Many techniques have been developed to perform visible surface determination, and a survey of these techniques are incorporated herein by reference to: "Computer Graphics: Principles and Practice", by Foley, van Dam, Feiner, and Hughes, Chapter 15: Visible-Surface Determination, pages 649 to 720, 2nd edition published by Addison-Wesley Publishing Company, Reading, Massachusetts, 1990, reprinted with corrections 1991, ISBN 0-201-12110-7 (hereinafter referred to as the Foley Refer¬ ence). In the Foley Reference, on page 650, the terms "image-precision" and "object-precision" are defined: "Image-precision algorithms are typically performed at the resolution of the display device, and determine the visibility at each pixel. Object-pre¬ cision algorithms are performed at the precision with which each object is defined, and determine the visibility of each object" As a rendering process proceeds, most prior art renderers must compute the color value of a given screen pixel multi¬ ple times because multiple surfaces intersect the volume subtended by the pixel. The average number of times a pixel needs to be rendered, for a particular scene, is called the depth complexity of the scene. Simple scenes have a depth complexity near unity, while complex scenes can have a depth complexity of ten or twenty. As scene models become more and more complicated, ren¬ derers will be required to process scenes of ever increasing depth complexity. Thus, for most renders, the depth complexity of a scene is a measure of the wasted processing. For example, for a scene with a depth complexity of ten, 90% of the computation is wasted on hidden pixels. This wasted computation is typical of hardware renderers that use the simple Z-buffer technique (dis¬ cussed later herein), generally chosen because it is easily built in hardware. Methods more complicated than the Z-buffer tech¬ nique have heretofore generally been too complex to build in a cost-effective manner. An important feature of the method and apparatus invention presented here is the avoidance of this wasted computation by eliminating hidden portions of geometry before they are rasterized, while still being simple enough to build in cost-effective hardware. When a point on a surface (frequently a polygon vertex) is translated to screen coordinates, the point has three coordi¬ nates: 1) the jc-coordinate in pixel units (generally including a fraction); 2) the y-coordinate in pixel units (generally including a fraction); and 3) the 2-coordinate of the point in either eye coordinates, distance from the virtual screen, or some other coordinate system which preserves the relative distance of surfaces from the viewing point In this document positrvez-coordinate values are used for the "look direction" from the viewing point and smaller values indicate a position closer to the viewing point When a surface is approximated by a set of planar polygons, the vertices of each polygon are translated to screen coor¬ dinates. For points in or on the polygon (other than the vertices), the screen coordinates are interpolated from the coordinates of vertices, typically by the processes of edge walking 218 and span interpolation 220. Thus, a z-coordinate value is generally included in each pixel value (along with the color value) as geometry is rendered. Generic 3D Graphics Pipeline Many hardware renderers have been developed, and an example is incorporated herein by reference: "Leo: A System for Cost Effective 3D Shaded Graphics", by Deering and Nelson, pages 101 to 108 of SIGGRAPH 93 Proceedings, 1-6 August 1993, Computer Graphics Proceedings, Annual Conference Series, published by ACM SIGGRAPH, New York, 1993, Softcover ISBN 0-201-58889-7 and CD-ROM ISBN 0-201-56997-3 (hereinafter referred to as the Deering Reference). The Deering Refer¬ ence includes a diagram of a generic 3D graphics pipeline 200 (i.e., a renderer, or a rendering system) that it describes as "truly generic, as at the top level nearly every commercial 3D graphics accelerator fits this abstraction", and this pipeline diagram is reproduced here as Figure 2. Such pipeline diagrams convey the process of rendering, but do not describe any particular hard- ware. This document presents a new graphics pipeline 400 that shares some of the steps of the generic 3D graphics pipeline 200. Each of the steps in the generic 3D graphics pipeline 200 will be briefly explained here, and are also shown in the method flow diagram 300 of Figure 3. Processing of polygons is assumed throughout this document but other methods for describing 3D geometry could be substituted. For simplicity of explanation, triangles are used as the type of polygon in the described methods. As seen in Figure 2, the fist step within the floating-point intensive functions 250 of the generic 3D graphics pipeline 200 is the transformation step 202, which was described above. The transformation step 202 is also shown in Figure 3 as the first step in the outer loop of the method flow diagram 300, and also includes "get next polygon". The second step, the clip test 204, checks the polygon to see if it is at least partially contained in the view volume 106 (sometimes shaped as a frustum). If the polygon is not in the view volume 106, it is discarded; otherwise processing continues. The third step is face determination 206, where polygons facing away from the viewing point are discarded. Generally, face determination 206 is applied only to objects that are closed volumes. The fourth step, lighting computation 208, generally includes the set up for Gouraud shading and/or texture mapping with multiple light sources of various types, but could also be set up for Phong shading or one of many other choices. The fifth step, clipping 210, deletes any portion of the polygon that is outside of the view volume 106 because that portion would not project within the rectangular area of the viewing plane 102. Generally, polygon clipping 210 is done by splitting the polygon into two smaller polygons that both project within the area of the viewing plane 102. Polygon clipping is computationally expensive, but its need is avoided in the invention presented here, thus providing computational savings. The sixth step, perspective divide 212, does perspective correction for the projection of objects onto the viewing plane 102. At this point the points representing vertices of polygons are converted to pixel-space coordinates by step seven, the screen space conversion 214 step. The eighth step, set up for incremental render 216, computes the various begin, end, and increment values needed for edge walking 218 and span interpolation 220 (e.g.: x, y, and z-coordinates; RGB color, texture map space u and v-coordinates; etc.). Within the drawing intensive functions 260, edge walking 218 incrementally generates horizontal spans for each raster line of the display device by incrementing values from the previously generated span (in the same polygon), thereby "walking" vertically along opposite edges of the polygon. Similarly, span interpolation 220 "walks" horizontally along a span to generate pixel values, including a z -coordinate value indicating the pixel's distance from the viewing point 130. By comparing this z -coordinate value to the corresponding value stored in the Z-buffer, the z-buffered Mend222 either keeps the new pixel values (if it is closer to the viewing point than previously stored value for that pixel location) by writing it into the frame buffer224, or discards the new pixel values (if it is farther). At this step, antialiasing methods (discussed in the next section) can blend the new pixel color with the old pixel color. The generic 3D graphics pipeline 200 includes a double buffered frame buffer 224, so a double buffered MUX 226 is also included. An output lookup table 226 is included for translating color map values. Finally, digital to analog conversion 228 makes an analog signal for input to the display device. A major drawback to the generic 3D graphics pipeline 200 is its drawing intensive functions 260 are not deterministic at the pixel level given a fixed number of polygons. That is, given a fixed number of polygons, more pixel-level computation is required as the average polygon size increases. However, the floating-point intensive functions250 are proportional to the num- ber of polygons, and independent of the average polygon size. Therefore, it is difficult to balance the amount of computational power between the floating-point intensive functions 250 and the drawing intensive functions 260 because this balance depends on the average polygon size. An ideal renderer's pixel drawing computational requirement would be proportional to the number of pixels in the dis- play screen 104, not the total number of pixels in all the polygons in the view volume 106. This ideal is achieved by the invention described here because bidden geometry is removed before most drawing intensive functions are performed. In the invention described here, computational load balancing is not a problem because the amount of floating-point computation is essentially independent of the amount of drawing computation. Antialiasing In this document pixels are defined to be the smallest individually controllable element of the display device. But because images are quantized into discrete pixels, spatial aliasing occurs. A typical aliasing artifact is a "staircase" effect caused when a straight line or edge cuts diagonally across rows of pixels. An ideal antialiased image eliminates this "staircase" effect by calculating, for each pixel, an average color by taking into account partial coverage by the visible surfaces within the pixel's area. Some rendering systems reduce aliasing effects by dividing pixels into subpixels, where each sub-pixel can be colored independently. When the image is to be displayed, the colors for all sub-pixels within each pixel are blended together to form an average color for the pixel. A renderer that uses 16 sub-pixels per pixel is described in "RealityEngine Graphics", by Akeley, pages 109 to 116 of SIGGRAPH 93 Proceedings, 1-6 August 1993, Computer Graphics Proceedings, Annual Conference Series, published by ACM SIGGRAPH, New York, 1993, Softcover ISBN 0-201-58889-7 and CD-ROM ISBN 0-201-56997-3 (herein¬ after referred to as the Akeley Reference). The drawback with using subpixels is the increase in computation due to computing color values at every subpixel. In the Akeley Reference, the increase in computation is reduced by only dividing a pixel into sub¬ pixels when the pixel is crossed by a line or an edge of a polygon. This reduction becomes less significant as the number of poly¬ gons increases. In other words, if the image is made up of lots of small overlapping polygons, then most pixels will need to be divided. Utilization of subpixels is an image-precision antialiasing technique. Another prior art antialiasing method is the A-Buffer used to perform alpha blending (this technique is also included in the Akeley Reference), and is described in "The A-buffer, an Antialiased Hidden Surface Method" by L. Carpenter, SIGGRAPH 1984 Conference Proceedings, pp. 103-108 (hereinafter referred to as the Carpenter Reference). TheA-buffer is an image-preci¬ sion antialiasing technique that reduces aliasing by keeping track of the percent coverage of a pixel by a rendered polygon. The main drawback to this technique is the need to sort polygons front-to-back (or back-to-front) at each pixel in order to get accept¬ able antialiased polygons. An ideal antialiasing method would perform object-precision computations to precisely identify the visible portions of geometry. This would require comparing edges of polygons to each other in order to determine the fraction of each pixel covered by each polygon. The invention of this document performs object-precision antialiasing within each scan line, thus achieving this ideal. Z-buffers Stated simply, the Z-buffer stores, for every pixel, thez-coordinate of the closest geometry (to the viewing point) that affects the pixel. Hence, as new pixel values are generated, each new pixel' z-coordinate is compared to the corresponding loca¬ tion in the Z-buffer. If the new pixel's z-coordinate is smaller (i.e., closer to the viewing point), this value is stored into the Z-buffer and the new pixel's color value is written into the frame buffer. If the new pixel 'sz-coordinate is larger ( e„ farther from the viewing point), the frame buffer and Z-buffer values are unchanged and the new pixel is discarded. The Z-buffer iβ an image- precision visible surface determination technique. A flow diagram including the prior art Z-buffer method is shown in Figure 3. The main drawback to the Z-buffer hid¬ den surface removal method is the requirement for geometry to be converted to pixel values before hidden surface removal can be done. This is because the keep/discard decision is made on a pixel-by-pixel basis. In contrast the invention of this document performs hidden surface removal at a higher level by processing spans rather than pixels. For scenes with any significant depth complexity, pixel-by-pixel hidden surface removal introduces much wasted computation by requiring all geometry within the view volume to be converted to pixels, even though most are hidden and, therefore, thrown away. In hardware rendering systems, pixel color generation (shading, texture mapping, etc.) often happens in parallel with the Z-buffer comparison test thereby com¬ pounding the wasted computation because much of the computation is associated with color generation, and most of the pixels are thrown away. Furthermore, the Z-buffer memory operation is a read-modify-write cycle, generally requiring the Z-buffer memory input/output bus to change directions twice when writing pixels into the frame buffer, thereby causing a bottleneck in the renderer. This bottleneck does not occur in the apparatus and method of the document's invention. Prior art Z-buffers are based on conventional Random Access Memory (RAM), Video RAM (VRAM), or special pur¬ pose DR AMs. One example of a special purpose DRAM is presented in "FBRAM: A new Form of Memory Optimized for 3D Graphics", by Deering, Schlapp, and Lavelle, pages 167 to 174 of SIGGRAPH 94 Proceedings, 24-29 July 1994, Computer Graphics Proceedings, Annual Conference Series, published by ACM SIGGRAPH, New York, 1994, Softcover ISBN 0-201-60795-6. Geometry Databases The geometry needed to generate a renderable scene is stored in a database. This geometry database can be a simple display list of graphics primitives or a hierarchically organized data structure. In the hierarchically organized geometry database, the root of the hierarchy is entire database, and the first layer of subnodes in the data structure is generally all the objects in the "world" which can be seen from the viewpoint Each object in turn, contains subobjects, which contain sub-subobjects; thus resulting in a hierarchical "tree" of objects. Hereinafter, the term "object" shall refer to any node in the hierarchial tree of objects. Thus, each subobject is an object. The term "root object" shall refer to a node in the first layer of subnodes in the data structure. Hence, the hierarchical database for a scene starts with the scene root node, and the first layer of objects are root objects. Hierarchical databases of this type are used by the Programmer's Hierarchical Interactive System (PHIGS) and PHIGS PLUS standards An explanation of these standards can be found in the book, "A Practical Introduction to PHIGS and PHIGS PLUS", by T. L. J. Howard, et. al., published by Addison-Wesley Publishing Company, 1991, ISBN 0-201-41641-7 (incorpo¬ rated herein by reference and hereinafter called the Howard Reference). The Howard Reference describes the hierarchical nature of 3D models and their data structure on pages 5 through 8. Hierarchical models can provide a separate transformation matrix at each layer of the hierarchy, thereby making it possible to move models or parts of a models simply by changing a transformation matrix. This allows non-changing model geometry (in object coordinates) to be used as moving objects in an animation. Content Addressable Memories Most Content Addressable Memories (CAM) perform a bit-for-bit equality test between an input vector and each of the data words stored in the CAM. This type of CAM frequently provides masking of bit positions in order to eliminate the cor¬ responding bit in all words from affecting the equality test It is inefficient to perform magnitude comparisons in a equality-test- ing CAM because a large number of clock cycles is required to do the task. CAMs are presently used in translation look-aside buffers within a virtual memory systems in some computers. CAMs are also used to match addresses in high speed computer networks. CAMs are not used in any practical prior art renders. Magnitude Comparison CAM (MCCAM) is defined here as any CAM where the stored data are treated as numbers, and arithmetic magnitude comparisons (ix. less-than, greater-than, less-than-or-equal-to, etc.) are performed on the data in par- allel. This is in contrast to ordinary CAM which treats stored data strictly u bit vectors, not as numbers. An MCCAM patent included herein by reference, is U.S. Patent Number 4,996,666, by Jerome F. Duluk Jr., entitled "Content-Addressable Memory System Capable of Fully Parallel Magnitude Comparisons", granted February 26, 1991 (hereinafter referred to as the Duluk Patent). Structures within the Duluk Patent specifically referenced shall include the prefix "Duluk Patent" (for example, "Duluk Patent MCCAM Bit Circuit"). MCCAMs are not used in any prior art renderer. The basic internal structure of an MCCAM is a set of memory bits organized into words, where each word can perform one or more arithmetic magnitude comparisons between the stored data and input data. In general, for an MCCAM, when a vec¬ tor of numbers is applied in parallel to an array of words, all arithmetic comparisons in all words occur in parallel. Such a paral¬ lel search comparison operation is called a "query" of the stored data. The invention described here augments the capability of the MCCAM by adding various features, including the ability «rrin £ Thi. > typ. rt MPPAM i. ^.11 ~rf\ n g . .ϊtll/ Pnmpmmn PAM (C.MPPAM) Summary of the Invention Computer graphics is the art and science of generating pictures or images with a computer. This picture generation is commonly referred to as rendering. The appearance of motion, for example in a 3-Dimensional animation is achieved by dis¬ playing a sequence of images. Interactive 3-Dimensional (3D) computer graphics allows a user to change his or her viewpoint or to change the geometry in real-time, thereby requiring the rendering system to create new images on-the-fiy in real-time. There¬ fore, real-time performance in color, with high quality imagery is becoming increasingly important The inventive apparatus and method provide a data shifting capability that permits sorting the data in addition to searching. It also provides a new way to perform a simple search of a spatial database based on a rectangularly shaped search region or range search. The range search may be performed in a special new Sorting Magnitude Comparison Content Address- able Memory (SMCCAM) apparatus. This SMCCAM provides a magnitude comparison content addressable memory wherein the data stored in the fields in each word of the memory may be shifted to corresponding fields in an adjacent word, where this shifting is conditionally performed based on the results of the magnitude comparisons. The 3D graphics method stores the parameters of a polygon span in a spatial database, and a query operation is per¬ formed on the database to determine which of those spans, or portions of spans, are visible. The spatial database of spans can be stored in an SMCCAM The SMCCAM apparatus is significant because its operation is fast enough to support real time opera¬ tion, such as for standard and emerging video technologies (NTSC, PAL, HDTV, and the like), visual flight simulators, virtual reality image generators, and the like, among other applications. Since the range search is used, it introduces a conservative approximation of the ideal Occluding Region. An Occlud¬ ing Test is provided which defines an Occluding Test Region as an approximation to the ideal Occluding Region. A rule based method is used when comparing the Current Span Portion with the New Span, where the New Span is found by the Occluding Test and read out of the data structure stored in memory. That memory may advantageously be the SMCCAM or it may be a conventional memory that implements the spatial data structure with conventional spatial database methods. Based on the results of the comparison, one rule out of several possible simple rues are selected and applied to determine which piece of the Current Span is visible, if any. Several alternative rules are described. Multiple alternative span representations are provided, including a Segment Span, Trapezoidal Span, and Quadrilateral Span. Each of these Spans is defined by its own set of span parameters, of which there are multiple selections of each. The span parameters are stored in a data structure in memory, which may be implemented by the SMCCAM, and are used during the query search operation. Each of these Span types have their own advantages. For example, a Trapezoidal Span or a Quadrilateral Span provides superior anti-aliasing performance than provided by a Segment Span. This performance advantage is achieved by preserving the left and right edge information of the polygon within a particular raster line. Several ways to handle the query operation for Trapezoidal and Quadrilateral Spans are described. Spatial searching and sorting apparatus and methods are provided such that spatial searching and sorting can be used to properly render transparent polygon spans in front-to-back or back-to-front order. The inventive apparatus, system, and method also provide several options and enhancements to the basic system. These include, by way of example: preservation of rendering order, utilization of a single-buffered frame buffer for increased compatibility with conventional video cards, the ability to selectively turn on or off anti-aliasing on specific polygon edges, the ability to store edge-pairs rather than polygons thereby simplifying downstream processing, the ability to eliminate the Current Polygon Memory by replacing it with a list of pointers, the ability to add clipping planes (front rear, and/or arbitrary), provision of a Geometry Cache for storing geometry as it is input for rendering, flexible options for the number of pages of Span Memory and Page Memory I O bus architecture, support for geometry primitives other than polygons (such as CSG primitives), and alter¬ natives that support the inventive method in conventional hardware with some performance compromises. A Brief Description of the Drawings Figure 1: An object in three-dimensional space, its projection onto the viewing plane, and its image one a display screen. Figure 2: Generic rendering pipeline from the Deering Reference (prior art). Figure 3: Method flow diagram for the standard Z-buffer method (prior art). Figure 4: The Span Sorting Rendering Pipeline. The Span Memory can be implemented with a SMCCAM800. Figure 5: A block diagram of the Span Sorting Renderer architecture. Figure 6: An example of nine polygons showing how they intersect the display screen and how they are included in a particular raster line. Figure 7: Three ways to model a polygon span: 1) a line segment; 2) a trapezoid; and 3) a quadrilateral. Figure 8: Data organization within the Sorting Magnitude Comparison Content Addressable MemoryβOO (SMCCAM 800). Figure 9: SMCCAM Word 900 block diagram. Figure 10: Examples of a span's Occluding Region and a span's SOT Region generated by a Span Occluding Test Query. Figure 11: An example set of segment spans on one raster line, shown in x-z space, with the visible span portions shown as thick lines and hidden span portions shown as narrow lines. Figure 12: The same example set of spans as shown in Figure 11, except with bounding boxes around each span. Figure 13: The Span Sorting Rendering Method 1300 flow diagram. Figure 14: The Process Polygon Method 1400 flow diagram, part of the Span Sorting Rendering Method 1300. Figure 15: The Process Current Polygon Memory Method 1500 flow diagram, part of the Span Sorting Rendering Method 1300. Figure 16: The Process Bucket Sort Memory Method 1600 flow diagram, part of the Span Sorting Rendering Method 1300. Figure 17: The Write Span Parameters Method 1700 flow diagram. Figure 18: The Simplified Span Rasterization Method 1800 flow diagram, part of the Span Sorting Rendering Method 1300. Figure 19: Span interaction nomenclature definitions. Figure 20: The 49 varieties of Span Interaction Types. Figure 21: Segment Span Rasterization Method 2100 flow diagram, part of the Span Sorting Rendering Method 1300. Figure 22: Rule 1 2200 method flow diagram, part of Segment Span Rasterization Method 2100. Figure 23: Rule 22300 method flow diagram, part of Segment Span Rasterization Metho 2100. Figure 24: Rule 32400 method flow diagram, part of Segment Span Rasterization Method 2100. Figure 25: Rule 42500 method flow diagram, part of Segment Span Rasterization Method 2100. Figure 26: Rule 52600 method flow diagram, part of Segment Span Rasterization Method 2100. Figure 27: An example raster line with fifteen spans. The bounding box of each span is shown as well as each span's x nL location along the x-axis. Figure 28: Timing diagram for phase-locked raster line processing and display. Figure 29: Timing diagram for single buffered frame buffer. Figure 30: Timing diagram for single buffered frame buffer where span rasterization covers more than one screen dis¬ play time. Figure 31: Block diagram of the Query Processor 510 hardware architecture, also including two pages within the Span Memory 408. Figure 32: Block diagram of the Comparison and Offset Computation block3202 within the Query Processor 510. Figure 33: Prior art MCCAM CMOS bit cell. Figure 34: A "TTL type" circuit for an SMCCAM bit cell. Figure 35: A CMOS circuit for the SMCCAM bit cell Figure 36: An array of SMCCAM bit cells. Figure 37: Multiple spans vertically within a raster line. Figure 38: Two trapezoidal spans working together to occlude farther spans that would be visible if the shown trape¬ zoidal spans did not work together. Figure 39: An example set of trapezoidal spans, shown inx-z space. Figure 40: SOT Query for Processing Top and Bottom Separately Figure 41: An example set of trapezoidal spans used to illustrate the Trapezoidal Span Rasterization Method version that does occlusion processing on span tops and span bottoms separately. Figure 42: SOT Query for processing every visibility transition Figure 43: SOT Query with a complex shape Figure 44: SOT Query with a wider search area Figure 45: A set of segment spans in a raster line where the visible opaque surfaces are shown as thick black lines and the visible translucent spans are shown as thick shaded lines. Figure 46: Approximating trapezoidal spans using only onez-value per endpoint changes the spans into quadrilateral spans. Figure 47: An example set of quadrilateral spans, shown inx-z space. Detailed Description of the Invention Span Sorting Rendering Pipeline Figure 4 shows the Span Sorting 3D Graphics Pipeline 400, where the first six steps are defined as the process polygon 1400 steps. The first five steps (transformation 202, clip test 204, face determination 206, lighting 208, and perspective divide 212) are the same as the five of the first six steps in the Generic 3D Graphics Pipeline 200. The clip 210 step is omitted because the Span Sorting 3D Graphics Pipeline 400 operates in object-precision, and coordinates are not limited to the area of the display screen 104. Elimination of the clip 210 step allows all polygons in the view volume 106 to be treated the same. How¬ ever, the clip 210 step can be inserted if desired. The Span Sorting 3D Graphics Pipeline 400 can be built with dedicated hard- ware, done completely in software, or a combination of the two. Hereinafter, a dedicated hardware implementation is assumed, and a new apparatus is described. The top-level block diagram of the new apparatus is shown in Figure 5. The process polygon 1400 steps are performed in the Polygon Processor 502. The last step performed by the Polygon Processor 502 is the computation of the Polygon Parameters 402. The Polygon Parameters, output by the Polygon Processor 502, describe a polygons as needed by the rest of the Span Sorting 3D Graphics Pipeline 400. For each polygon. Polygon Parameters are written into the Bucket Sort Memory400, and include: 1) the location in object-precision screen coordinates of the polygon vertices, V t , V 2 , V 3 , etc., defined respectively as: (x j , y z x fø, y 2 , Z j ), ( χ 3 < 3 < 2 3 ). etc.; 2) color information, including such things as vertex colors for Gouraud (or Phong) shading and/or texture map¬ ping parameters; 3) the edge derivatives of x and z with respect to y (Le., δx/δy and δz/δy) for each edge; 4) starting raster line (or topmost), y SΪAKr ; 5) ending raster line (or bottommost), yra©; and 6) the span derivative of z with respect tox (Le., δx/δy), assigned to the variable d. The last four in this list need to be computed 402, and this is done in the Polygon Processor 502. Assuming the polygons are triangles, the edge derivatives are computed as: (EQ D When the starting raster line, >sTART > ""^ me ending raster line, yESD > • re computed, the edges of the display screen 104 must generally be taken into account Figure 6 shows a display screen 104 with eight polygons (in this case, trian¬ gles), some of which intersect the edges of the display screen 104. If a polygon does not intersect the right or left edges of the display screen 104, then ysTART aa ^ >END aιe computed by: ÷VST A RT = Min Of (y MAX , IntPartOf (MaxOf (y v y 2 , y 3 , ...) ) ) y END = MaxOf (0, IntPartOf (MinOf (y y 2 , y 3 , ...) ) ) The computation of ysTART first finds the maximum of they-coordinates of the vertices of the polygon, thereby finding the "uppermost" y-coordinate in the polygon. Then, the function IntPartOf( ) takes the "integer part of the uppermost y-coordinate, thereby computing the raster line of the "uppermost" y-coordinate in the polygon. Since the start of the polygon can not be above the topmost raster line in the display screen 104, the MinOf( ) function substitutes >MΛX if the polygon would start in a non-existent raster line. Computation of VJND i d° ne similarly. Figure 6 shows a polygon 602 that starts at >MA - an ^ another 604 that ends at raster line zero. If a polygon intersects the right or left edges of the display screen 104, then y START *"<* ?END should be the first and last raster lines that is affected by the polygon within the display screen 104. In Figure 6, an example polygon 606 begins at y A 608 and ends at yg 610. Another example polygon 612 begins at c 614 and ends at raster line zero. The effects of the right and left edges of the display screen 104 can be ignored, but then span generation 1500 will create spans that are not within the display screen 104, and therefore must test for this, and throw away such spans. Computation of the span derivative, d (Le., δz δx), can be computed in one of many conventional ways. , δz d = ^ (EQ 3) The span derivative is constant for each planar polygon and can have either a positive or a negative value. Writing into the Bucket Sort Memory 404 is done according to ysTART for each polygon. There is one "bucket" per raster line, and a polygon is placed into the one bucket that corresponds to its starting raster line. Within each bucket polygons do not need to be sorted. Management of the data in the Bucket Sort Memory 04 is done by the Bucket Sort Processor 504, which can do the sort with one linked list per bucket In addition, the Bucket Sort Memory 404 can be double buffered so the write operations associated with a scene can be performed concurrently with read operations from the previous scene. If all the color information described above is stored into the Bucket Sort Memory404, it must be carried along, through the Span Sorting Renderer 500 (see Figure 5) all the way to the Rasterize Processor 512. Alternatively, the color infor¬ mation in the Bucket Sort Memory 404 can be replaced by an information pointer, and then stored into a separate Polygon Infor¬ mation Memory 514. The information pointer is an address into the Polygon Information Memory 514 where all the color information for the polygon is stored, and can be used by the Rasterize Processor512 to read the color information. The informa¬ tion pointer is carried along to the Rasterize Processor 512. This saves expensive hardware memory throughout the Span Sorting Renderer 500 because the information pointer has very few bits when compared to all the color information for a polygon. This savings can be done because: 1) the color information is constant over the entire polygon, and so can be shared by all the spans of the polygon; and 2) the color information is not needed until visible span portions are colored by the Rasterize Processor512. The use of the information pointer and the Polygon Information Memory 514 will be assumed in the rest of this document Within the Span Sorting Renderer 500, a list is kept in the Current Polygon Memory 406 of all the polygons that affect the raster line that is currently being rendered. Hence, when the rendering of a scene begins, the Current Polygon Memory 406 is empty. During rendering, when a particular raster line is reached, all the polygons that have theiry^^y j T at that raster line (i.e., that particular bucket) are read from the Bucket Sort Memory 404 and added to the Current Polygon Memory 406. As rendering proceeds, polygons are deleted from the Current Polygon Memory 406 as their VEND values are reached. The data in the Current Polygon Memory 406 is managed by the Current Polygon Processor 506, which performs the operation "process data from Bucket Sort Memory 404" 1600, as shown in the pipeline diagram 400. Also, the Current Polygon Processor 506 feeds the poly- gons that affect the raster line to the Span Generation Processor508. Starting at the beginning of the rendering of a raster line, each polygon that has a span in that raster line is input to the Span Generation Processor 508, which performs span generation 1600. The Span Generation Processor 508 uses the geometric properties of each polygon, including its edge derivatives of Equation 1, to compute the location in object-precision screen coor¬ dinates of the left and right endpoints of its span within the current raster line. The span can be modeled as a simple line segment a trapezoid, or a quadrilateral, as shown in Figure 7. The geometric properties of the span are sent to the Query ProcessorSlO, and those properties include: 1) coordinates of the left endpoint of the span; 2) coordinates of the right endpoint of the span; 3) the span derivative, d; and 4) the information pointer. The coordinates of a span endpoint can be: 1) an <x, z) point within the current raster line, used when spans are modeled as line segments as in Figure 7 A; 2) two ( , z) points, one for the top edge of the current raster line and one for the lower edge, used when spans are modeled as trapezoids as in Figure 7B; or 3) an fr j, X > z ) triplet including one z-coordinate and an x-coordinate for the upper and lower edges of the current raster line, used when spans are modeled as quadrilaterals as in Figure 7C. Of the eight example polygons shown in Figure 6, four of them616, 618, 620, 22 have spans 626, 628, 630, 632 on the example current raster line 640. Note that one of the example spans 626 starts at a negative x-value. For a given raster line, as geometric properties of spans are output from the Span Generation Processor508, they are received by the Query ProcessorSlO that then writes them all into one bank of the double buffered Span Memory 406. As the spans are written into the Span Memory 406, they are sorted, in order of precedence, by: 1) the left x-coordinate; 2) the left z-coordinate; and 3) the span derivative. Simultaneous to writing span data into one bank, the span data in the other bank of Span Memory 406 is processed to discover visible span portions. When the Query Processor 510 has completed processing the spans stored in one bank of the Span Memory 406, and all the spans in the next raster line have been received from the Span Generation Processor508 and written into the other bank, the two banks of the Span Memory 406 are swapped. After the bank swap, the Query Processor 510 and the Span Memory 406 jointly perform arithmetic comparisons on the span data (hereinafter called query operations) and various arithmetic operations to process 1800 or 2100 the spans and determine which spans or portions of spans are visible in the scene. These visible spans (or portions of spans) are sent to the Rasterize Processor 512. A more detailed block diagram of the Query Processor 510 and the Span Memory 406 is shown as Figure 31. The Rasterize Processor 512 receives only spans (or portions of spans) mat are fully visible. To process each span, the Rasterize Processor 512 performs the set up for incremental span render 412 and then performs span interpolation 220. Pixel color values are generated by utilizing the data stored in the Polygon Information Memory514 and possibly also the Texture Map Memory 516. As pixel color values are generated, they are written into the Raster Line Memory 416. The Raster Line Memory 416 can store all the color pixel values for several complete raster lines. That is, it 416 stores the color values for the raster line currently being fed to the digital to analog converter 228 (via the Rasterize Processor 512) as well as several subsequent raster lines. Once all the values for a particular raster line have been sent to the digital to analog converter 228, the corresponding part of the Raster Line Memory 416 can be overwritten with another raster line. In this way, the total amount of memory required is only a few raster lines worth (the minimum is two), rather than the typical doubled buffered full display screen 104 frame buffer 224 required by prior art 3D graphics renders. This saves many megabytes of memory. The Raster Line Memory 416 can store data for several raster lines in order for the rasterization process to "work ahead" of the digi¬ tal to analog converter 228, thereby providing some time cushion for raster lines that require more than the average amount of time to process. Having only enough memory for a few raster lines requires the Span Sorting Renderer 500 architecture to keep up with the average raster line display rate. Therefore, if very large geometry databases (larger than the maximum where the Span Sort¬ ing Renderer 500 can keep up) need to be rendered, the Raster Line Memory 416 can be replaced with a doubled buffered full display screen 104 frame buffer 224. Sorting Magnitude Comparison Content Addressable Memory 800 A diagram of data storage 800 within a page of Span Memory 406 is shown in Figure 8. This data array can reside in typical random access memory (RAM) as a sorted data structure, or reside in Sorting Magnitude Comparison Content Address¬ able Memory (SMCCAM). The SMCCAM implementation will be assumed in the rest of this document An SMCCAM is a new type of MCCAM, and is comprised of a set of memory registers (or words each word com- posed of a multiplicity of fields, where each field can: 1) store a number, either as an integer or as a floating-point number; 2) perform arithmetic comparisons between the stored number and another number broadcast to all words; and 3) shift its con¬ tents to the corresponding field in the next word. When used as the Span Memory 406 within the Span Sorting Renderer 500, the SMCCAM stores a set of spans and performs parallel searching and sorting operations to find the visible span portions. As shown in Figure 8, the data storage within the SMCCAM 800 is divided into SMCCAM Words 900, where each word 900 stores and processes (by performing query operations) data corresponding to one span in the current raster line. The figure shows a total of W SMCCAM Words 900, numbered 0 to W-l. Each SMCCAM Word 900 includes seven numeric fields (and the variable name shown here is for the nth word): 1 ) the Word Number Field 802, w, that is a fixed (i.e., read-only) unique identifying number for each word 900, akin to an address; 2) the Left X Field 804, X„L, that stores the x-coordinate of the left endpoint of a span; 3) the Left Z Field 806, ^, that stores the z-coordinate of the left endpoint of a span; 4) the Right X Field 808, x^, that stores the x-coordinate of the right endpoint of a span; 5) the Right Z Field 810, 2^, that stores the z-coordinate of the right endpoint of a span; 6) the Span Derivative Field 812, d H , that stores the δz/δx slope of the span; and 7) the Information Pointer Field 814, „, that stores a pointer into the Polygon Information Memory 514 for color information for the span's polygon. Each SMCCAM Word 900 also stores: 1) a Valid Flag 816, F„ v single bit value indicating whether the SMCCAM Word 900 is storing valid data; and 2) a Query Flag 818, F„Q, a single bit value indicating whether roe SMCCAM Word 900 responded positively to a query operation. Both flag bits 816, 818 each have a corresponding "wired-nor" bus that indicates whether all words 900 have that flag bit turned off. Specifically, for the Valid Flag 816, F mV , if F H y is false for allt (i.e„ all words), then the signal AllWordsJnvalid 990 is asserted. Similarly, if „Q is false for all n, then the signal NullQueryResponse 992 is asserted. The two wired-nor ώgnsls.AUWordsInvaUd 990 and NullQuery Response 991, provide the mechanism for query results to be fed back to the external controller (located in the Query Processor510), so it can make deci¬ sions (Le. "branches) about how to proceed within the method The nomenclature for fields and flags 804 to 818 include the Word Number Field 802 value as the first part of the field subscript (e.g., Z 3 L is in word 3). Later in this document the number of fields in each word is increased to add various features to the Span Sorting Renderer 500. Figure 8 shows two variable word indices, n andw, that are used throughout this document as references to SMCCAM Words 900. A block diagram of an SMCCAM Word 900 is shown as Figure 9, where each of the seven fields 802 to 814 is shown. The seven fields, X^L 804, z^ 806, X^R 808, z wR 810, d w 812, and i* 814, each have a corresponding data bus within the set of Array Busses 910: BusW912, BusXL 914, BusZL 916. BusXR 918, B sZR 97Λ, B sD 922, and Bus! 914. Six of the fields 802 to 812 are broken into a memory 902 or 904 and a comparator 906 or 908. The Word Number Field 802 includes: 1) a fixed memory 902; and 2) an equality comparison circuit 906, used for query operations, that compares the fixed memory value 902 to the data on the input bus, BusW 912. Five of the fields 804 to 812 include: 1) a read/write memory 904; and 2) an arithmetic comparison circuit 906 (tests for less-than, etc.), used for query operations, that compares the stored memory value 904 to the data on the corresponding input bus. The seventh field, the Information Pointer Field814, i^, is simply a read/ write memory that does not generally participate in query operations. Query operations are used for searching, sorting, reading, and writing into the array 800 of SMCCAM Words 900. A query operation is performed by all SMCCAM Words 900 in parallel by supplying query data to all words 900 via the Array Busses 910. The SMCCAM 800 includes the Query Logic Array 850, which is a set of Query Logic 930 circuits, one in each SMCCAM Word 900. In parallel, within each SMCCAM Word 900, query operation results are computed by the Query Logic 930. The Query Logic 930 receives the results from the comparators 906 and 908 as well at the Valid Flag 816 and Query Flag 818 val¬ ues, performs a selectable Boolean operation on these values (selected by Q eryCntrl 31) to generate a query result bit and then writes the query result bit back into either the Valid Flag 816 or the Query Flag 818. When a query operation is performed, every word 900 generates a query result which is stored into either its 900 Valid Flag 816 or the Query Flag 818. The set of all Valid Rags 816 is called the Valid Flag Word 830, and the set of all Query Flags 818 is called the Valid Flag Word 834. When a search is done, the query results designate which words fulfilled the query operation parameters. An example query operation is: F nQ = «V Λ ( HL ≤ *CL) (EQ 4 ) where the following occurs: 1) Q, ' S broadcast to all words 900 via B sZL 916; 2) the Left X Field 804 in each word 900 per¬ forms ( „ι ≤ x r∑) ' by comparing its 804 contents, ^, to the value on BusZL 916; 3) the Query Logic 930 in each word 900 performs the right side of Equation 4, which is the query result for that word 900; 4) in each word 900, the query result is stored into the Query Flag 818 shown as the left side of Equation 4; and 5) the signal, NullQueryResponse 992, is asserted if the Query Rag 818 is false in all words 900. Additional example Boolean operations are shown in Equation 5, wherex , Sf, f R, ZQ* z<χ, and Z Γ JR are data broad¬ cast to all SMCCAM Words 900 via the Array Busses 910, and where n is the particular word 900 where the operation is taking place (this happens for all n, which means for all SMCCAM Words 900). „Q = „V Λ (» * 5 p) Λ <*„L < *CR) Λ <*.R > *CL) Λ I ( 2 »L < 2 CF> V < 2 .R < 2 CF> 1 F mQ = F V A F , Q A I ( 2 Λ < 2 CL> V ( 2 .R < *θ) 1 ^Q = F uV Λ (*Λ = *CR> Λ ( 2 «L " 2 CR> (E 5 ) F MV = F βV A (x aR > x CR ) F nQ = v v (*»L > X AU v I (**L = *AL> Λ ( 2 «L > 2 AL> 1 v I (*«L = *AL> Λ ( 2 Λ = 2 AL> Λ (*. > rf Λ> 1 The query operation mechanism inherently performs a search operation on the data stored in the SMCCAM800, and the search results are stored into the Query Rags 818. When data needs to be written into the SMCCAM 800, the following sequence occurs: 1) the Valid Rag Word 830 (or, for certain applications, the Query Rag Word 834 could be used) is chosen to determine the word 900 to be written; 2) the Valid Rag Word 830 contents are input to its 830 corresponding Priority Resolver 840; 3) the Priority Resolver 840 finds the first occurrence of a logic "zero" within the flag word 830, this is the first invalid word; 4) the SMCCAM Word 900 with the first occurrence of bgic "zero" is the selected word 900, and the data on the Array Busses 910 is stored into that word 900; and 5) the selected word 900 has its Valid Flag 816 asserted, indicating that word now contains valid data. A read operation works similarly, with the following sequence: 1) the Valid Query Flag Word834 is chosen to deter- mine the word 900 to be read; 2) the Query Flag Word 834 contents are input to its 834 corresponding Priority Resolver 840; 3) the Priority Resolver 840 finds the first occurrence of a logic "one" within the flag word 834; 4) the SMCCAM Word 900 with the first occurrence of logic "one" is the selected word 900, and its 900 contents are output onto the Array Busses 910; 5) the selected word 900 has its Query Flag 818 de-asserted, indicating that word has had its contents read, and subsequent reads (with- out intervening queries) will read other words; and 6) the signal, NuUQueryResponse 992, is asserted if the Query Rag 818 is false in all words 900, indicating that no other words would respond to a read operation. The query, write, and read operations work somewhat similarly to that described in the Duluk Patent The portion of the Priority Resolver 840 within an SMCCAM Word 900 is called a Priority Resolver Section 934, and they 934 communicate across SMCCAM Words 900 via the busses: ValidPriOut{w-l] 936, QueryPriOut[w-l] 937, VaUdPriOut[w] 938, and QueryPriOut[w] 939. Alternatively, the Priority Resolver 840 could be built with a treelike structure, thereby making the worst case circuit propagation delay proportional to log IV rather than W. The SMCCAM 800 also performs a sorting operation, which is not provided in the apparatus described in the Duluk Patent As described above, the Span Sorting Renderer 500 sorts spans as they are written into the Span Memory 406 according to: 1) the left x-coordinate; 2) the left z-coordinate; and 3) the span derivative. In the SMCCAM 800, sorting is done by locating the place in the span list where a span needs to be inserted, then, from this place, shifting the SMCCAM800 contents down one word 900, and then writing the new span into the vacated word 900. The SMCCAM 800 can shift data from word-to-word to make room in the sorted span list The sorting operation is done in the following sequence: 1) the geometric properties (as described above) of the span to be written are input to the SMCCAM 800 for a query operation; 2) the query operation of Equation 6 is performed in every SMCCAM Word900 with the query results written into the Query Rags 818, thereby identifying all words that contain either invalid data or contain a span that should be sorted later in the span list that the span being written; 3) the Query Flag Word834 contents are input to the corre¬ sponding Priority Resolver 840; 4) the Priority Resolver 840 finds the first occurrence of a logic "one" within the Query Rag Word 834, thereby determining the selected word 900; 5) for the selected word 900 and all SMCCAM Words 900 after the selected word 900, stored data is shifted to the next word 900; and 6) at the selected word 900, the data on the Array Busses 910 is stored into the word 900. F nQ = FaV v <*Λ *AL> V I<*Λ= X Aϊ) A (2 „L> 2 AL>1 V I ( *»L=*A> A ( 2 «L= 2 AL> A C> d A>1 <EQ« ) Shifting data in the fields 802 to 814 from one SMCCAM Word 900 to the next is done via the Shift In Busses 950 that are connected to the Shift Out Busses 970 of the previous word 900. The list of Shift In Busses 950 includes: ShiftOutXL[w-l) 9Sl; ShiflOutXR[w-l] 9S4; SUftOutZL[w-l] 9S6-, ShiflOuiZR[w-l) 9SS; ShiβOutD[w-l] 960; and 962. The list of Shift Out Busses 970 includes: ShifiOutXLlw] 972; ShifiOuLXR[w] 974; ShiflOulZL[w] 976; ShiflOulZR[w] 978; 980; and ShiftOulI[w] 982. The circuit signal nomenclature used in this document includes the use of a bracketed index, such as "{w]' indicating it is part of an array of busses (similar to the array nomenclature of the "C" computer language). Here, "[w]" indicates the th word 900, and "[w-1]" indicates the word 900 immediately prior in the set of words 800. Span Occluding Test Figure 10 shows three spans 1002, 1004, 1006 represented by line segments (Le., "segment spans") in thex-z plane, corresponding to one raster line of the display screen 104. One of the spans 1002 is shown with a corresponding Occluding Region 1008. If there are no spans that Occluding Region 1008, then the corresponding span 1002 is not hidden. The shape of the Occluding Region 1008 is trapezoidal, and therefore it is computationally expensive to determine if another span lies within it 1008, and is particularly expensive if many spans need to tested against the region 1008. A simplifying approximation for an Occluding Region 1008 is a rectangular Span Occluding Test Region 1010 (hereinafter called an SOT Region 1010). The SOT Region 1010 is generated from the span (or span portion) being tested for occlusion, hereinafter called the Current Portion, S c 1004. I^terrnining if a span 1006 with endpoints (x^, Z„L) and (x^, z^) lies within an SOT Region 1010 for a Current Por¬ tion, 1004, S c , with endpoints (x C L, z CL ) 1012 and (xaχ, Zaύ 1014 is done by: In SOT Region = (X ΛL < x CR ) Λ (X BR > x CL ) Λ [ (z„ L < MaxOf(z CR , z CL ) ) v (z^ < MaxOf(z CR , 2 α ) ) ] (EQ 7) The arithmetic computation required for Equation 7 is four comparisons and one "choose-the-maximum-of function (the two needed in the equation are identical). For the SMCCAM 800 to perform the operations of Equation 7, the "choose-the-maxi¬ mum-of' would be performed outside the SMCCAM 800 to determine: Z CF = MaxOf (Z CR , Z CL ) (EQ 8) and then the values X Q ,, XCR. and Z Q F would be input on the Array Busses 910 and the comparisons would be performed in the appropriate fields 804 to 810. In this way, all the spans stored in the SMCCAM 800 would be tested in parallel, performing the search for occluding spans in a matter of nanoseconds. In this document any span mat is found by an SOT Query is called an occluding span. The complete equation for the Span Occluding Test Query (hereinafter called the SOT Query) is shown as Equation 9. F ΛQ = F ΛV Λ (n ≠ S p ) Λ (X ΛL < x CR ) Λ (x βR > x CL ) A [ (z„ L < z CF ) v (z„ R < z„) ] (EQ 9) The complete SOT Query equation adds two more terms to the conjunction: 1) the Valid Flag 816, needed to keep words with invalid data from mistakenly identifying themselves as storing an occluding span; and 2) a test " ≠ Sp where S P is the Word Number Field 802 corresponding to the Current Portion, done to keep the span from being identified as occluding itself. The complete SOT Query equation stores the query result into the Query Flag 818 of each SMCCAM Word 900. The result of the SOT Query is available at the signal, NullQueryResponse 992, where an asserted value indicates that no occluding spans were found. By using the SOT Region as an approximation of the Occluding Region 1008, a conservative error is introduced. That is, the SOT Query may find occluding spans that are within the SOT Region 1010, but are actually behind the Current Portion. However, the SOT Query will never fail to find spans that actually occlude the Current Portion. Span Sorting Rendering Method 1300 In order for the SOT Query to inadvertently find an occluding span that does not actually occlude the Current Portion, the bounding box (described in the next section) of the Current Portion must overlap the bounding box of the occluding span. Therefore, the simplest form of the Span Sorting Rendering Method 1300 assumes that bounding boxes of spans do not overlap, thereby eliminating the need to handle occluding spans that do not actually occlude the Current Portion. While this assumption is not practical for most rendering applications, it does simplify part of the description of the method 1300. Therefore, this simpli¬ fied (though not generally practical) version will be described first In a later section, the methodl300 will be expanded to pro¬ cess spans with overlapping bounding boxes. Figure 11 shows a set of fourteen spans in the same raster line (numbered S 0 1100 to S 13 1113), where each span is represented by a line segment in the x-z plane of the raster line (the y-coordinate is fixed). The visible parts of the spans are shown as thick lines, and the hidden parts are shown as thin lines. For example,S 4 1104 andS 6 1106 are hidden, and5 0 1100 has two visible portions. The spans have been sorted according to the x-coordinate location of their left endpoint Hence, the spans are numbered from left to right according to their Word Number Field 802 assigned when they are all stored in the SMCCAM 800. For example, span S 4 1104 is stored in SMCCAM Word 900 number four, and has its left endpoint located at the point (x L , z L ) and its right endpoint located at (x 4R , Zfg). Figure 12 shows the same fourteen spans, except that each span is enclosed by a bounding box. The set of spans in Figure 11 and Figure 12 were chosen so that the span bounding boxes do not overlap. The spans of Figure 12 will be used to describe the simplest form of the Span Sorting Rendering Method 1300, the version that includes the Simplified Span Rasteriza- tion Method 1800 which assumes span bounding boxes do not overlap. The Span Sorting Rendering Method 1300 is described in the context of the apparatus described herein, but can also be performed by software on a general purpose computer. Figure 13 is the top-level method diagram of the Span Sorting Rendering Method 1300. This method 1300 is performed by the Span Sorting Rendering Pipeline 400 of Rgure 4, in the same way the method flow diagram 300 of Figure 3 is performed by the generic 3D graphics pipeline 200. In the Span Sorting Rendering Method 1300, scenes are generated 1302 (object locations in world coordinates, etc.), and within each scene, polygons are obtained 1304 for input to the Span Sorting Rendering Pipeline 400 and processed 1400. Figure 14 shows the process polygon step 1400. Included are the previously described transformation 202, clip test 204, face determination 206, lighting 208, perspective divide 212 and compute polygon parameter 402 steps. After these steps, polygons are written into the Bucket Sort Memory 404, each according to its ysTART parameter. Getting back to Figure 13, once all 1306 the polygons for a scene have been processed 1400 and therefore written into the Bucket Sort Memory 404, each raster line is processed. The variable, R, is used to keep track of the current raster line num¬ ber, and is initialized 1308 to zero. Before the first raster line can be processed, the Current Polygon Memory 406 must be cleared 1310, thereby indicating that no polygons are on the current raster line. Also, the Span Memory 408 must be cleared 1312, thereby indicating that no spans are on the current raster line. These operations 1310, 1312 can be done by mark¬ ing the entire contents of the memories 406, 408 as invalid. Since, at the first raster line, there are no polygons in the Current Polygon Memory 406, the next step 1600 is to transfer polygons that start in the current raster line form the Bucket Sort Memory 404 to the Current Polygon Memory 406 and to make spans for these polygons. Beginning on the second raster line (i.e., R = 1), there is probably some polygons in the Current Polygon Memory 406, and spans need to be made 1500 for those polygons. Figure 15 is the Process Current Polygon Memory 406 step 1500 within the Span Sorting Rendering Method 1300. Each 1502 polygon in the Current Polygon Memory 406, is read 1504, and if 1506 that polygon is not included in the current raster line, it is deleted 1508 from the Current Polygon Memory 406 so subsequent raster lines do not need to consider it If 1506 the polygon is included in the present raster line, then a span within the current raster line and its Span Parameters (as described above) are generated 1510 for that polygon. Then, the Span Parameters are written 1700 into the Span Memory 408. Figure 16 is the Process Bucket Sort Memory 404 step 1600 within the Span Sorting Rendering Method 1300. If 1602 there are more polygons to be read from the Bucket Sort Memory 404 for the current raster line, then for each such polygon: l) the polygon is read 1604 from the Bucket Sort Memory 404; 2) the polygon is written 1606 into the Current Polygon Memory 406; 3) the polygon has a span in the current raster line, and Span Parameters (as described above) are generatedlSlO for the span; and 4) the Span Parameters are written 1700 into the Span Memory 408. When writing 1700 Span Parameters into the Span Memory 408, a sort operation is done. The sort operation is per¬ formed by the SMCCAM 800 as a query operation (Equation 6) and a special write operation, as described above. The apparatus of the SMCCAM 800 performs this step 1700 in parallel but it is described in the flow diagram 1700 of Figure 17 as if it is a sequential search process. A counter, n, used as an index into the set of SMCCAM Words 900, is initialized 1702 to zero. The flow diagram shows the query operation of Equation 6 broken down into six conditionals 1704 mat test to see if the new span should be inserted at the nth word 900. Words 900 are stepped through 1706 by incrementing n until such an insertion point is found. When the insertion point is found, the counter n stops incrementing, and the contents of all the words from W- 1 to n (using the counter, m) are transferred 1708 to the next word and the Span Parameters are written 1710 into word n. A test 1712 for reaching the last word 900 (Le., word W - 1) is included to detect an exception 1714 condition if there are more than a total of W spans in the raster line, thus exceeding the total number of words 900. Strategies to work within a fixed number of words 900 are presented later in this document Once again returning to Figure 13, once all the spans within the display screen at raster line/? have been written into the Span Memory 408, visible span portions are identified 1800 or 2100. One version of this portion of the method is the Simpli- fied Span Rasterization Method 1800, which assumes span bounding boxes do not overlap. Other versions that do not make this assumption are the Segment Span Rasterization Method 2100 and the Trapezoidal Span Rasterization Method, described in later sections. Simplified Span Rasterization Method 1800 The Simplified Span Rasterization Method 1800, shown in Figure 18, maintains three sets of variables: 1) the current left x-coordinate position, Q , , used to indicate how much of the current raster line has been rendered so far; 2) the Present Span, Sp used to keep track of the frontmost span atXQ , , including its Span Parameters x ^, L, XJR, ZpR, dp, jp, and word number; and 3) the New Span, 5 N , used to keep track of the span most recently read form the Span Memory 408 (generally found by a query), including its Span Parameters x^, Z j ^, j ^, Z j ^, d N , < N , and word number. In the Simplified Span Rasterization Method 1800, the Current Portion, S , is always equal to the Present Span, Sp The rasterization method 1800 will be explained by using the set of spans in Figure 12 as an example. In the rest of this section, the method 1800 will be followed step-by-step as the example spans are processed. The method 1800 starts by setting 1802 XQ ^ to zero (thereby starting at the left edge of the display screen) and declar¬ ing the variables Sp and S^ to be invalid. Because 5 P is invalid 1804 and there are valid 1806 spans still stored in the Span Memory 408, a search 1808 must be done to find either the frontmost span a XQ , (Le„ zero) or, if there is no span atx^, then find the leftmost valid span in the Span Memory 408. The first step in this search 1808 is to do a query 1810 to find all valid spans in the Span Memory 408 that include X Q, (Le., zero). Looking at Figure 12, it is seen that there are no 1812 spans at x-coordinate zero (the query 1810 finds nothing). Because there are no spans 1812 at x-coordinate zero, the leftmost span in the Span Memory 408 (Le., the first valid span because the spans are sorted) is read 1818 thereby making Sp to be equal to SO 1200. There were no valid spans at ■*CL (' ' e - > zero), and the leftmost span does not start until Λ Q L (left endpoint of span S 0 1200), so the range from zero to Q L does not have any spans at all, and therefore the background is rendered 1820 from X Q , (Le., zero) to Q - Some rendering has been done, so the value forx Q, is updated 1822 to become X L (Le., Q I , indicating rendering has been done up to this point An SOT Query is done 1824 for the Present Span (i.e., S 0 1200) to find any occluding spans, and this finds all the other spans 1201 to 1213 since they are all in the SOT Region of S 0 1200. The first of these found spans are read 1824, making the value of the New Span, S N , equal to S j 1201. The method 1800 has not reached 1826 the right edge of the display screen ( e^xα, <*MAX) < b°th £p * nα* <?N lre valid 1804 and 1828, and the next step 1830 is to render the Sp (Le., S 0 1200) from X (i-c, XOL) to NL (i.e., x IL ). This render¬ ing can be done because the SOT Query 1824 found the leftmost occluding span in front of S 0 1200, meaning any part of S 0 1200 to the left of this occluding span must be visible. This step 1830 also updates the value for Q, to be JJL (Le., yJ, and also makes S N (Le., S j 1201) into the new value of S An SOT Query is done 1832 tor the Present Span (i-e.,^ 1201) to find any occluding spans, and this finds only one span, 5} 1202, since it 1202 is roe only span in the SOT Region of S j 1201. This span is read 1832, making the value of the New Span,S N , equal to S 2 1202. The span S j 1201 is processed in a way similar to S 0 1200. The method 1800 has not reached 1826 the right edge of the display screen (Le., ( < AX to s t? and S N * re vaud 18M and VSΑ, "^ 3p ( -ε- s ι 1201) is rendered 1830 from XQL (Le., x 1L ) to XNL (Le., XJ ). The value for XQL is updated 1830 to be XNL (ΪΛ, JL), and S N (ix, S 2 1202) is made into the new value of S An SOT Query is done 1832 for the Present Span (Le., S 2 1202X but the query does not find any spans because nothing occludes S 2 1202, and the value of the New Span, S N , is set to invalid. The right edge of the display screen has not been reached 1826, Sp is valid 1804, S N is invalid 1828, and the next portion 1834 of the method 1800 includes a search for an abutting span forSp An abutting span is a span whose left endpoint is located at the same point as the right endpoint of the Current Portion (or, for the Simplified Span Rasterization MethodlβOO, the Present Span). In Figure 12, three example pairs of abutting spans are: 1)S 2 1202 and S 5 1205; 2)S 5 1205 and S η 1207; and 3) Sg 1206 and S 9 1209. Abutting spans occur frequently because 3D objects are generally described by a set of polygons that share edges. Therefore, for highly tessellated objects, n.ost spans will be part of at least one abutting span pair. The portion 1834 of the method 1800 starts with rendering 1836 Sp (Le_ S 2 1202) from * □ . i- e - *2 to x ra (i.e., X Ά ). This can be done because the SOT Query did not find any occluding spans, thus proving S P (i.e., S 2 1202) is not hidden at all, and should be rendered. A1SO,X Q , is set 1836 to (Le„ x^g). Next a query is done 1838 to find an abutting span for S P (i.e., S 2 1202), which finds span S 5 1205. Because 1840 an abutting span was found, the abutting span, S 5 1205, is read 1846 and assigned to Sp An SOT Query is done 1848 for the Present Span (Le.,S 5 1205), but the query does not find any spans because nothing occludes S 5 1205, and the value of the New Span, S N , is set to invalid. The Present Span, S 5 1205, is processed similarly to S 2 1202. The right edge of the display screen has not been reached 1826, S P is valid 1804, S N is invalid 1828, S P (Le., S 5 1205) is rendered 1836 from XQ (Le., X j g) to pR (Le., XJR and X L is set 1836 to x PR (Le., XJ ). A query is done 1838 for an abutting span, which finds span S 7 1207. The abutting span, S 7 1207, is read 1846 and assigned to Sp An SOT Query is done 1848 for the Present Span (Le., S 7 1207), finding only S 8 1208 which is read 1832, making the value of the S N equal to S g 1208. The Present Span, S 7 1207 is processed similarly to S 1 1201. The right edge of the display screen has not been reached 1826, both S P and S N are valid 1804 and 1828, and S P (Le., S 7 1207) is rendered 1830 from x α . (Le., x 5R ) to (i.e., x 8 ). The value for ^ is updated 1830 to be x^ (Le., x 8L ), and S P is set to S N (Le., S 2 1202). An SOT Query is done 1832 for the Present Span (i.e., S 1208), but the query does not find any spans, and the value of the New Span, S N , is set to invalid. The Present Span, S g 1208 is processed similarly to S 2 1202 and S 5 1205. The right edge of the display screen has not been reached 1826, S P is valid 1804, S N is invalid 1828, Sp (i.e., S 8 1208) is rendered 1836 from x<χ (Le., XgjJ to x PR (Le., XJR), and Q is set 1836 to XpR (i.e., x gR ). A query is done 1838 for an abutting span, which finds span JO 1210. The abutting span, S 10 1210, is read 1846 and assigned to S P An SOT Query is done 1848 for the Present Span (i.e., S 10 1210), but the query does not find any spans, and the value of the New Span,S N , is set to invalid. As the Present Span, S 10 1210 is processed, the search for an abutting span does not find such a span. The right edge of the display screen has not been reached 1826, S P is valid 1804, S N is invalid 1828, S P (Le., S 10 1210) is rendered 1836 from X L (i.e., x gR ) to x PR (Le., IOR), and X is set 1836 to x PR (i.e., JOR). A query is done 1838 for an abutting span, but no abutting span is found. Since 1840 no abutting span was found, a search must be done to find the frontmost span tXQ, ft*i *IOR)- How¬ ever, before the search is done, a query is done to invalidate 1842 all spans that are completely to the left of XQ, (i.e., JO )- This invalidation 1842 can be done because the current raster line has been rendered up I Q L (Le., IOR), and spans to the left of *CL (i- e -< X 10R) were either rendered or hidden (or some of each). The invalidation 1842 turns off the Valid Flags 816 for S t 1201 through S 10 1210, thereby leaving only S 0 1200 and S n 1211 through S 13 1213 as validly stored spans. The value of the Present Span, SN, and the value of the New Span, S N , are both set 1844 to invalid. The right edge of the display screen has not been reached 1826, Sp is invalid 1804, there are still 1806 valid spans, and the next part 1808 of the method includes a search for the frontmost span at ^ (Le., IO )- First a query 1810 is done to find all spans that include Q L (i.e., x 10R ), which finds two spans: S 0 1200 and S u 1211. Since 1812 spans were found, these two spans 1200 and 1211 are read 1814, the z-coordinates of the spans are computed 1814 at QL (Le- > *IOR) < -^ are compared to determine 1814 that S n 1211 is the frontmost span. The z-coordinate computation is simplified by having the span derivative (from the Span Derivative Field 812) available for use in extrapolating from the left endpoint of the span. The frontmost span, S u 1211, is made 1814 the Present Span, Sp An SOT Query is done 1824 for the Present Span (Lc,S n 1211), but the query does not find any spans, and the value of the New Span, S N , is set to invalid. The Present Span, S n 1211, is processed similarly to 5 2 1202, S 5 1205, and S 8 1208. The right edge of the display screen has not been reached 1826, S P is valid 1804, S N is invalid 1828, S P (Le., S n 1211) is rendered 1836 from X Q L (Le„ x 10R ) to x PR (Le., XΠ ), and is set 1836 to x FR (i.e., XJJ ). A query is done 1838 for an abutting span, which finds span S 12 1212. The abutting span, S 12 1212, is read 1846 and assigned to Sp An SOT Query is done 1848 for the Present Span (ie S 12 1212), but the query does not find any spans, and the value of the New Span, S N , is set to invalid. The Present Span, S I2 1212 is processed similarly to S l0 1210. The right edge of the display screen has not been reached 1826, S P is valid 1804, S N is invalid 1828, S P (Le., S 12 1212) is rendered 1836 from Q (i-c. IIR) to ≠PR (i- c -. *12R and Q L ύ set 18 6 to *PR (i*., X IZR)- A query is done 1838 for an abutting span, but no abutting span is found. Since 1840 no abutting span was found, a query is done to invalidate 1842 all spans mat are completely to the left of Q (Le., xun), thereby turning off the Valid Flags 816 for S u 1211 and S 12 1212, thereby leaving only S 0 1200 and S 13 1213 as validly stored spans. The value of the Present Span, S N , and the value of the New Span, S N , are both set 1844 to invalid. The right edge of the display screen has not been reached 1826, Sp is invalid 1804, there are still 1806 valid spans, and the next part 1808 of the method includes a search for the frontmost span t (Le., XJJR). First a query 1810 is done to find all spans that include X Q L (i.e., X\2B) > which finds only one span, S 0 1200. Since 1812 a span was found, it is made 1814 the Present Span, Sp An SOT Query is done 1848 for the Present Span (Le., S 0 1200), finding only S 31213 which is read 1832, making the value of the S N equal to S 13 1213. The right edge of the display screen has not been reached 1826, both Sp and S κ are valid 1804 and 1828, and Sp (Le., S 0 1200) is rendered 1830 from Q, (i-e., *I2R) to *NL (i- e -> x tsύ- The value for Q " updated 1830 to be XJΠ, (Le., x 13 ), and S P is set to S N (i.e., S I3 1213). An SOT Query is done 1832 for the Present Span (Le., S 13 1213X but the query does not find any spans, and the value of the New Span, S N , is set to invalid. The right edge of the display screen has not been reached 1826, S P is valid 1804, S N is invalid 1828, S P (i.e., S 13 1213) is rendered 1836 from Q (i.e., x 13L ) to XpR and Q, is set 1836 to n (Le., X 13 R). A query is done 1838 for an abut¬ ting span, but no abutting span is found. Since 1840 no abutting span was found, a query is done to invalidate 1842 all spans that are completely to the left of X Q L (i.e., XI 3 R). thereby turning off the Valid Flags 816 for Q 1200 and S 13 1213, thereby eliminat¬ ing the last valid spans. The value of the Present Span, S N , and the value of the New Span, S N , are both set 1844 to invalid. The right edge of the display screen has not been reached 1826, Sp is invalid 1804, and there are 1806 no valid spans. Therefore, the background is rendered fromxQ (Le., X J3 R) to MAX (Le.,the right edge of the raster line). The entire current ras¬ ter line has now been rendered, and the next raster line can be processed, as shown in the method flow diagram of Figure 13. It is important to note that the method 1800 rendered the visible portions of the spans, and completely ignored the spans that are totally hidden (i.e., S 3 1203, S 4 1204, S 6 1206, and S 9 1209). For scenes with greater depth complexity, a larger fraction of the spans will be ignored in a similar way, thereby providing a greater computational savings. A unique feature of this method 1800 is the ability of abutting spans to work together to occlude spans behind them. Another important feature of the method 1800 is the pixel coloration processing within a raster line is roughly propor- tional to the number of pixels in the raster line, rather than proportional to the number of pixels in all the spans in the raster line. This is because hidden portions within spans are never sent to the pixel coloration process. Pixel coloration processing is "roughly" proportional to the number of pixels within the raster line because a pixel can be affected by two spans because, for example, the span to the right may end within the pixel's boundary. In this case, color from two spans are blended together to form the final color for the pixel. Span Interaction Types and Span Interaction Parameters As described above, the SOT Query is a set of comparison operations simple enough to be performed in hardware by an SMCCAM 800. However, in the general case where span bounding boxes overlap, die SOT Query will sometimes find spans that do not occlude the Current Portion. Furthermore, the SOT Query will also sometimes find spans that intersect the Current Portion, thus making both spans partially visible. The Segment Span Rasterization Method2100 solves this shortcoming by cat- egorizing the interaction between the Current Portion and a span in roe SOT Region into one of many Span Interaction Types (hereinafter abbreviated SIT), and then applying rendering rules based on the SIT. The SIT is determined from the Span Interac¬ tion Parameters (hereinafter SIP) of the two spans. As the Segment Span Rasterization Method 2100 proceeds, it 2100 maintains four spans and their associated parame- ters: 1) the Present Span, p the frontmost span atX Q L, as described above; 2) the New Span, S N , a span in the SOT Region of Sp as described above; 3) the Current Portion, S 0 a subsection of the Present Span, Sp; and 4) the Saved Span, S s , used as a single depth stack for temporarily saving S N so that more spans in the SOT Region of Sp can be read. The nomenclature for spans, span endpoints, SIPs, and SITs is illustrated by the examples shown in Rgure 19. The Present Span, S P 1902, has the endpoints (x PL , z PL ) 1904, 1906 and (x PR , z m ) 1908, 1910, is enclosed by a dashed oval, and is shown as the union of a solid black line and a finely dotted line. The solid black line subsection ofSp 1902 is the Current Portion, S c 1912, and has the endpoints (X Q , ZQJJ 1914, 1916 and (X Q R, ZQR) 1918, 1920. The SOT Region 1922 corresponding to S c 1912 is enclosed by a dashed line. The New Span, S N 1932, has the endpoints ( NL, ZNJJ 1934, 1936 and ( χ NR < Z NR) 1^38, 1940, and is enclosed by its bounding box 1942. The Span Interaction Parameters (ix., SIPs) are arithmetic comparison results between the z-coordinates of Q 1912 and S N 1932 at four particular x-coordinate values, specifically, the endpoints of the two spans: x^.1934, XJJR 1938, X L 1914, and R 1918. In detailed terms, the four Span Interaction Parameters (Le., SIPs) are: 1) the comparison of the z-coordinate of S c 1912 at H 1934 to z^ 1936, shown in the example as "Nonexistent" because S c 1912 does not have a point at ^ 1934; 2) the comparison of the z-coordinate of S c 1912 at XNR 1938 to ^R 1940, shown in the example as "Farther" because the point on 1912 is father (i.e., has a greater z-coordinate) than Z^R 1940; 3) the comparison of the z-coordinate of S N 1932 at X Q L 1914 to Z Q L 1916, shown in the example as "Farther" because the point onS^ 1932 is father (Le-, has a greater z-coordinate) than Z 1916; and 4) the comparison of the z-coordinate of S N 1932 at R 1918 to Z Q R 1920, shown in roe example as "Nonex¬ istent" because S N 1932 does not have a point atX R 1918. Each of the four SIPs can take on one of the values: 1) "Nonexistent" (abbreviated "Non"); 2) 'Tarther" (abbreviated 'Tar"); 3) "Nearer" (abbreviated "Near"); or 4) "Equal". i the example of Figure 19, the four SIPs are Non, Far, Far, Non, as shown in the figure. This particular set of four is SIT 23, causing invocation of Rule 4, as will be described later in this document The SIPs were chosen so as to be easy to compute, avoiding expensive computations such as division. The computa¬ tion of z-coordinates used in the comparison is done by: z-coordinate of S c at Λ NL = z CL + (* NL - x cι d c z-coordinate of S c at * NR = z CL + ( NR -x CL ) d c ^ ^ z-coordinate of S N at x CL = z NL + (α CL - x^) d K z-coordinate of 5 N at JC CR = z NL + (Λ CR - * NL ) d κ Figure 20 is a listing of all 49 possible SITs. For example. Figure 20C illustrates SIT 3, showing three examples of a SQ paired with an S N , where the SIPs are Near, Equal, Non, Non. Each possible combination of SIPs correspond to one SIT. When a particular SIT is encountered during the Segment Span Rasterization Method2100, one of several rules is invoked, and each SIT in Figure 20 identifies the rule it invokes. Some SITs, such as SIT 19 and SIT 22, cannot ever be encountered by the method 2100, therefore, no rule is invoked, and the tag "impossible" is shown in Figure 20. Segment Span Rasterization Method 2100 The Segment Span Rasterization Method 2100, shown in Figure 21, processes spans that are represented by line seg¬ ments (as in Figure 7A). This method can be utilized within Span Sorting Rendering Methodl300, shown in Figure 13. In mis section of the document the method flow diagrams of Figure 21 through Figure 26 will be described in very general terms. In the next section, an complex set of example spans is used to describe the step-by-step functioning of the method2100. The Segment Span Rasterization Method 2100 starts by initializing 2102 and 2104 variables. The method 2100 calls sub-methods, called Rule 1 2200 through Rule 52600. Every rule considers: 1) what part of S c should be rendered, if any; 2) the updating of S P and/or S c ; 3) updating of S s ; 4) invalidation of spans stored in the Span Memory 408; 5) doing an SOT Query; and/or 6) updating of S N . Rule 1 2200 (shown in Figure 22) is invoked if S P is invalid. It 2200 searches for the frontmost span atXQ., makes the frontmost span Sp performs an SOT Query, and updates S N . Rule 22300 (shown in Figure 23) is invoked if S c has no Potentially Occluding Spans remaining. Therefore, it 2300 renders the Present Span, Sp from X Q L to Q R. Then, S c is set to, in order of precedence: 1) the Saved Span, S s ; 2) an Abutting Span; or 3) the first valid span after invalidation of all spans completely to the left of QR. In any case, XQ_ is set to QR, and S s is invalidated. Rule 32400 (shown in Figure 24) is invoked if the SIT is such that the Current Portion, S Q , is occluded at jj L, but is visible from X Q L to *N - Therefore, render the Present Span, p from X L to x^. Then, make the New Span, S N , the Present Span and begin processing it Since S c is not being rendered to X Q R, invalidate the Saved Span, S s . Rule 42500 (shown in Figure 25) is invoked if the SIT is such thatS c intersects S N and the point of intersection is vis¬ ible. The intersection point at (x j , Zj), between the Current Portion, SQ, and the New Span, jj is computed. Since SQ is occluded to the right of j , S Q is modified by changing X to X The New Span, S N , is stored as the Saved Span, S s , in case it is needed later under Rule 1 2200. Then, the next Potentially Occluding Span is read and madeS N . Rule 5 2600 (shown in Figure 26) is invoked if the Current Portion, S Q , occludes the New Span, S N , such that none of SN is visible from X Q to X Q R. Therefore, S N is discarded, and the next Potentially Occluding Span is read and madeS N . Since S Q is not being rendered when this rule is applied, leave the status of the Saved Span,S s , unchanged. Detailed example of the Segment Span Rasterization Method 2100 In order to fully describe the Segment Span Rasterization Method 2100 in a step-by-step fashion, an example set of fifteen spans, shown in Figure 27, is used to illustrate how the method 2100 works. The spans in this example were chosen so as to exercise all parts of the Segment Span Rasterization Method 2100. The example, when compared to typical raster lines in typ¬ ical scenes, is abnormally complex due to the large fraction of overlapping bounding boxes and intersecting spans. As each step in the Segment Span Rasterization Method 2100 is described, the corresponding reference designators in the method flow dia¬ grams are listed at t e beginning of the step description. Within a step description, equations for query operations are first shown as they appear in the method flow diagrams, then, on a second line, the same equation is shown with all its variables substituted by values from the example of Figure 27. Also within a step description, assignment statements will be cascaded (with multiple "=" signs) showing how to arrive at the fully substituted variables. For the example of Figure 27, when the Segment Span Rasterization Method 2100 begins, there are fifteen valid spans in the SMCCAM 800, designated S 0 through S 14 . These spans are stored in SMCCAM Words 000 0 through 14, and therefore each have (F. V = 1 ), indicating those SMCCAM Words 900 have valid contents. The rest of the SMCCAM Words 900, namely words 15 through W - 1, each have (F„ V = θ), indicating those SMCCAM Words 900 have invalid contents. Hence, at the start of the Segment Span Rasterization Method 2100, the Valid Flag Word 840, Fy designates roe set of valid spans, and this set is not empty. For the example set of fifteen spans shown in Figure 27, the step-by-step processing using the Segment Span Raster¬ ization Method 2100 is: 1 ) 2102 The left x value of the Current Portion, X , indicates how far the rendering has proceeded along the present raster line. Hence, the start of a raster line causes setting (XQL - θ). The left z value of the Current Portion, Z Q ., is set to infinity to allow any span to be in front of the background. The depth location of the background is considered to be at infinity. The background is not composed of polygons, and for may applications, is set to the color black. The right x and y values of the Current Portion, QR d QR, are set to "invalid" because there is no valid Present Span, Sp With assignment statements, this is described as: QL = 0; x CR = invalid; z C L = infinity; z CR = invalid; (EQ 11) z CT = infinity; 2) 2104 The data within registers for storing span information external to the SMCCAM800 (Le., Sp S N , and S s ) are also designated as invalid. S p = invalid; S N = invalid; (EQ 12) S s = invalid; 3) 2106, 2108, and 2200 Because the Present Span, Sp is not valid and F v is not empty (indicating that at least some spans are valid), Rule 1 is invoked. Here, Rule 1 is used to search for the first span to make the Present Span,Sp 3A) 2202 Do a query to find all valid spans that could affect the current raster line at (i.e., at x coordinate zero). The query performs, in each SMCCAM Word 900: » »oQ = F » ,vV A ( χ n*L ≤ x c CύL This query does not find any spans, and therefore, the setFq is empty. 3B) 2204, 2206, and 2208 Because FQ is empty and S P is not valid, there must not be a valid span that could affect the current raster line atXQL- Therefore, the first span in Fy is read and made the Present Span, Sp This read operation sets the following values: S p = read (n) = 0; x pL = read(x L ) = x 0L ; x pR = read(x R ) = x 0R ; Zp L = read (z L ) . z flL ; z pR = read (z R ) = z 0R ; d p = τeaά (d) = d Q ; ip = read(ι) = /„; Reading the first span from F v yields the leftmost valid span, Q , because the spans are stored in the SMCCAM 800 in a left to right ordering. 3C) 2210 Because there is not a valid span that could affect the current raster line atX Q L (i-e„ atx coordinate zero), and the leftmost valid span does not start until X (Le., X Q JJ, the background must be rendered from X Q to XpL (Le., from 0 to XQ ). As possible alternate methods, rendering of the background can be avoided if: 1) it is know that polygons will always cover 100% of the viewing plane; or 2) the raster buffer is initialized with the background colors prior to processing the first span in each raster line. 3D) 2212 There is now a Present Span, S P (i.e_, 5 0 ), and the Current Portion, S Q , is set equal to Sp by setting: • *CL = ^ = *0L' ^CR = *PR = *0R : 2 CL = Z PL = Z 0L : 2 CR = 2 PR = Z 0R : (EQ 15) CF = max (z pL , Zp R ) = max (z 0L , z 0R ) = z 0L ; The Current Portion, SQ, is equal to SQ. The Far Z Value for the Current Portion, ZQP is set to ztø , by the "find the maximum" function. 3E) 2214 There is now a defined Present Span, Sp (Le., S 0 and a defined Current Portion, SQ (Le., S 0 ), so a search is done for spans that could possibly occlude the Current Portion, Sς^, (Le., S 0 ). The Span Occluding Test query performs, in each SMCCAM Word 900: F nQ = F -V Λ (» * S P> Λ <*»L < *CR> A ( X - > x θ) Λ I < 2 Λ < 2 CT> V ( 2 Λ < 2 CF> 1 __ , Λ (EQ 16) F »Q = F .V Λ (» " 0) Λ (X ΛL < X 0R ) Λ ( )lR > 0L ) [ (Z. L < Z 0L ) V (Z JlR < 2 0L ) ] _ 5 This query creates the set of all Potentially Occluding Spans for the Cuirent Portion, S c (Le., S 0 ). The query finds S 1 through S 1 . In general, queries used for search operations include F Λ y in the conjunction in order to prevent invalid data stored in a SMCCAM Word 900 from causing a bit in Fr, from being mistakenly asserted. 3F) 2216 and 2218 Because FQ is not empty, there must spans mat possibly occlude the Current Portion, 10 S c (i.e., S 0 ). Therefore, the first span in FQ is read and made the New Span, SM. This read operation sets the following values: S N = read(π) = 1; x NL = read (x L ) = x a ; x NR = read (x R ) = x 1R ; z NL = read (z L ) = z ϊt ; z NR = read (z R ) = z, R ; 15 </ N = read (-t) = d \ i N = read (ι) = »,; Reading the first span in FQ yields S the first span in the set The read process also deletes S j from FQ by setting (F 1Q = 0). 4) 2109, 2106, 2110, and 2112 The right edge of the display screen has not been reached (LCJC Q , <x mtx ) and both 20 the Present Span, Sp (Le., S 0 ), and the New Span, S N (Le., S j ), are valid. Therefore, roe Span Interaction Parameters for these two spans are computed, and are found to be: (Far, Non, Non, Far). 5) 2114 The Span Interaction Type is determined from the Span Interaction Parameters, and turns out to be Type 14. 6) 2116 and 2400 Because the Span Interaction Type is Type 14, Rule 3 invoked to process S 0 : 6A) 2402 The Current Portion, S c (Le., S 0 ), is hidden starting at L (i-c, *H_λ bat is visible to the left of 25 X j 4L (i.e., IL)- Therefore, render the Present Span, Sp (i.e., S 0 ), from X Q to ^ (LC, from x 0L to n). 6B) 2404 The processing of Present Span is completed (at this point), so makeSu (Le., S t ) into the Present Span, Sp by setting: Sp = S N = 1; *PL = *NL = X 1L ; *PR = *NR = *1R : ^ 30 _ . (EQ 18 ) 2 PL ~ 2 NL - 2 1L' 2 PR - 2 NR - 2 1R « d p = d = d \ 6C) 2406 The Current Portion, S Q , is set equal to S N by setting: 35 CEQ 19) CF = max ( 2 NL « 2 NR) = max (ZiL' 2 l ) = 2 1L : Alternatively, the Current Portion, SQ, could be set to the Present Span, Sp (rather man S N )because it has the same values. However, this alternate way is not desirable for hardware implementation because this 40 step arid the previous step could not be done in parallel. 6D) 2408 The Saved Span, S s , is invalidated, but at this point in this example, it was already invalid. 6E) 2410 There is a new Current Portion, SQ (Le-, so a search is done for spans that could possibly occlude it The Span Occluding Test query performs, in each SMCCAM Word 900: F nQ = F HV Λ (n ≠S p Λ (X nL < XQR) (x,, R >'XQL) Λ [ ( ^ < ZQJ,) V (z^ < Z c ) ] F nQ = F » V A (»≠ 1) A , L < *1R) A (*„R > *1 L ) A U- Λ < 'a) V (Z ||R < 2 1L ) ] This query creates the set of all Potentially Occluding Spans for the Current Portion, S c (Le., S j ). The query finds S 0 and S 2 through S 14 . 6F) 2412 and 2414 Because FQ is not empty, there must be spans that possibly occlude the Current Portion, Sc (Le., S ). Therefore, the first span in FQ is read and made the New Span, S N . This read operation sets the following values: S N = read (n) = 0; x NL = read(x L ) = x 0L ; x MR = read(x R ) = * 0R ; 2 L - «ad (z L ) = z 0L ; z NR = read (z R ) = 2 0R ; <f N = read (a") = d 0 ; i N = read (i) = i 0 ; Reading the first span in FQ yields S Q , the first span in the set The read process also deletes S Q from FQ by setting (FOQ = O). 7) 2109, 2106, 2110, and 2112 The right edge of the display screen has not been reached (LC.XQ < -^,) and both the Present Span, S P (Le., S t ), and the New Span, S N (i.e.,S 0 ), are valid. Therefore, the Span Interaction Parameters for these two spans are computed, and are found to be: (Far, Non, Far, Non). 8) 2114 The Span Interaction Type is determined from the Span Interaction Parameters, and turns out to be Type 23. 9) 2116, 2118, and 2500 Because me Span mteraction Type is Type 23, Rute 4 is irrvoked to processS ! : 9 A) 2502 The Current Portion, S c (Le., S j ), and the New Span, S N (Le., S 0 ), interact to cause S c to transition from being visible to being hidden somewhere along its length: at point of intersection between S Q (Le., Si) and S N (i.e., S Q ). The intersection is computed, and found to be at (t j , Zj) 2702, as shown in Figure 27. 9B) 2504 The Current Portion, S Q (i.e., S,), is shortened by changing its right end point to the intersection point The right endpoint of S Q is modified by setting X CR = X V 2 CR = *v (EQ 22) CF = π>ax (z CL , Z j ) = z CL = z 1L ; The Present Span, Sp is still equal to all of S j . 9C) 2506 The New Span, S N (i.e.,S 0 ), is saved as the Saved Span, S s . This is done because S s will be needed later if Sp (Le., j ) is rendered to j . *s = *N - °: (EQ 23) The portion of the Saved Span, S s , to the right xj abuts S Q at the x coordinate j . If, later in the method, S Q is rendered to j , then S s will become the Present Span, Sp 9D) 2508 The Current Portion, S Q (LC S 1 from ^ to j) has been changed, so a search is done for spans that could possibly occlude it The Span Occluding Test query performs, in each SMCCAM Word900: F nCi = f»V Λ f , Q Λ (" ≠ V A (*„ L < * CR ) (* βR > * CL ) [ (Z βL < Z CF ) V (Z^ ZQJ,) ] F „Q = f ,V Λ ^,Q Λ (»≠ 1) Λ (* Λ L < *I> A ( . R > ι L ) A t (2 Λ < Z 1L ) V (Z,, R < * 1L ) ) This query creates the set of all Potentially Occluding Spans for the Current Portion, S c (i.e., S j between XJ and X j ). The query finds only S 2 . The conjunction performed by the query includes FQ to prevent any previously read (and discarded) Potentially Occluding Span of Sj from being re-included into FQ and needlessly reprocessed. A variation of this method could skip this step and continue reading from the existing FQ rather than doing a query to eliminate spans from FQ. This variation saves execution time by eliminating the query, but possibly increases execution time by failing to reduce the number of spans in FQ. 9E) 2510 and 2512 Because FQ is not empty, there must be spans that possibly occlude the Current Portion, S c (Le„ S 1 from JL to xj). Therefore, the first span in FQ is read and made the New Span, S N . This read operation sets the following values: S N = read («) = 2; *NL = read (x L ) = x 2L ; x NR = read (x R ) = x 2R ; z NL = read (z L ) = z 2L ! * N R = rea ( R> = 2 2 R- d N = read (d) = d \ ι ' N = read (ι ' ) = ι ' 2 ; Reading the first span in FQ yields S 2 , the first (and only) span in the set The read process also deletes S 2 from FQ by setting ( ^ = o), making FQ empty. 10) 2109, 2106, 2110, and 2112 The right edge of me display screen has not been reached (Le.,x CL <x mu ) and both the Present Span, Sp (Le., S ), and the New Span, S N (ix., ^, are valid. Therefore, the Span Interaction Parameters for these two spans are computed, and are found to be: (Far, Non, Non, Near). 11) 2114 The Span Interaction Type is determined from the Span Interaction Parameters, and turns out to be Type 13. 12) 2116 and 2400 Because the Span Interaction Type is Type 13, Rule 3 is invoked to continue processingS j : 12A) 2402 The Current Portion, S c (i.e., S j between x 1L and Xj), is hidden starting at XJJL (Le., x^, but is visible to the left of *NL (i- e - *2L)- Therefore, render the Present Span, Sp (i.e., Sj), from Q to ^ (Le„ from XJL to x^. 12B) 2404 The processing of Present Span is completed (at this point), so makeS N (Le., S^ into the Present Span, Sp by setting: S p = S N = 2; *PL (EQ 26) 'PL = Z- NL = Z. 2L- *PR = Z, NR = Z. 2R 12C) 2406 The Current Portion, S Q , is set equal to S N by setting: *CL = Λ NL = *2L ; X CR = ^N = X 2R « 2 CL = 2 L = 2 2L : 2 CR = 2 NR β 2 2R : (EQ 27) CF = maX ( 2 N ' 2 NR) = «nax (z 2L , Z 2R ) = ZJJ 12D) 2408 The Saved Span, S s , is invalidated. In Step 9C, the values for S s were set to those of S j , but these are now labelled invalid. S s = invalid; (EQ 28) 12E) 2410 There is a new Current Portion, S Q (Le-, S^ so a search is done for spans that could possibly occlude it The Span Occluding Test query performs, in each SMCCAM Word 900: f »Q = f .V Λ («" Sp) Λ (X ΛL < x CR ) Λ (X ΛR > XQL) Λ [ (Z ΛL < z CF ) v ( Zj(R < z CF ) ] F nQ = F » V A (n≠ 2) Λ (X Λ <X 2R ) A ( . R > 2L) A [ (Z^ Z^) V (Z J , R < Z 2L ) ] This query creates the set of all Potentially Occluding Spans for the Current Portion, S Q (i.e., S 2 ). The query finds S Q . S 3 , and S 4 . 12F) 2412 and 2414 Because FQ is not empty, mere must be spans that possibly occlude the Current Portion, SQ (Le., ^. Therefore, the first span in FQ is read and made the New Span, ^. This read operation sets the following values: S N = read (n) = 0; x NL = read (x L ) = x 0L ϊ x NR = read (x R ) = x 0R ; 2 NL " read ( 2 L> " 2 0L- 2 NR = r" d ( 2 R) = 0R! d N = read (<f) = </„; « N = read (ι) = „; Reading the first span in FQ yields Q , the first span in the set The read process also deletes S 0 from FQ by setting (FQQ = o). 13) 2109, 2106, 2110, and 2112 The right edge of the display screen has not been reached Qj m.xa. < x w m .) and both the Present Span, Sp (i.e., S 2 ), and the New Span, S N (Le., S 0 X are valid. Therefore, the Span Interaction Parameters for these two spans are computed, and are found to be: (Non, Non, Far, Far). 14) 2114 The Span Interaction Type is determined from the Span Interaction Parameters, and turns out to be Type 32. 15) 2116, 2118, and 2600 Because the Span Interaction Type is Type 32, Rule 5 is invoked to process S 2 . 15 A) 2602 and 2604 The New Span, S N (i.e., S 0 is hidden within the x axis projection of S c (i.e., S 2 ). Therefore, S N (i.e.. o) is discarded. Because FQ is not empty, there must be other spans that possibly occlude the Current Portion, S Q (Le., S^. Therefore, the first span in FQ is read and made the New Span, S N . This read operation sets the following values: S N = read (n) = 3; x NL = read (x L ) = x 3L ; x NR = read(x R ) = x 3R ; 2 = read (z L ) = z 3L ; z NR = read (z R ) = z 3R ; d N = read ( ) = d 3 ; ι' N = read (ι') = i 3 ; Reading the first span in FQ yields S 3 , the first span in roe set The read process also deletes S 3 from FQ by setting (F 3 Q = o). S 2 is still the Present Span, Sp The status of the Saved Span, S s , is left unchanged, thereby remaining invalid. 16) 2109, 2106, 2110, and 2112 The right edge of the display screen has not been reached (Le,x CL <x- ωx ) and both the Present Span, Sp (Le., S^X and the New Span, S N (Le.,S 3 ), are valid. Therefore, the Span Interaction Parameters for these two spans are computed, and are found to be: (Far, Non, Non, Near). 17) 2114 The Span Interaction Type is determined from the Span Interaction Parameters, and turns out to be Type 13. 18) 2116 and 2400 Because the Span Interaction Type is Type 13, Rule 3 is invoked to continue processingS 2 . 18A) 2402 The Current Portion, S c (Le., 5^, is hidden starting at Xrø. (Le., x 3L ), but is visible to the left of XNL (Le., X 3 L). Therefore, render the Present Span,Sp (Le., S^, from X Q to x^ (Le., from XJ to x^ . 18B) 2404 The processing of Present Span is completed, so make the New Span,S N (Le., S 3 \ into the Present Span, Sp by setting: P ~ N = * *PL = *NL = *3L ; *PR = *NR = *3R ; __ „„, _ _ (EQ 32) 2 PL = 2 L _ 2 3L ; 2 PR ~ 2 NR = 2 3R ; d P = d = d > 'P = *N = ' * 3 ; 18C) 2406 The Current Portion, S c , is set equal to S N (ix.. S 3 ) by setting: *CL = *NL = *3L' *CR = *NR = *3R : Z CL = 2 NL = 2 3L : 2 CR = 2 NR " 2 3R : (EQ 33 ) CF = maX ( 2 NL» 2 NR> = max ( 2 3L' 2 3R> = 2 3L *» 18D) 2408 The Saved Span, S s , is invalidated, but it was already labelled invalid in a previous step. S s = invalid; (EQ 34) 18E) 2410 There is a new Current Portion, S Q (Le„ S 3 so a search is done for spans that could possibly occlude it The Span Occluding Test query performs, in each SMCCAM Word 900: F nQ = F n\ (» * 5 P> Λ (x„ L < *CR> A <*«* X ύ Λ I < 2 «L < 2 CF> V ( 2 .R < 2 CF> 1 (EQ 35) F nd = F »V A (« ≠ 3) Λ (X ΛL < *3R) Λ ( X «R > J: 3L) Λ 1 ( 2 »L < 2 3 L ) V ( 2 „R < 2 3L> J This query creates the set of all Potentially Occluding Spans for the Current Portion, S Q (Le., S 3 ). The query finds only S Q . 18F) 2412 and 2414 Because FQ is not empty, there must be spans that possibly occlude the Current Portion, S c (Le., S 3 ). Therefore, the first span in FQ is read and made the New Span, S N . This read operation sets the following values: S N = read (n) = 0; x NL = read (x L ) = x„ L ; x NR = read(x R ) = x 0R ; (EQ 36) 2N = read (z L ) = z„ L ; z NR = read (z R ) = z 0R ; d κ = read (d) = d 0 ; i = read (i) = ι' 0 ; Reading the first span in FQ yields SQ, the first (and only) span in the set The read process also deletes S 0 from FQ by setting OQ = ). The read process leaves tetFn empty. 19) 2109, 2106, 2110, and 2112 The right edge of the display screen has not been reached (i.e X Q L <x mu ) and both the Present Span, S P (Le., S 3 ), and the New Span, S N (Le., S 0 ), are valid. Therefore, the Span Interaction Parameters for these two spans are computed, and are found to be: (Non, Non, Far, Far). 20) 2114 The Span Interaction Type is determined from the Span Interaction Parameters, and turns out to be Type 32. 21) 2116, 2118, and 2600 Because the Span Interaction Type is Type 32, Rule 5 is invoked to process S j . 21 A) 2602 and 2606 The New Span, S N (i.e., SQ), is hidden within the x axis projection of S c (Le., S 3 ). Therefore, S N (Le., S 0 ) is discarded. Because FQ is empty, there must be no other spans that possibly occlude the Current Portion, SQ (i.e., S 3 ). Therefore, the New Span, S N , is labelled as invalid. S N = invalid; (EQ 37) A read operation is not done. S 3 is still the Present Span, S The status of the Saved Span, S s , is left unchanged, thereby remaining invalid 22) 2109, 2106, 2110, and 2300 Because the right edge of the display screen has not been reached (Le.,x C < x BUI ) and also because Sp is valid and S N is not valid, Rule 2 is invoked to continue processingS 3 . 22A) 2302 The Current Portion, S c (Le., S 3 X must be completely visible. Therefore, render the Present Span, p (i.e., S 3 ), from xcL to cR (Le., fromx 3 L to 3R ). 22B) 2304 and 2306 Because the Saved Span, S s , is not valid, there was not an intersecting span that reduced the size of S Q . Therefore, a query is done to look for an Abutting Span. The query performs, in each SMCCAM Word 900: »Q = »v Λ (*« = *C ) Λ ( Γ « = 2 CR) f . Q = ^v *- = *3R> 2 . = 2 3R> This query creates the set of all Abutting Spans for the Current Portion, S Q (Le., S 3 ) and stores them in FQ. The query finds only S . 22C) 2308 and 2310 Because FQ is not empty, there must be an Abutting Span. Therefore, the first span in FQ is read and made the Present Span, Sp This read operation sets the following values: Sp = read (n) = 7; x pL = read (x L ) = x 7L ; x pR = read (x R ) = x ?R ; (EQ 39) z pL = read (z L ) = z 7L ; z PR = read (z R ) = z ?R ; dp = read (-f) = d η ; i p = read (ι') = i ? ; Reading the first span in FQ yields S 7 , the first (and only) span in the set The read process also deletes S 7 from FQ by setting (F 7 Q = O). The read process leaves set FQ empty. 22D) 2312 The Current Portion, S c , is set equal to S P (Le„ S 7 ) by setting: (EQ40) CF = max (Zp L , Zp R ) = max (z ?L , z 7R ) = z ?R ; This step can be done concurrently with Step 22C. 22E) 2314 There is a new Current Portion, S c (i.e., S 3 ), so a search is done for spans that could possibly occlude it The Span Occluding Test query performs, in each SMCCAM Word 900: F »Q = F n A (»• ≠ Sp) A (X ΛL < XQR) A (x„ R > XQ L ) Λ [ (» Λ < 2^, V (z„ R < Z QF ) ] (EQ 41) F n = „V Λ (« ≠ 7) A ( „L < X7R) A ( ( , R > 7 ) Λ [ (Z, L < Z 7R ) V (Z J|R <Z 7R ) ] This query creates the set of all Potentially Ocduding Spans for the Current Portion, S c (Le., S 7 ). The query does not find any spans, so FQ is empty. 22F) 2316 and 2318 Because FQ is empty, there must be no spans mat possibly occlude the Current Portion, S (i.e„ S 7 ). Therefore, the New Span, S N , is labelled as invalid. S N = invalid; (EQ42) A read operation is not done. S 7 is still the Present Span, Sp 23) 2109, 2106, 2110, and 2300 Because the right edge of the display screen has not been reached (Le., Q L < J^,,) and also because Sp is valid and SJJ is not valid, Rule 2 is invoked to process S 7 . 23 A) 2302 The Current Portion, S c (i.e., S 7 X must be completely visible. Therefore, render the Present Span, Sp (Le., S 7 ), from X Q L to X Q R (Le., from ^ , to XJR). 23B) 2304 and 2306 Because the Saved Span, S s , is not valid, there was not an intersecting span that reduced the size of S c . Therefore, a query is done to look for an Abutting Span. The query performs, in each SMCCAM Word 900: F . " F *V Λ <*«L = *CR> A < 2 »L = 2 CR> 43 F .Q - ^V A (X„ L = X 7R ) A (Z„L - Z 7 R> This query creates the set of all Abutting Spans for the Current Portion, SQ (Le., S 7 ) and stores them in FQ. The query does not find any spans, so FQ is empty. 23C) 2308 and 2320 Because FQ is empty, there is not an Abutting Span. All spans completely to the left of XQR (i.e., X7R) must be hidden, so they are declared invalid. This is done by a query that performs, in each SMCCAM Word 900: F *\ ~ F nV A (x,, R > x CR ) ^ t Λ (EQ 44) F „ ~ F ΛV Λ (*»R > X 7R) This query reduces the number of valid spans by reducing the spans in set Fy from 15 to 10. At this point Fy consists of S 0 , S 1 , S β , and S 8 through S 14 . 23D) 2322 There is neither a valid Present Span, Sp nor a valid New Span, S N . Hence, both are labelled as invalid. S p = invalid; (EQ45) S N = invalid; 23E) 2324 The Current Portion, S c , is set equal to: *CL = *CR = *7R : ^C = inval i d ; Z Q L = infinity; z CR = invalid; (EQ 46) z CF = infinity; 24) 2109, 2106, 2108, and 2200 Because the right edge of the display screen has not been reached (L&.X Q L < x,„ u ) and also because the Present Span, Sp is not valid and F v is not empty (indicating that at least some spans are valid). Rule 1 is invoked. Here, Rule 1 is used to search for the frontmost span atx^. When found, this frontmost span is processed as the Present Span, Sp 24A) 2202 Do a query to find all valid spans that could affect the current raster line atX Q (Le., x-x). The query performs, in each SMCCAM Word 900: This query finds S 0 , S lt S 6 , and S 8 . The query operation could include z coordinate comparisons that check for values less than Z Q P which has been set to infinity. 24B) 2204 and 2222 Because FQ is not empty, mere must be at least one span that could affect the current raster line at Q (i.e., 7 ). Therefore, the first span in FQ is read and made the New Span, S N . This read operation sets the following values: S N = read («) = 0; x NL = read(x L ) = x 0L ; x NR = read (x R ) = x„ R ; ^^ 2 NL = read(z L ) = z 0L ; z NR = read(z R ) = z 0R ; </ N = τcad (d) = a* 0 ; < N = read (ι) = » 0 ; Reading the first span yields the leftmost span UIFQ, which is S Q . The read process also deletes S 0 from FQ by setting (FOQ = o). 4C) 2224 The z value for the New Span, S N (Le-, S 0 ), at the x coordinate Q (i.e„ g) is computed as 2 iaar 2 temp - 2 NL + C X CL " *NL> *N = 2 0L + <*7R ~ *0L> d (EQ 49 ) The position ( ^, z^ φ ) 2704 is shown in Figure 27. 24D) 2226, 2228, and 2232 The computed value, z^ φ , is less man Z Q L (Le., infinity so make the New Span, S N (i.e., S Q ), into the Present Span, Sp by setting: S p = S N = 0; X PL = *NL = 'OL 1 X PR = *NR = x 0ϋ' __ _„. (EQ50) 2 PL " 2 NL ~ 2 0L ; 2 PR = 2 NR ~ 2 0R : dp = d = d 0 ; ip = i N = « 0 ; 24E) 2236 The Current Portion, S c , is set to the portion of the Present Span, S P (i.e., S 0 ) to the right of XQL (i.e.,x 7R ) by setting: ■ *CR = X NR = *0R : Z CL = 2 temp' 2 CR = 2 NR = 2 0R' (EQ 51) z CF = max (z temp , z NR ) = max (z temp , z 0R ) = z temp ; 24F) 2237 and 2238As stated above, the objective of this part of the method is to find the frontmost span at X Q L (Le., x-jg). At XQ (Le.. ), the z coordinate of the Present Span, S P (Le., S 0 X is equal to z^^. Therefore, any span in front of Sp (Le., So) atXQ (Le., p must be at least partially located closer to the observer than t ø- φ . The set FQ is not empty and includes all the candidates for frontmost span at X Q L (Le., -7R), and some of these candidates maybe eliminated with the query: f „ Q = -v Λ Λ K 2 »L < 2 CL) V ( 2 „R < 2 CL) 1 (EQ52) = ' r .v AF n Λ [ ( ι , <U ( ; B < ] This query operation keeps candidate spans that have either endpointz coordinate less than Z JU - J ,. After the query, FQ contains only Sg. A variation of this method could skip this query to save time, but does not delete spans hidden by Sp (i.e., S 0 ) at X , (i.e., ^), and so must read all the spans that could affect the current raster line at L (Le., XTR). If the depth complexity is small, then this variation would yield a net savings. However, for large depth complexity, the time saved by eliminating candidate spans would outweigh the time spent doing the query operations. Hence, the method choice depends on the expected depth complexity of the scene. To avoid making an a priori assumption about scene complexity, the SMCCAM800 could include a mechanism for determining the depth complexity tXQL by counting the number of spans in the setFς. If the number of spans in FQ is small, the query operation of this step is skipped, and each span in FQ is read. If the number of spans in FQ is sufficiently large, the query operation is not slopped, and some spans in FQ are deleted, and a net saving is achieved. 4G) 2204 and 2222 Because FQ is not empty, there must be at least one more candidate span that could be frontmost a X Q (Le., x- j g . Therefore, the first span in FQ is read and made the New Span, S N . This read operation sets the following values: S N = read(n) = 8; x NL = read(x L ) = x JL ; x NR = read(x R ) - x |R ; ^^ N L " read(z L ) = z gL ; z NR = read(z R ) - z, R ; <f N = read (<f) = </-; )' N = read(i) = i,; Reading the first span yields the only span in FQ, S g . The read process also deletes S 8 from FQ by setting F 8 Q = O). The read process leaves set FQ empty. 24H) 2224 The z value for the New Span, S N (Le., SgX at the x coordinate X Q L (Le., TR) is computed as z^ p . z, temp " 2 L + ( CL ~ *NL> d K = 2 »L + <*7R " *SL> d i ( Q 54) The position ( ^, Z tanp ) 2704 is shown in Figure 27. 241) 2226, 2228, and 2232 The computed value, z lemp , is less than Z (i.e., z coordinate of S 0 at x^, computed as z lemp in Step 24C), so make the New Span, S N (Le.,S 8 X into the Present Span, Sp by setting: (EQ55) 24J) 2236 The Current Portion, S c , is set to the portion of the Present Span, Sp (i.e., S 8 ) to the right of X Q L (Le., x ) by setting: *CR = *NR = X *R : 2 CL = 2 te p ; 2 CR = 2 NR = 2 »R : (EQ 56) z CF = max(z temp , z NR ) = max (z ιnp , z gR ) = z gR ; 24K) 2237, 2204, 2206, and 2214 Because F Q is empty and Sp (Le., Sg) is valid, a search is done for spans that could possibly occlude the Current Portion, S Q , (i.e., Sg to the right of * j% ). The Span Occluding Test query performs, in each SMCCAM Word 900: F „Q = F „V A (« ≠ Sp) A (X„ L < XQR) A (X -R > XQ L ) Λ [ ( Z||L < Z F ) V ( Z)|R < Z cp ) ] F nQ = F „V A (« ≠ 8) Λ (X.L < Xg R ) A (X. R > X, R ) Λ [ ( ^ < Z gR ) V (Z, R < Zg R ) ] ?) This query creates the set of all Potentially Ocduding Spans for the Current Portion, S c (Le ^ S g to the right of x^). The query finds S 0 andS 9 . 24L) 2216 and 2218 Because FQ is not empty, there must spans that possibly occlude the Current Portion, S c (i.e., S 8 to the right of X-TR). Therefore, the first span in FQ is read and made the New Span, S N . This read operation sets the following values: S N = read (n) = 0; x NL =Ϊ read (x L ) = x 0L ; x NR = read (x R ) = x 0R ; ZNL = read (z L ) = z 0L ; z NR = read (z R ) = z 0R ; <t N = read (-f) = d Q ; » N = read (ι) = i„; Reading the first span in FQ yields SQ, the first span in the set The read process also deletes S 0 from FQ by setting (F„Q = 0). 25) 2109, 2106, 2110, and 2112 The right edge of the display screen has not been reached (Le-,x CL <x ln „) and both the Present Span, Sp (Le., Sg), and the New Span, S N (LC. S Q X are valid. Therefore, the Span Interaction Parameters for these two spans are computed, and are found to be: (Non, Non, Far, Near). 26) 2114 The Span Interaction Type is determined from the Span Interaction Parameters, and turns out to be Type 31. 27) 2116, 2118, and 2500 Because the Span Interaction Type is Type 31, Rule 4 invoked to process S g : 27 A) 2502 The Current Portion, S c (i.e., S 8 to the right of ^X and the New Span, S N (i.e., S 0 ), interact to cause S Q to transition from being visible to being hidden somewhere along its length: at point of intersection between S Q (i.e., Sg to the right of x^ and « (Le.. S Q ). The intersection is computed, and found to be at (x j , z\) 2708, as shown in Figure 27. 27B) 2504 The Current Portion, S (i.e., S g to the right of ^), is shortened by changing its right end point to the intersection point The right endpoint of SQ is modified by setting X CR = X I» 2 CR = *v (EQ 59) The Current Portion, S c is now the portion of Sg between xγg_ and j. The Present Span, Sp is still equal to all of S 8 . 27C) 2506 The New Span, S N (i.e., S 0 ), is saved as the Saved Span, S s . This is done because S s will be needed later if Sp (i.e., S ) is rendered to Xj. (EQ 60) ■ 'SL = Z 'NMTL = Z, OL' 2 SR - 2 NR ~ 2 0R ; d s = d u = d o> The portion of the Saved Span, S s , to the right Xj abuts S Q at the x coordinate Xj. If, later in roe method, S c is rendered to j , then S s will become the Present Span, Sp 27D) 2508 The Current Portion, S Q (i.e., Sg from ^ to j) has been changed, so a search is done for spans that could possibly occlude it The Span Occluding Test query performs, in each SMCCAM Word900: F »Q = f ,V Λ f n() A (" ≠V A ( B L < X CR) Λ ( Λ R > X CL> Λ K 2 .L < 2 CF) V 2 » < 2 Cp) l (EQ 61) F n Q = F Λ v A f nQ A (n ≠ S) Λ ( ΛL < XI) A (X,R > X 7R ) A [ (z Λ < z I ) V (z )lR <Zι) ] This query creates the set of all Potentially Occluding Spans for the Current Portion, SQ (Le., Sg from T to x j ). The query does not find any spans; therefore, FQ is empty. 27E) 2510 and 2514 Because FQ is empty, there must not be any spans mat possibly occlude the Current Portion, S c (i.e., Sg from XγR to Xj). Therefore, the New Span, S N , is declared invalid. S N = invaTid; (EQ 62) 28) 2109, 2106, 2110, and 2300 Because the right edge of the display screen has not been reached (Le.,x CL < x BUJi ) and also because Sp is valid and S N is not valid. Rule 2 is invoked to process Sg. 28 A) 2302 The Current Portion, S c (Le., Sg from to X j ), must be completely visible. Therefore, render the Present Span, Sp (i.e., Sg), from Q, to Q R (Le., from ^ to xj). 28B) 2304 and 2326 Because the Saved Span, Sc, is valid, there was an intersecting span that reduced the size of S Q . Therefore, the Saved Span, S s (i.e., S 0 ), is made into the Present Span, p by setting: Sp = S s = 0; 'PL *SL = , 0L' d τ> = d R = d n> 28C) 2328 The Current Portion, S c , is set to the portion of Sp (i.e., S 0 ) that is to the right of X j . That way, the Saved Span, S s (i.e., S 0 ), acts the same as an Abutting Span for the portion of Sg to the left of x j , where the abutting takes place atxj. This is done by setting: X CL = X CR = X V X CR = X SR = X 0R ; 2 CL = 2 CR = 2 P 2 CR = 2 SR = Z 0R! (EQ 64) z CF = max (z CR , z SR ) = max(z If z 0R ) = z t ; This step can be done concurrently with Step 28B. 28D) 2330 Because the values for the Saved Span, S s , have been transferred to the Present Span, Sp S s is invalidated. S s = invalid; (EQ 65) 28E) 2314 There is a new Current Portion, SQ (Le., SQ to the right of Xj so a search is done for spans that could possibly occlude it The Span Occluding Test query performs, in each SMCCAM Word 900: F „Q » F nV Λ ("" V Λ ( X . < X CR> Λ ( X . > X 0.> A I ( 2 Λ < 2 CF> V < 2 .R < 2 CF> I (EQ 66) F nQ " -V A (n ≠ 0) Λ (X ΛL < X 0R ) A (X,, R > XI) A [ (Z JtL < Z I ) V (Z J , R < Z j ) ] This query creates the set of all Potentially Occluding Spans for the Current Portion, S c (Le., So to the right of X). The query finds Sg through S 13 . 28F) 2316 and 2332 Because FQ is not empty, there must spans that possibly occlude the Current Portion, S Q (Le_, S 0 to the right of Xj). Therefore, the first span in FQ is read and made the New Span, 5 N . This read operation sets the following values: S N = read(n) = 8; x NL = read(x L ) = x, L ; x NR = read(x R ) = x |R ; (EQ 67) z NL = read (z L ) = z, L : z NR = read(z R ) = z, R ; </ N = read(<f) = d t ; » N = read(i) = i g ; Reading the first span in FQ yields Sg, the first span in the setThe read process also deletes S g from FQ by setting (Fg Q = θ). An alternate method could include a way to prevent the left side partner of an intersecting span pair from being considered as a Potentially Occluding Span of the right side partner. This could be done with an additional .query of an SMCCAM 800 that can do two simultaneous inequality tests on n in each SMCCAM Word 900. 29) 2109, 2106, 2110, and 2112 The right edge of the display screen has not been reached ( ,x CL <x nttx ) and both 5 the Present Span, S P (Le., S Q ), and the New Span, S N (Le., SgX are valid. Therefore, the Span Interaction Parameters for these two spans are computed, and are found to be: (Non, Near, Equal, Non). 30) 2114 The Span Interaction Type is determined from the Span Interaction Parameters, and turns out to be Type 21. 31) 2116, 2118, and 2600 Because the Span Interaction Type is Type 21, Rule 5 is invoked to processS 0 . 31 A) 2602 and 2604 The New Span, S N (ix., g is hidden within the x axis projection of S c (ie„ S 0 to the 10 right of X j ). Therefore, S N (Le-, Sg) is discarded. Because FQ is not empty, there must be other spans that possibly occlude the Current Portion, SQ (ix-, S Q to the right of Xj). Therefore, the first span in FQ is read and made the New Span, Su. This read operation sets the following values: S N = read («) = 9; x NL = read (x L ) = x 9L ; x NR = read (x R ) = x, R ; ι« (EQ 68) NL = * ead ( L ) = 2 9L ' - 2 NR = «*d (z R ) = z 9R ; d = read (< = d 9 ; ι " N = read (ι) = i 9 ; Reading the first span in FQ yields S9, the first span in the set The read process also deletes S 9 from FQ by setting ( 9Q = o). S 0 is still the Present Span, Sp The status of the Saved Span, S s , is left unchanged, 20 thereby remaining invalid. 32) 2109, 2106, 2110, and 2112 The right edge of the display screen has not been reached (i.e^ r < x^) and both the Present Span, Sp (i.e., S Q ), and the New Span, S N (i.c,S ), are valid. Therefore, the Span Interaction Parameters for these two spans are computed, and are found to be: (Far, Far, Non, Non). 33) 2114 The Span Interaction Type is determined from the Span Interaction Parameters, and turns out to be Type 5. 25 34) 2116 and 2400 Because the Span Interaction Type is Type 5, Rule 3 is invoked to continue processingS 0 . 34A) 2402 The Current Portion, S c (Le., S 0 to the right of XjX is hidden starting atx^ (Le., g j J, but is visible to the left of « (Le-, X9 1 J. Therefore, render the Present Span, Sp (Le., S 0 X from XQJ_ to X«L (Le., from xι to 9L ). 34B) 2404 The processing of Present Span is completed (for now), so make the New Span,S N (Le., S 3 ), into 30 the Present Span, Sp by setting: S p = S N = 9; (EQ 69) 35 34C) 2406 The Current Portion, S c , is set equal to S N (i , S9) by setting: (EQ70) 40 34D) 2408 The Saved Span, S s , is invalidated, but it was already labelled invalid. S s » invalid; (EQ71) 34E) 2410 There is a new Current Portion, S c (Le, S 9 X so a search is done for spans that could possibly occlude it The Span Occluding Test query performs, in each SMCCAM Word 900: »Q = f,v Λ (" ≠V * ( X «L < X CR) Λ ( X -R > X CL) Λ I < 2 »L< 2 CF) V < 2 «R < 2 CF> J F »Q - »V Λ (" ≠ 9 > Λ ( χ Λ< x 9R> A ( χ .R > x 9L> Λ K 2 - < 2 9 ) V < 2 «R < 2 9L> ] This query creates the set of all Potentially Ocduding Spans for the Current Portion, SQ (Le, S ). The query does not find any spans, so FQ is empty. 34F) 2412 and 2416 Because FQ is empty, there must be no other spans that possibly occlude the Current Portion, S c (ix, S 9 ). Therefore, the New Span, S N , is labelled as invalid. S N = invalid; (EQ 73) A read operation is not done. S 9 is still the Present Span, Sp The status of the Saved Span, S s , is left unchanged, thereby remaining invalid. 35) 2109, 2106, 2110, and 2300 Because the right edge of the display screen has not been reached (LC.X Q L < *„„) and also because Sp is valid and Su is not valid, Rule 2 is invoked to process S . 35A) 2302 The Current Portion, S Q (Le, S X must be completely visible. Therefore, render the Present Span, S P (i.e, S 9 ), from X Q L to Q H (ix., from X 9 to 9 R ). 35B) 2304 and 2306 Because the Saved Span, S s , is not valid, there was not an intersecting span that reduced the size of S Q . Therefore, a query is done to look for an Abutting Span. The query performs, in each SMCCAM Word 900: «Q = F «V Λ ( X *L = X CR> Λ ( 2 «L β 2 CR> ~~ - (EQ 74) F nQ = F .V A (X„ L = X 9R ) A (Z Λ - 2 9R) This query creates the set of all Abutting Spans for the Current Portion, S c (i.e., S 3 ) and stores them in FQ. The query finds only S x j . 35C) 2308 and 2310 Because FQ is not empty, there must be an Abutting Span. Therefore, the first span in FQ is read and made the Present Span, Sp This read operation sets the following values: p = read (n) = 11; x pL = read (x L ) = x nL ; x pR = read(x R ) = x„ R ; z pL = read (z L ) = z nL ; z pR - read (z R ) = z UR ; } dp = read (rf) = d u ; ι p = read(i) = i u ; Reading the first span in FQ yields S n , the first (and only) span in roe set The read process also deletes S u from FQ by setting ( Π Q = o). The read process leaves setFQ empty. 35D) 2312 The Current Portion, SQ, is set equal to Sp( ,S tl ) by setting: X CL = X PL = X 11L » X CR = X PR β X UR' 2 CL = 2 PL = 2 UL : 2 CR = 2 PR = 2 U Ϊ (EQ 76) CF = πl x ( 2 PL' 2 llR) ~ 8X ( 2 llL » 2 UR> = 2 U9> 35E) 231 There is a new Current Portion, SQ (Le, S n X so a search is done for spans that could possibly occlude it The Span Ocduding Test query performs, in each SMCCAM Word 900: F „Q = ^ v (» ≠*P> A < X «L < X CR> < X «R > x a) A I ( 2 «L < 2 CF> V ( 2 -R 2 CF) I ςEQ „Q = f .v Λ ("≠ ") A ( X . L < X U R) A (* Λ > *ΠL> A [ 2 - < 2 UR) V 2 Λ < 2 ΠR) 1 This query creates the set of all Potentially Ocduding Spans for the Current Portion, S c (Le, S 7 ). The query finds only S 0 . 35F) 2316 and 2432 Because FQ is not empty, there must be spans that possibly occlude the Current Portion, S c (ix, Su). Therefore, the first span in FQ is read and made the New Span, S N . This read operation sets the following values: S N = read(n) = 0; x NL - " d( L ) - x 0L : ^R " »"*(x R ) - χ 0R ; (EQ 78) ZNL = read(z L ) = z 0L ; z^ = read(z R ) = z 0R ; </ N = read(-f) = </„; ι N = read(ι ' ) = i 0 ; Reading the first span in FQ yields S Q , the first (and only) span in the set The read process also deletes S Q from FQ by setting (FOQ = o). The read process leaves set FQ empty. 36) 2109, 2106, 2110, and 2112 The right edge of the dispky screen has nc4 been reached (ix,XQ L <x BUX ) and both the Present Span, Sp (i.e., S n ), and the New Span, S N (ix, S 0 ), are valid. Therefore, the Span Interaction Parameters for these two spans are computed, and are found to be: (Non, Non, Far, Far). 37) 2114 The Span Interaction Type is determined from the Span Interaction Parameters, and turns out to be Type 32. 38) 2116, 2118, and 2600 Because tr^ Span mteractionType isType 32, Rute 5 is invoked to processS 11 . 38A) 2602 and 2606 The New Span, S N (ix, S 0 X is hidden within the x axis projection of S c (Le, S n ). Therefore, S N (Le., S 0 ) is discarded. Because FQ is empty, there must be no other spans that possibly occlude the Current Portion, S Q (Le, S ). Therefore, the New Span, S N , is labelled as invalid. S N = invalid; (EQ79) A read operation is not done. S 3 is still the Present Span, Sp The status of the Saved Span, Sc, is left unchanged, thereby remaining invalid. 39) 2109, 2106, 2110, and 2300 Because the right edge of the display screen has not been reached (LC.X Q < J^) and also because Sp is valid and S N is not valid, Rule 2 is invoked to continue 39A) 2302 The Current Portion, S c (Le, S n X must be completely visible. Therefore, render me Presen Sp (ix, S u ), from X Q to X Q R (ix, from JIL to x UR ). 39B) 2304 and 2306 Because the Saved Span, S s , is not valid, there was not an intersecting span that reduced the size of S . Therefore, a query is done to look for an Abutting Span. The query performs, in each SMCCAM Word 900: F „Q = F .V A ( X .L = X CR> A ( 2 -L = 2 CR> (EQ 80) F «Q = F -v A ( Λ = X Π ) A ( 2 «L = Z ΠR) This query creates the set of all Abutting Spans for the Current Portion, S c (Le, S u ) and stores them in FQ. The query does not find any spans, so FQ is empty. 39C) 2308 and 2320 Because FQ is empty, there is not an Abutting Span. All spans completely to the left of X Q R (i.e,x 11R ) must be hidden, so they are dedared invalid. This is done by a query that performs, in each SMCCAM Word 900: F .V = F .V A ( X .R > X C ) ^ U) »V ~ F «V A ( X «R > X 11R) This query reduces the number of valid spans by reducing the spans in setF v from 10 to 5. At this point F v consists of S Q , Sγ, and S 12 through S M . 39D) 2322 There is neither a valid Present Span, Sp nor a valid New Span, S N . Hence, both are labelled as invalid. S p = invalid; (EQ 82) S N = invalid; 39E) 2324 The Current Portion, S Q , is set equal to: X CL ■ X CR = X UR: X CR = invβ id; z CL = infinity; z CR = invalid; (EQ83) z CF = infinity; 40) 2109, 2106, 2108, and 2200 Because the right edge of the display screen has not been reached (LC Q < ^,„) and also because the Present Span, Sp is not valid and F v is not empty (indicating that at least some spans are valid). Rule 1 is invoked. Here, Rule 1 is used to search for the frontmost span at x 11R . When found, this frontmost span is processed as the Present Span,Sp 40A) 2202 Do a query to find all valid spans that could affect the current raster line atX (ix, UR). The query performs, in each SMCCAM Word 900: This query finds S Q , S j .and S I2 . The query operation could indude z coordinate comparisons that check for values less than Z Q P which has been set to infinity. 40B) 2204 and 2222 Because FQ is not empty, there must be at least one span that could affect the current raster line at Q (Le, XUR). Therefore, the first span in FQ is read and made the New Span, S N . This read operation sets the following values: X NL = « a d( L ) = χ 0L : X NR - 'e« R > = χ 0R ; (EQ g5) * NL - «ad (z L ) = z 0L ; z NR = read(z R ) = z 0R ; d N = read(< = d 0 ; i N = read(i) = « 0 ; Reading the first span yields the leftmost span in FQ, which is SQ. The read process also deletes S 0 from F Q by setting (FOQ = O). 40C) 2224 The z value for the New Span, S N (LC.SQX at the X coordinate Q L (Le,x 11R ) is computed as 2 t.mp " 2 NL + ( X CL - X NL> d N » 2 0L + ( X 11R ~ X 0L> d 0 (EQ 86) The position (x t 1R , z^- φ ) 2710 is shown in Figure 27. 40D) 2226, 2228, and 2232 The computed value, Zua φ . is less than Z Q (Le, infinityX so make the New Span, S N (Le, S Q ), into the Present Span, Sp by setting: R' (EQ87) R- 40E) 2236 The Current Portion, S Q , is set to the portion of the Present Span, Sp (ix, S 0 ) to the right of X Q L (Le, x 11R ) by setting: X CR = X NR = X 0R : 2 CL = 2 temp : 2 CR = 2 NR = 2 0R ; (EQ88) CF = max ( 2 p' 2 NR) = max ( 2 mp' 2 0R> " 2 mp : 40F) 2237 and 2238 As stated above, the objective of this part of the method is to find the frontmost span at X Q (Le, UR). At X Q (Le, x 11R X the z coordinate of the Present Span, Sp (Le, S 0 X is equal to z^φ. Therefore, any span in front of Sp (ix, S 0 ) at XQ (ix, U ) must be at least partially located doser to the observer than Z t ø-φ. The set FQ is not empty and includes all the candidates for frontmost span at X Q L (Le, UR), and some of these candidates maybe eliminated with the query: F nQ = «V A ,Q A f (Z nL <Z CL ) (Z ( , R <Z CL )1 w (EQ89) F ΛQ = F .V ΛF ,Q A K 2 „L <2 mp> V ( 2 . <2 mp)l This query operation keeps candidate spans that has either endpoint z coordinate less than n ™ . After the query, FQ is empty. 40G) 2204, 2206, and 2214 Because FQ is empty, there can not be any other candidate span that could frontmost at Q L (ix, Xι R ). Also, because Sp (Le, S 0 ) is valid, perform, in each SMCCAM Word 900, the Span Occluding Test query: F »Q " »V A (« ≠ Sp) Λ (X^ < X CR ) A (X„ R > XQL) Λ [ (Z Λ < Z CF ) V ( Zj|R < Zςp) ) (EQ90) „Q = F »V A (»*0) A (X ΛL <X 0 R) A (X JlR >X UR ) l( Λ <Z mp ) V (Z ( , R <Z temp )] This query creates the set of all Potentially Occluding Spans for the Current Portion, S c (Le, S 0 to the right of XU ). The query does not find any spans, BIKIFQ is empty. 40H) 2216 and 2220 Because FQ is empty, there must be no other spans that possibly occlude the Current Portion, SQ (ix, S 0 to the right of x 1IR ). Therefore, roe New Span, S N , is labelled as invalid. S N = invalid; (EQ91) A read operation is not done. S 0 is still the Present Span, Sp The status of the Saved Span, S s , is left unchanged, thereby remaining invalid. 41) 2109, 2106, 2110, and 2300 Because the right edge of the display screen has not been reached ( e., Q <x mmI ) and also because Sp is valid and S N is not valid, Rule 2 is invoked to process S Q . 41 A) 2302 The Current Portion, S c (Lm.,S 0 to the right of x 11R X must be completely visible. Therefore, render the Present Span, Sp (Le, S 0 X from Q to XQR (ix, from x nR to X Qg ). 41B) 2304 and 2306 Because the Saved Span, S s , is not valid, there was not an intersecting span that reduced the size of S c . Therefore, a query is done to look for an Abutting Span. The query performs, in each SMCCAM Word 900: „Q = F „v A ( .L ■ X CR) A 2 Λ - 2 CR) . «Q ~ F *V A ( X »L = 0R) A ( 2 «L = This query creates the set of all Abutting Spans for the Current Portion, SQ (Le, S 0 ) and stores them in FQ. The query does not find any spans, so FQ is empty. 41C) 2308 and 2320 Because FQ is empty, there is not an Abutting Span. All spans completely to the left of X R (Le,x 0R ) must be hidden, so they are declared invalid. This is done by a query that performs, in each SMCCAM Word 900: »V = F «V A < .R > X CR) F „V = F „V A (X. R > XOR) This query reduces the number of valid spans by reducing the spans in setF v from 10 to 2. At this point v consists of j and 14 . 41D) 2322 There is neither a valid Present Span, Sp nor a valid New Span, S N . Hence, both are labelled as invalid. S p = invalid; (EQ 94) S N = invalid; 41E) 2324 The Current Portion, S c , is set equal to: X CL = X CR = X 0R- X CR = nvalid ; Z Q L = infinity; z CR = invalid; (EQ 95) Z QF = infinity; 42) 2109, 2106, 2108, and 2200 Because the right edge of the display screen has not been readied (LC.X Q L < X j J and also because the Present Span, Sp is not valid and F v is not empty (indicating that at least some spans are valid). Rule 1 is invoked. Here, Rule 1 is used to search for the frontmost span at o . When found, this frontmost span is processed as the Present Span, Sp 42A) 2202 Do a query to find all valid spans that could affect the current raster line atX (i.e,x 0R ). The query performs, in each SMCCAM Word 900: F »Q = F*Q - ~ 96) This query finds Sj and S . The query operation could include z coordinate comparisons that check for values less than ZQP which has been set to infinity. 42B) 2204 and 2222 Because FQ is not empty, mere must be at least one span that could affect the current raster line at XQ, (i- e -< OR)- Therefore, the first span in FQ is read and made the New Span, S N . This read operation sets the following values: N = read (n) = 1; x NL = read (x L ) = x 1L ; * NR = read (x R ) = x, R ; NL - «ad (z L ) = z 1L ; z NR = read (z R ) = z, R ; d = read (β") ~ d^ i N = read (») = i,; Reading the first span yields the leftmost span in FQ, which is S t . The read process also deletes S l from F Q by setting (F 1Q = 0). C) 2224 The z value for the New Span, S N (Le, Sj), at the x coordinate XQL (i-e, XOR) ύ computed as z^p. 2 temp = 2 NL + ^CL^NL^N " 2 1L + x 0R- χ l L ( Q* 8 ) The position (X Q , ,,,-^) 2712 is shown in Figure 27. D) 2226, 2228, and 2232 The computed value, z iaap , is less than Z Q L (Le, infinity X so make the New Span, S N (Le, Sj), into the Present Span, Sp by setting: p = S N = 1; X PL = *NL = X 1L ; (EQ99) 2 PR = 2 NR ~ 2 1R v ; d V - d H = d V 'p - 'N = 'l» E) 2236 The Current Portion, S Q , is set to the portion of the Present Span, S P (ix, S) to the right of XQL (Le, X 0 R) by setting: X 2 CL = 2 tβmp : 2 CR = 2 NR = 2 1R : (EQ 100) CF = max(z temp ,Z NR ) = π> a *(z U mp' 2 lR) " 2 Ump' F) 2237 and 2238 As stated above, the objective of this part of the method is to find the frontmost span at X (Le, X Q R). At (Le„ X Q R), the z coordinate of the Present Span, Sp (Le, j X is equal to Z g -,,.. Therefore, any span in front of Sp (Le, S j ) atX Q L (Le, Xgg) must be at least partially located closer to the observer than ∑ t em- The set FQ is not empty and includes all the candidates for frontmost span at Q L (Le, X Q R), and some of these candidates maybe eliminated with the query: „Q = -V F .Q K 2 *L< 2 CL> V ( 2 «R <2 CL>J (EQ 101) F „ Q = ^VAF.QΛ [(z ΛL <z lemp ) v ( jΛ <z Bp )J This query operation keeps candidate spans that has either endpoint z coordinate less than ^p. After the query, FQ contains only S l4 , and did not get changed by the query. G) 2204 and 2222 Because FQ is not empty, mere must be at least one more candidate span that could be frontmost atx^ -c, ØRX Therefore, the first span in FQ is read and made roe New Span, S N . This read operation sets the following values: S N = read(n) « 14; < NL = read(x L ) = x, 4L ; x NR = read(x R ) = x, 4R ; ^ z NL = read(z L ) = z 14L ; z NR = read(z R ) = z, 4R ; d N = τead(d) = β" M ; ι N = read( = ι 14 ; Reading the first span yields the only span inF Q , that is, S 14 . The read process also deletes S 1 from FQ by setting F 14 Q = O). The read process leaves set FQ empty. H) 2224 The z value for the New Span, S N (Le, S 1 ), at the x coordinate Q L (ix, Q R) is computed as *temp* 2 wmp B 2 NL + ( X CL ~ X NL> d N " 2 14L + < X 0R " X 14L> d l4 (EQ 103) The position ( QR. Ztαnp) 2714 is shown in Figure 27. 421) 2226, 2228, and 2232 The computed value, z^p, is less than Z Q (Le, z coordinate of S 0 at ^, computed as z 1aDV in Step 42C), so make the New Span, S N (Le, S 1 X into the Present Span, Sp by setting: X PL = X L = X 14L : (EQ 104) 2 PL = 2 NL = 2 14L ; PR ~ 2 NR = 2 14R ; d p - <*N = rf ι 4 : 42J) 2236 The Current Portion, S Q , is set to the portion of the Present Span, Sp (ix, S 1 ) to the right of 10 QL (Le, QR) by setting: X CR = X NR = X 14R ; 2 CL " 2 temp " ' 2 CR = 2 NR β 2 14R * ' (EQ 105) CF = maX ( 2 .emp > = maX ( 2 lemp' 2 14R> = 2 14RΪ 15 Because, as shown Figure 27, z^ φ is equal to ZQ . the max( ) function could choose either z^ mp or Z Q - 42K) 2237, 2204, 2206, and 2214 Because FQ is empty andSp (Le, S 14 ) is valid, a search is done for spans that could possibly occlude the Current Portion, S Q , (ix, S 1 to the right of x 0R ). The Span Occluding Test query performs, in each SMCCAM Word 900: F .Q = F „V (« ≠ Sp) A (X. L < XQ R ) Λ (x„ R > X CL ) A [ (Z Λ < Z cp ) V (z„ R < Z Q p) ] in E 106) 20 F „Q - .V (» ≠ 8 > ( X -L < X 1 4R ) A ( .R > 2 »p) A I < 2 «L < 2 14R> V ( 2 „R < 2 14R> ] This query creates the set of all Potentially Occluding Spans for the Current Portion, S c (Le, S 14 to the right of X Q R). The query does not find any spans, SOFQ is empty. 42L) 2216 and 2220 Because FQ is empty, there must be no other spans that possibly occlude the Current 25 Portion, S c (ix, S 1 to the right of x 0R ). Therefore, roe New Span, S N , is labelled as invalid. S N = invalid; (EQ 107) A read operation is not done. S i is still the Present Span, Sp The status of the Saved Span, S s , is left unchanged, thereby remaining invalid. 30 43) 2109, 2106, 2110, and 2300 Because the right edge of the display screen has not been reached (LC Q < x-„„) and also because Sp is valid and S N is not valid. Rule 2 is invoked to process S M . 43A) 2302 The Current Portion, S (Le, S 14 to the right of X Q RX must be completely visible. Therefore, render the Present Span, S P (Le, S 1 ), from X Q L to X Q R (ix, from X Q R to x 14R ). 43B) 2304 and 2306 Because the Saved Span, S s , is not valid, there was not an intersecting span that 35 reduced the size of S c . Therefore, a query is done to look for an Abutting Span. The query performs, in each SMCCAM Word 900: .Q = F «v A ( χ «L = X CR) A ( 2 «L = 2 CR> F F«Q -~ F«V A A ( ( l X .L - " x X 14R U> Λ f ( 2 ,« = - 2 ,14R) < E Q 108 ) 40 This query creates the set of all Abutting Spans for the Current Portion, S c (Le, S 1 to the right of Q R) and stores them in FQ. The query does not find any spans, so FQ is empty. 43C) 2308 and 2320 Because FQ is empty, there is not an Abutting Span. All spans completely to the left of XCR (>-C,XI 4 R) must be hidden, so they are declared invalid. This is done by a query that performs, in each SMCCAM Word 900: F v = F v A ( - R > X Q D) C R (EQ 109) F «V = F »V A ( X «R > X 14 ) This query reduces the number of valid spans by reducing the spans in setF v from 2 to 1. At this point F v consists only of S j . 43D) 2322 There is neither a valid Present Span, Sp nor a valid New Span, S N . Hence, both are labelled as invalid. S p = invalid; S J N V = invalid; « 1U » 43E) 2324 The Current Portion, S Q , is set equal to: XQ = XQR = X j4R ; QR = invalid; Z Q L = infinity; z CR = invalid; (EQ 111) " z CF = infinity; 44) 2109, 2106, 2108, and 2200 Because the right edge of the display screen has not been reached ( e, Q L < x^*) and also because the Present Span, Sp is not valid and F is not empty (indicating that at least some spans are valid), Rule 1 is invoked. Here, Rule 1 is used to search for the frontmost span a x 14R . When found, this 20 frontmost span is processed as the Present Span, p 44A) 2202 Do a query to find all valid spans that could affect the current raster line at (Le, X 1 R). The query performs, in each SMCCAM Word 900: This query finds only Sj. The query operation could include z coordinate comparisons that check for values less than Z Q P which has been set to infinity. 44B) 2204 and 2222 Because FQ is not empty, there must be at least one span that could affect the current raster line at X Q (Le, XJ 4 R). Therefore, the first span in FQ is read and made the New Span, S N . This 30 read operation sets the following values: S N = read(n) = 1; X NL - r ead ( χ > ■ X IL- x X N..-R. == r «eadd(fxx R „)l - = x x 1 ._ R : (EQ 113) z NL = read(z L ) = z 1L ; z NR = read(z R ) = z 1R ; </ N = read(<ι) = d χ ; i N - read(i) - i χ i 35 Reading the first span yields the leftmost span UIFQ, which is 5χ. The read process also deletes j from F Q by setting (F 1Q = θ). 44C) 2224 The z value for die New Span, S N (ix, Sj), at the x coordinate X Q L (i.e,x 14R ) is computed as z lemp- 40 2 t«mp = 2 NL + ( X CL " X NL) d N = 2 1L + ( X 14R- X 1L) d l (EQ 114) The position (XI 4 R, Z t βn p ) 2716 is shown in Figure 27. 44D) 2226, 2228, and 2232 The computed value, t α-φ, is less than Z (i*- * infinity so make the New Span, S N (ix, S ), into the Present Span, Sp by setting: p = S N = 1; (EQ 115) 44E) 2236 The Current Portion, S Q , is set to the portion of the Present Span, S P (ix,S x ) to the right of QL (Le, x 14R ) by setting: X CR = X NR = X 1R ; 2 CL = 2 temp : 2 CR = 2 NR = 2 1R' (EQ 116) CF " max ( 2 temp' = ma * ( 2 temp' 2 lR) = 44F) 2237, 2204, 2206, and 2214 Because FQ is empty and S P (Le, i) is valid, a search is done for spans that could possibly occlude the Current Portion, S Q , (ix, Sj to the right of x 14R ). The Span Occluding 5 Test query performs, in each SMCCAM Word 900: F »Q = F „V A (" ≠ 5 P) A ( X »L < CR> A ( X «R > X CL> A t ( 2 «L < 2 CF> V ( 2 .R < 2 CF> ] F nQ " F „V A (« ≠ 8) A (x nL < Xι R ) A (X nR > Xι 4R ) A [ (Z ΛL < Z teιnp ) V (Z )l R < Z temp ) ] This query creates the set of all Potentially Occluding Spans for the Current Portion, S Q (i.e, j to the 0 right of x 14R ). The query does not find any spans, so FQ is empty. 44G) 2216 and 2220 Because FQ is empty, there must not be any spans that possibly occlude the Current Portion, S Q (ix, S j to the right of x 14R ). Therefore, die New Span, S N . is labelled as invalid. S N = invalid; (EQ 118) 5 A read operation is not done. S t is still the Present Span, Sp The status of the Saved Span, S s , is left unchanged, thereby remaining invalid. 45) 2109, 2106, 2110, and 2300 Because the right edge of the display screen has not been reached (Le,xrχ < nux) and also because Sp is valid and S N is not valid. Rule 2 is invoked to process S t . 45A) 2302 The Current Portion, S c (Le, S j to the right of x 14R X must be completely visible. Therefore, 30 render the Present Span, Sp (ix, jX from L to Q R (ix, from x 14R to x iR ). 45B) 2304 and 2306 Because the Saved Span, S s , is not valid, there was not an intersecting span that reduced the size of S c . Therefore, a query is done to look for an Abutting Span. The query performs, in each SMCCAM Word 900: F «Q = F nV A ( X «L = X CR> A ( 2 «L = 2 CR) „ 35 r F < K. , ( EQ 119) " F .Q β F «V A ( X .L = X 1R> A ( 2 .L - 2 1R> This query creates the set of all Abutting Spans for the Current Portion, S c (Le, S to the right of x 14R ) and stores them in FQ. The query does not find any spans, so FQ is empty. 45C) 2308 and 2320 Because FQ is empty, there is not an Abutting Span. All spans completely to the left of 40 XQR (ix, X 14 R) must be hidden, so they are dedared invalid. This is done by a query that performs, in each SMCCAM Word 900: F « JI vV = F * *vv A (x « .Rκ > x c C s K ) (EQ 120) F nV = F Λ V Λ ( X » > X 1 ) This query reduces the number of valid spans by reducing the spans in set y from one to zero. At this point Fy is empty. 45D) 2322 There is neither a valid Present Span, Sp nor a valid New Span, S N . Hence, both are labelled as invalid. S p = invalid; (EQ 121) S N = invalid; 45E) 2324 The Current Portion, S c , is set equal to: X CL " X CR = X 1R ; X CR " in™!* z CL = infinity; z CR = invalid; (EQ 122) 2 CF = * n f ' t ; 46) 2106, 2108, and 2120 Because the Present Span, Sp is not valid and F v is empty, all the spans have been processed. Since X Q (ix, x 1R ) must be less than x ma , there is still a fraction of the current raster line to the right of Q L (Le, XJR) that has not been covered by spans. Therefore, the background is rendered fromx (ix, x JR ) to Xmax- The Segment Span Rasterization Method 2100 is complete for the current raster line. Timing of Processing within the Span Sorting Pipeline 400 The Generic 3D Graphics Pipeline 200 generally utilizes a double buffered frame buffer 224 with two pages of mem¬ ory. This allows an image in one page to be displayed on the display device, while the rendering process writes an image into the other page. Image data is written to random locations within the display screen 104 because the geometry is fed into the pipeline without any spatial sorting. When scene rendering is complete, the pages are swapped and the next scene is rendered. Using only a few raster lines of display memory The Span Sorting Rendering Pipeline 400 generates die complete pixel coloring for a raster line before proceeding to the next raster line. If raster line rendering is done at a rate to keep up with the display, then only a few raster lines of Raster Line Memory 416 are needed. Figure 28 shows how the timing of processing within the Span Sorting Rendering Pipeline400 can be accomplished with only two raster tines of Raster Line Memory 416. In this figure, the horizontal axis is time, where each tick mark represents the time to display one raster line on the physical display device (CRT, etc.). Polygon processing 1400 for scene 1 2802 writes all the polygons in the scene into the Bucket Sort Memory 404. Once this 2802 is completed, raster line 0 is rendered 2804 for scene 1. When rendering this first raster line 2804 is completed, the displaying of scene 1 806 on the display device can begin, provided that subsequent raster lines are rendered before they are needed by roe display device. In this way, the rendering of ras- ter lines 2808 is in lock step with displaying of raster lines 2806, and only two raster lines of Raster Line Memory 416 are needed, one for writing while a raster line is processed, and one for reading to send data to the display device. Once polygon processing 1400 for scene 1 2802 is complete, polygon processing 1400 for scene 22810 can begin, and this 2810 is done in parallel (in a pipelined fashion) with processing raster lines for scene 12808 and displaying raster lines for scene 12806. The diagram of Figure 28 is an ideal case because processing a raster line 2808 is assumed to be very closely matched to the time it takes to display a raster line. In practical systems, there is some variation in die time takes to process a raster line. Therefore, several raster lines should be processed before the corresponding scene is displayed, thereby providing some "slack" in the timing requirements. The diagram of Figure 28 also neglects display timing issues such as horizontal and vertical retrace times, but these can be used to introduce some of the "slop" in the timing. Having less memory than a full frame buffer is possible because pixel coloration processing is proportional to the number of pixels in the display screen rather than to the number of pixels in all the polygon spans in the raster line. When render¬ ing timing is done this way, the latency through the Span Sorting Rendering Pipeline 400 is mostly in die process polygon 1400 portion. If the polygon processing 1400 can keep up with the display screen rate, then a new scene can be displayed every time the screen of the display device is refreshed. The diagram of Figure 28 assumes, when a new scene is displayed, raster line 0 of the scene must be displayed first This assumption requires polygon processing 2802 and raster line processing 2808 to "sync up" with roe display device 2806. An alternate approach is to let the polygon processing complete at any point with in roe cycle 2806 of the display device, and to begin raster line rendering at the raster line that is about to be displayed (taking into account the latency of processing a raster line). This alternate approach requires the Bucket Sort Memory 404 to be able to start its read operation at any raster line. Some display screens, such as standard televisions, use an interlaced display of the raster lines. That is die even num¬ bered raster lines are displayed first (in the even "field") and the odd numbered raster lines are displayed next (in the odd "field"). For this type of display, the Span Sorting Rendering Pipeline 400 generates raster lines in die order needed by the display. The two fields of the display can be treated as separate scenes, or as a single interlaced scene. Using a single buffered display memory Figure 28 assumes only a few raster lines are stored in the Raster Line Memory 416. An alternate approach is to have memory for all the raster lines in the Raster Line Memory 416. This increases the required memory by quite a lot (maybe by a factor of 100), but most computer video display systems have memory for every pixel in the screen, and 3D rendering maybe considered an add-on to this type of computer display. Hence, die required memory may already present in die video memory of the host computer system. This section of the document assumes the Raster Line Memory 416 stores all pixel color information for every raster line. Figure 29 shows the timing for a display device with ten raster lines (practical displays generally have on the order of 1000 raster lines) being continuously refreshed, where three screens worth of raster lines are displayed2902. As in the previous fig¬ ure, the horizontal axis is time, where each tick mark represents the time to display one raster line on die physical display device. At at some point within the display of a scene 2904, polygon processing 1400 will be completed 2906 for die next scene, and this point 2906 is not assumed to be synchronized with die scene display in any particular way. Completion 2906 of polygon processing 1400 means that raster line processing 2907 can begin. Processing raster line 02908 is done first and this raster line is displayed the next time 2910 raster line 0 is sent to the display device. Similarly, die last raster line is processed 2912 and subsequently displayed 2914, thereby displaying 2916 roe entire scene. Figure 29 shows how, upon completion 2906 of a scene's polygon processing 1400, the scene can be displayed beginning at die very next refresh cycle 2916 of die display, even though the raster line processing of roe last raster line 2912 occurs after display of die first raster line 2910. If both the polygon processing and the raster line processing for entire scenes can keep up with die display device's screen refresh rate, then a new scene can be displayed at every screen refresh. If, once in a while, either die polygon processing or the raster line processing does not keep up, then the display device may show the same scene on two consecutive display refresh cydes. The concept behind Figure 29 can be extended to raster line processing that does not on the average, keep up with the display refresh cycles. That is, as long as the raster line processing of die last raster line2912 is completed before it is displayed 2914, then the entire scene will be displayed correctly. Furthermore, raster line processing can start on the raster line that has most recently been displayed. Figure 30 shows polygon processing 1400 completing 3002 just before raster line 7 is completely displayed. Raster line processing 3004 can begin with raster line 73006, and this raster line is displayed 3008 roe next time the display device shows it Display of the scene is not intermixed with display of die previous scene (that is, there is a clean transition) provided die last raster line processed 3010 is completed before it is displayed 3012. In this way, the maximum time to process all rasters 3014 is almost as long as two screen refresh cycles. Hence, die processing of each raster line can be about twice as long as the time to display it without requiring the need for double buffering, only a single buffer is needed. The concept illustrated in Figure HO of having raster line processing 3004 cover more that one screen refresh cycles, can be moduied to have rastei line processing 3004 wait until raster line 0 is displayed, thereby synchronizing with the refresh cycles. Polygon processing 1400 for the next scene does not need to wait because die Bucket Sort Memory 404 is double buff¬ ered. Using a double buffered display memory The Span Sorting Rendering Pipeline 400 can function with a fully double buffered Raster Line Memory 416, where every pixel in the display screen 104 corresponds to two words of memory (one in each buffer page). In this configuration, poly¬ gon processing 1400 for a scene is done until completed, then raster line processing is done until all raster lines in the display screen 104 have been processed, then the scene is shown on the display device. This approach has the advantage of being able to take as long as necessary without being constrained to display device timing. This approach has the disadvantage of introducing an additional stage of latency. Qusry Processor Architecture v Within the Span Sorting Rendering Architecture 500 of Figure 5, for each raster line, die Query ProcessorSlO receives^pεns from the Span Generation Processor 508, determines the visible span portions (as described above), and sends the visible span portions to the Rasterize Processor 510. A block diagram of die Query Processor 510 is shown in Figure 31, along with the two pages within the Span Memory 408. While one Span Memory Page 800 is receiving Span Parameters from the Span Generation Processor 508, the other page 800 is being queried to determine the visible span portions. The two pages 800 are swapped via the Query Processor Crossbar 3102, which is a set of multiplexors. The Query Processor 510 includes a register file 3104 that is subdivided into five sets of registers for storing Span Parameters: 1) registers3106 for the Current Portion, S c ; 2) registers 3108 for the Present Span, S P ; 3) registers 3110 for the New Span, S N ; 4) registers 3112 for the Saved Span, S s ; and 5) temporary registers 3114 used for things such as span intersection locations. The Query Processor Control 3116 determines the sequence of operations in the Query ProcessorSlO, including the sequence of query operations. As raster line processing proceeds, branches within the methodlβOO or 2100 depend on query outcomes, span status, and Span Interaction Types (SITs). For each pair of S c and S N , die SIT and SIP Logic 3118 generates the Span Interaction Type. Computing a SH requires the operations of Equation 10 to be performed, as well as various comparison operations. These operations are performed in the Compare and Offset Computation 3200 block on data received from the regis¬ ter file 3104. Whenever Rule 42500 is invoked, the intersection point between c and S N is computed in the Intersection Com¬ putation block. For maximum throughput Compare and Offset Computation 3200 can be implemented in parallel hardware. Figure 32 shows four identical blocks 3202, where each block 3202 includes two arithmetic comparators 3204 and 3206, a subtracter 3208, and a multiplier 3210. The subtracter 3208 and multiplier 3210 compute the offsets as shown in Equation 10. The comparators generate signals that can be used to generate the Span Interaction Parameters (SIPs). Inputs to the blocks3202 come from the register file 3104, and outputs go to the SIT and SIP Logic 3118. Sorting Magnitude Comparison CAM Circuits Figure 33 shows a prior art MCCAM bit cell 3300, taken from the Duluk Patent constructed out of CMOS transistors and gates. A field within an MCCAM Word can be built with a multiplicity of these cells3300. In this cell 3300, one bit is stored in a Six Transistor RAM Subcircuit 3302, where reading and writing is controlled by the signal CamWord 3304 and data is written and read via the differential bit lines, BitH 3306 and BitL 3308 (the * Η" and "L" at the end of signal names indicates active high and active low, respectively). During a query operation, me XOR Subcircuit3310 performs an exdusive-or function to produce the signal NotEq al 3312, which indicates the bit value stored in the RAM 3302 is not equal to the bit value on the bit lines 3306 and 3308. During a query operation, the signal Enableln 3314 being asserted indicates higher order bits in the field are all equal and this bit position is enabled for comparison. IfrVoJ ιuι/3312 is at logic "0" when £n<2o/e/n 3314 is asserted, the Precharged Enable Propagation Subcircuit 3316 enables die next lower bit position by asserting EnableOut 3318. UNotEqual 3312 is at logic "1" when Enableln 3314 is asserted, die Two Transistor Query Resolution Subcircuit 3320 condi¬ tionally pulls down the QueryTrue 3322 signal, depending on the value of ComparisonOp 3324 (as described in the Duluk Patent), and EnableOut 3318 remains unasserted. In contrast to an MCCAM, an SMCCAM 800 (recall, the "S" stands for "sorting") can shift data from one word 900 to the next during a sorting operation. Figure 34 is a TIL type" circuit for one bit in an SMCCAM Word900. This cell 3400 includes a master-slave flip-flop 3402 for storing die bit value because it must function as a bit in a shift register. The cell is shown with separate I O lines, InputBit 3404 and OutputBit 3406, but a single bidirectional I/O line or a bidirectional differen¬ tial pair could be used. A read operation is done by asserting ύieRead 3408 control line, which enables die tri-state buffer 3410. A write operation is done on the rising edge of Clock 3412 when WriteEn 3414 is asserted and ShiflEn 3416 is not asserted. The shift within a sort operation is done on the rising edge of Clock 3412 when WriteEn 3414 is asserted and ShiflEn 3416 is also asserted. The signal ShiflEn 3416 controls a multiplexor 3418 that chooses whether data on InputBit 3404 or data on Shiftln 3420 is stored into the flip-flop 3402. Data on Shiftln 3420 come from ShiftOut 3422 in die corresponding cell 3400 in the previous SMCCAM Word 900. Query operations function similarly to die MCCAM of die Duluk Patent That is, an exclusive-or 3424 generates die signal Not Equal 3312, which is used to generate EnableOut 3318 and the word's query result StoredGreaterL 3426. The key differences in the query operation function are: 1) die absence of ComparisonOp 3324 in the cell; and 2) an open collector circuit 3428 to generate the query result Figure 35 is a 27 -transistor CMOS circuit for one bit in an SMCCAM Word 900. This cell 3500 includes a Six Tran¬ sistor RAM Subcircuit 3302 as the master part of the flip-flop, and a Slave Memory Subcircuit 3502 as the slave part of the fiip- flop. The Six Transistor RAM Subcircuit 3302 is used in the conventional way for read and write operations, and the Slave Memory Subcircuit 3502 is only used during shifting. To allow a bit to be shifted into die Six Transistor RAM Subcircuit3302, a Shift Write Subcircuit is included in the cell 3504. The following sequence occurs (in this example cell 3500) when shifting is done: 1) the differential clock signal ShifiToSlaveH 3506 and ShiftToSlaveL3508 is asserted then de-asserted in order to latch the data bit into the Slave Memory Subcircuit 3502; 2) the data bit is output from die cell to the corresponding cell 3500 in the next word 900 via the differential signal ShiftDataOutH 3510 and ShifiDataOutL 3512; and 3) the data bit is received on the differential signal Shift DatalnH 3514 and ShiftDatalnL 3516 in die next word 900 and is written into mat cell 3500 by assert¬ ing ShifiEnable 3518. Certainly, there are many bit cell circuits that could be designed to do an equivalent function. To illustrate some of the other choices, the cell in Figure 35 uses a Non-Precharged Enable Propagation Subcircuit3520 and a Three Transistor Query Resolution Subcircuit 3522. Note that the Slave Memory Subcircuit 3502 is a dynamic circuit and it could be replaced with many other types of latches, including a static latch. Figure 36 shows an array of CMOS SMCCAM bit cells forming a set of fields. The ύgnalt,ShiftDataInH 3514 and ShiflDαtαlnL 3516, are grounded in the first word 900 because the first word 900 cannot have data shifted into it 900. When signed numbers need to be stored into the SMCCAM, it is simplest to invert die sign bit (Le, "1" implies posi- tive) during both the reading and writing processes. That way, in die hardware, positive numbers are "bigger" dun negative num¬ bers. An alternate approach is to change the logic in the sign bit positions in every field where a signed number needs to be stored and queried. Multiple Spans Vertically within a Raster Line In the Segment Span Rasterization Method 2100 as described above, each polygon can have only one span in a given raster line, and that span is represented by a line segment (hence, die name 2100) parallel to die x-y plane in screen coordinates. The location of the endpoints of spans are in object-precision, and therefore can be located anywhere horizontally within a pixel's boundaries. For example, if the end a span covers 20% of die width of a pixel, then that span accounts for 20% of the color value for that pixel, and is blended with color value for die other 80% of die pixel width. This provides for horizontal anti- aliasing, but not vertical antialiasing. That is, blending occurs horizontally, but not vertically. If die edge of a polygon is doser to horizontal than vertical, then die edge has a good chance of crossing through multiple pixel areas, meaning that die polygon color should be blended into multiple pixels. However, when a single line segment is used to represent die span, die polygon's color is blended into one pixel (the one that includes die segment span endpoint), and pixels on either aide are assumed to be cov- ered 100%, and are not blended (assuming visible span portions are wider than one pixel). Lack of vertical antialiasing is accept¬ able for some applications, but high quality images should be both antialiased in both directions. One method of adding vertical antialiasing is to divide each raster line vertically into several "sub-raster" lines. Then, the Segment Span Rasterization Method 2100 can be used for each sub-raster, and pixel color values can be generated by blend¬ ing vertically as well as horizontally. Figure 37 A shows a raster line 3702 and its pixels 3704, two edges of a polygon 3706 and 3708, and two sub-raster spans 3710 and 3712 for mat polygon. Similarly, Figure 37B shows four sub-raster spans 3714, 3716, 3728, and 3720 for the polygon. As a possible variation, if a pixd is covered by only two such sub-raster spans from the same polygon, it would be possible to compute one color value at die center of the pixel Using sub-raster lines reduces vertical aliasing, but does not eliminate it For many applications, this is an acceptable approximation. Trapezoidal Span Rasterization Method Spans can be represented by two-dimensional trapezoids rather than one-dimensional line segments. Bom line seg¬ ments and planar trapezoids are in three-dimensional object-precision eye coordinates. The advantage of a trapezoidal represen¬ tation is the preservation of edge information within a raster line, thereby providing correct antialiasing in bom die horizontal and vertical dimensions. Figure 38 shows a triangle mesh with two triangles 3802, and 3804, and one raster line 3806 within the display screen 104. The area within the raster line 3806 for each triangle 3802, and 3804 is a trapezoi ally shaped span, labelled SJI 3808 and S l2 3810. For trapezoidal spans, the span endpoint is an edge of die trapezoid, and is described by two points in three-dimensional screen coordinates: one at die top edge of die raster line, and one at the bottom edge of die raster line. Hence, a trapezoidal span is described by four points in screen coordinates. For example, die trapezoidal span on the left3808 in die fig- ure has endpoints described inx-z space by: 1) the top of the left endpoint located at ( m . z 11LT ); 2) the bottom of the left end¬ point located at (XULB- 2 HLBX 3) the top of the right endpoint located at (XHKB ZΠ TX * Dα 4) die bottom of the right endpoint located at ( H B, ZIJKB)- These four points are actually inx-y-z space, but the y-coordinate is dictated by the location of either the top or the bottom of the raster line 3806. Note that the subscripts in the coordinate variables indicate three things: 1) the span number (e.g., "11"); 2) the left or right endpoint (Le, "L" or "R"X and 3) the top or bottom of die raster line (ix, "T" or "B"). An opaque trapezoidal span occludes more distant geometry over most of its length, but at endpoint 3812, and 3814 that are not abutted to another trapezoidal span, more distant geometry is partially visible. However, for abutting trapezoidal spans, as shown in Figure 38, the common endpoint 3816 does occlude more distant geometry. This presents a problem when utilizing trapezoidal spans. That is, non-abutting trapezoidal span endpoints do not occlude more distant geometry, but abutting endpoints work together to occlude 3818 more distant geometry. The invention of this document successfully solves this prob- lem by searching for abutting spans. Figure 39 shows a group of trapezoidal spans in the same raster line, and these spans are trapezoidal versions of the segment spans shown in Figure 11. In Figure 39, die visible portions of the spans are shaded. Notice that for spans in a polygon mesh (ix. abutting spans span tops lay end-to-end with each other, and span bottoms do likewise. Span endpoints cast an edge "shadow" onto spans mat are farther from the viewing point For example, die left endpoint3902 of S 2 casts such a shadow 3904 onto S x . An additional concern when using trapezoidal spans occurs when a polygon crosses either die top or the bottom of the raster line, but not both. This would generally happen at 1) the comer of a polygon 2) at a horizontal edge of a polygon; or 3) when occluding spans leave only a stiver of a span visible One example of tiύs is shown in Figure 39, where die far right end 3906 of S 0 is visible. In this type of situation, die trapezoidal span is actually shaped tike a triangle, and therefore could be considered a "degenerate trapezoid" where the top or bottom is of length zero. This document has explained in great detail die Segment Span Rasterization Method 2100, and die Trapezoidal Span Rasterization Method is similar in that it follows die frontmost spans from left to right and sending die visible portions of spans to the Rasterization Processor 512. The key difference is that non-abutting Midpoints of trapezoidal spans do not fully occlude more distant geometry. The Trapezoidal Span Rasterization Method must correctly handle tiiese types of spans. There is a variety of ways to handle trapezoidally shaped spans. Rather than having a method flow diagram for each of the four choices for the Trapezoidal Span Rasterization Method presented here, die features of each choice will be explained, along with the corresponding choices for SOT Queries. These four particular choices were selected to illustrate bow die raster- lzation method presented here can be expanded to process trapezoidally shaped spans. Version 1: Occlusion processing done separately for span tops and span bottoms A trapezoidal span can be described as the collection of: 1) a span top, the line segment on die boundary of the trape¬ zoidal span along the top of the raster line; 2) a span bottom, the line segment along die bottom of the raster line; and 3) die area between the span top and the span bottom. The version of the Trapezoidal Span Rasterization Metiiod described in die section of the document does occluding processing on span tops separately from span bottoms. This can be done because, for the same ras¬ ter line, span tops and span bottoms never occlude each other. Occlusion processing for span tops can be done in die same way occlusion processing is done for segment spans in the Segment Span Rasterization Method2100. Occlusion processing for span bottoms can be done separately in the same way, and should be done in parallel with occlusion processing of span tops in order for pairs of tops and bottoms to be correctly paired for pixel color generation. This version of the Trapezoidal Span Rasterization Method keeps track of the following "span-like" dungs (including appropriate endpoints): 1 ) the Present Span, Sp the trapezoidal span that is currently being tested to see what part of it should be rendered; 2) the Current Span Top, S^ the top edge of the Sp mat is being tested for visibility; 3) die Current Span Bottom, SQB, the bottom edge of the S P that is being tested for visibility; 4) die New Span, S N , die trapezoidal span recently read from the Span Memory 408; 5) the New Span Top S j ^r. the top edge of S N ; 6) the New Span Bottom, Srø, die bottom edge of S N ; 7) the Top Saved Span, Sςγ, a trapezoidal span mat is temporarily saved because S CT intersects S^y, in a situation analogous to Rule 4 described above; and 8) the Bottom Saved Span, S SB , a trapezoidal span that is temporarily saved because S B intersects Srø. Two different saved spans are needed because span tops are processed separately from span bottoms, and they could have inter¬ sections with different spans. Keeping track of more information during rasterization requires more registers to be added to the Span Parameter Registers 3104 within the Query Processor 510. Figure 40 shows an enlarged version of the example spans S t 4001 and S 2 4002 from Figure 39, and, S j 4001 is assumed to be the Present Span, Sp The span top of S t 4001, called S 1T 4003, has its corresponding SOT Region 4004 that finds S 2T 4006 occluding it 4003. This SOT Region 4004 does not find JB 4008 because it 4004 is only searching for span tops. Similarly, the span bottom of S S 1B 4010, has its SOT Region 4012 that finds S 2 4008 occluding it 4010. Figure 41 shows two views of a partial set of spans within a raster line 4 00, labelled S 31 4101 through 394109. The upper diagram is thex-z view (the look direction is paralld to they-axis) of die spans, and die lower diagram is x-y view (the look direction is parallel to the z-axis) of the same spans. In die lower view, hidden portions of die spans are not shown, and therefore represent how an infinite precision rendering of die spans would be drawn for that raster line4100. But since d e dis¬ play device does not have infinite precision, span colors must be blended togetiier in correct proportions for each pixeL In die fig¬ ure, visible portions of span tops and bottoms are shown as thicker lines. Visible portions of span tops and bottoms are passed to the Rasterization Processor 512 were they are used along with polygon edge derivatives to determine pixel colon. The spans in Figure 41 were chosen to illustrate handling of various cases, induding spans where only die span top or span bottom is visible and also spans that do not cover the entire height of die raster line 4100. Just as in the Segment Span Rasterization Method 2100, the spans are processed in a left-to-right manner. The exam- pie of Figure 41 starts in die rniddle (jx, horizontally) of die raster line whcreS 31 4101 isSp S 3lT 4111 is CP ndS 3IB 4121 is S CB . The SOT Queries for S Q T and SQB find nothing, S j j is set to invalid, and by a rendering rute similar to Rule 22300 of the Segment Span Rasterization Method 2100, S 31 101 is rendered to its right endpoint The rendering of S 31 4101 covers 100% of the pixels up to the one mat includes x 31RT 4151. From mat point the edge derivative for the corresponding polygon edge (see Equation 1) is used to determine die percent coverage of each pixel and due percentage weights die pixd color. The span 4101 can be rendered to its right endpoint because roe entire length of die endpoint (die endpoint of a trapezoidal span is a line segment) is guaranteed to be visible. Also by die Rule 22300 analog, queries for abutting span tops and span bottoms find 3 2τ 4112 and S 32 B 4122. At this point in the method, S 32 4102 is Sp S 3Zr 4112 is Sa «nd 32B 4122 is QB. The SOT Que¬ ries for S T mad S B find nothing, and abutting spans are also not found. Hence, S N is set to invalid. By a rule similar to Rule 22300, S 32 4102 is rendered in its entirety (its right endpoint is guaranteed visible), and edge derivatives are again used to compute pixel coverage. To sight an example, for die pixels at least partly contained between X 3I R T 4151 and ^RS 4152, roe sum of percent coverage due to S31 4101 and S 32 4102 totals 100%. Queries to find abutting span tops or bottoms fail so all spans completely to the left of X 2 RB 4 52 are invalidated, and both Sp and S N are set to invalid. By a rule similar to Rule 1 2200, a search is done to find die frontmost span tops and bottoms atx 32 R 4153 and X 32RB 4154, which finds S 33 4103 and assigns it to Sp sets SQJ to the part of S 33T 4113 to die left of x 32RT 4154, and sets SQB to the part of S 33B 4123 to the left of x i g 4153. The SOT Queries for S CT and SQB find 3^ 4114 and S 35B 4125 (note these are from different spans) which are assigned to S OT and j φ, respectively. S N is set to S344104, rather than S 3J 4105 because the visible portion of S 34 4104 is farther to die left, and the method proceeds from left to right By a rule similar to Rule 32400, S 33 4103 is rendered, but only partially. At this point die Rasterization Processor 512 can only render it 4103 to ^ T 4155 because its 4103 area to die right of X3 JJ 4155 still needs to have its vis¬ ibility determined (generally the case when SOT and Srø are not from the same span). does not align with a pixel edge, the pixel that includes X 3 RT 4155 is partially colored by the portion of S 33 4103 that is know to cover it (and the rest added later). Alternatively, the entire color contribution to that pixel byS 33 4103 can be postponed until the entire amount of pixel coverage is known. At this point in the method, S3 4104 is Sp S3 7- 4114 is S J and S 3 JB 4125 is Q B ■ The SOT Query for S Q T (Le, S^ j 4114) finds S 3 τ 4115 and makes it S j jp Because this Sfjγ matches S j of die previous step (i.e, they are from the same span, S354105), the SOT Query for S Q B (Le, S 3JB 4125) is postponed to die next step in the method. S N is set to S354105. During the method, when S j rr and Srø are not from die same span, previous spans can only be rendered to the leftmost of either the current x-value position along the top of the raster line and the currentx-value position along die bottom of the raster line. At the leftmost of the two x-values, all span to die left has been considered, and so rendering can be done. By a rule similar to Rule 32400, S344104 is rendered by die Rasterization Processor 512. This time, S OT and SJJB are from the same span, so S^ 4104 is rendered up to die left endpoint of S354105. Also, rendering of S334103 can be com¬ pleted because its visibility has now been determined. At this point in the metixxLS^ 4102 is made Sp S j gγ 4115 is made S CT and 3jB 4125 is made Sc B . The SOT Query forS CT (ix,S 35T 4115) fin^ QB (Le, S 35B 4125) finds nothing, and makes Sjrø invalid. S N is set to S 37 4107. By a rule similar to Rule 32400, S^ 4105 is rendered from its left endpoint to x 33M 4156 because x 3aB 4156 is the leftmost choice between X35RB 4156 and x 37L τ 4157. A search for an abutting span bottom to SQB (ix, S 3 B 4125) finds S 36B 4126. At this point in the method, S^ 4106 is Sp S 37T 4117 is S p ^B 4126 is QB, S 37T 4117 is j ^ and an SOT Query for S Q B (ix, S^ β 41 6) finds S 39B 4129 and makes itSrø. By a rule similar to Rule 32400, S 36 4106 is rendered up to x 37LT 4157 because 37LT 4157 s die leftmost choice between x 37L τ 4157 and x 3SL B 4158. Also, rendering of S 35 4105 can be continued up to x 37LT 4157. Because S 37 4107 is not hidden and is known to have only a span top (no span botto X it 4107 is made Sp Also at this point S37T 411 is still Q I Y S 39B 4129 is SQ , and query to find an abutting span to S 3 4107 finds noting, so S^y is invalid, and S 39B 4129 is still Srø. By a rule similar to Rule 22300, S 37 4107 is rendered in its entirety. Bom S354105 and S^ 4106 can now be ren¬ dered up to x 37RT 4159 (completing S354105) because it is the leftmost choice between x 37RT 4159 and x 39LB 4158. At this point S 3i 4108 is Sp QT is invalid, S 39B 4129 is S Q B, S j rt is invalid, and an SOT Query for ca (Le, S 39B 4129) finds nothing, so rø is invalid. By a rule similar to Rule 12200, a search is done to find the frontmost span top at x 37RT 4159. This search finds S 3gτ 4118, and QT is set to the portion ofS 38T 4118 to dιerightofx 37κr 4159. An SOT Query for cτ findsS 39T 4119 which is assigned to S m . At this point x 4108 is still Sp S XB 4129 is still QB, andSrø i* >till invalid. By a rule similar to Rule 32400, S M 4108 is rendered up to the left endpoint of ^g 4129. Because S 39 4109 is going to be made into the nextSp the other remaining uncompleted span, S x 4106, is completed by rendering it up to the left endpoint of S 39B 4129. Care must be taken to correctly account for all die polygons edge derivatives correctly. The raster line 4100 processing continues withS 39 4109 as Sp but the right edge of our example has been reached. If there had been some completely hidden spans within the left and right boundaries of mis example, tiiey would have been com¬ pletely avoided by either never being found by an SOT Query or by being discarded by a rendering rule similar to Rule 52600. Similarly, if there had been an intersection between two span tops or two span bottoms, a rule similar to Rule 42500 would have been applied, and Saved Spans would have been used. A special case may be added for handling spans that either do not have either a span top or a span bottom (they are less than one pixel in height) or have both their span top and span bottom hidden, but are visible within die raster line (just peeking out from between two nearly horizontal polygon edges). In most practical applications, such marginally visible items can be ignored. It is possible that color information from several different spans are blended together for a particular pixel Under such circumstances (and even for blending only two span's colors), only a reasonable approximation of die percent coverage is needed to make a high quality image. When implemented in hardware, this version of die Trapezoidal Span Rasterization Method uses one SMCCAM Word 900 for each span top and another one for each span bottom. Both the span tops and span bottoms could be stored into the same page within the Span Memory 408. This would mean time-sharing die Span Memory 408 between two essentially inde¬ pendent occlusion processes, thereby reducing performance when compared to storing span tops and span bottoms into d fferent pages. Using one page for occlusion implies die Span Memory 408 needs a total of two pages, as shown in Figure 38, to double buffer the spans. If two pages within the Span Memory 408 are used, die two occlusion processes can be done in parallel However, some fields, such as the Span Derivative Field 812 and the Information Pointer Held 812, need to be duplicated because they are needed by both occluding processes. Also, using two pages for ocduάon processing tends to imply a total of four pages are needed in the Span Memory 408. But if a non-interlaced display device is used, tiien die set of span bottoms for die current ras¬ ter line is the same as the set of span tops for the next raster line. Hence, three total pages are needed in die Span Memory408 because one page is used for writing, and two pages are used for reading, and one of those two pages is reused for the next raster line. If an interlaced display device is used, then the same technique can be used, but raster line rendering order will not match the display device. Another alternative is saving the list of the visible bottom span portions (ix, after occlusion processing) in another memory and then using them as die span tops in die next raster line. Such a memory could be included in the Rasterization Processor 512. While this is certainly possible, it is probably more economical to recompute die visible top spans. Version 2: Perform an SOT Query at every transition in the raster line In this version of the Trapezoidal Span Rasterization Method, spans are processed from left to right but occlusion pro¬ cessing treats each span as a unit not as a separate span top and a span bottom. To do this, SOT Regions are bounded on die right and left by a visibility transition on either span tops or span bottoms. Figure 42 shows an enlarged version of die example spans S j 4201 and S 2 4202 from Figure 39. At die start of this example, S t 4201 is the Present Span, Sp and J B 4204 is die current x-coordinate, XQL- Hence, die raster line has been ren¬ dered up to XJLB 4204, including die part of j 4201 4204. The Current Span, SQ, is the part of S P (ix, S 4201 ) to the right of Q L (Le, I B 4204) that has die same visibility characteristic, namely die part betweenxm 4204 and x 1RT 4206 (making x 1RT 4206 the value for X Q R). The visibility characteristic for j 4201 changes at tø T 4206 because to the right the span 4201 does not occlude more distant geometry, while to the left of that point 4206, it does. The SOT Region 4208 for this S Q is shown in Figure 42 and described by Equation 123. There are two erent z -va ues used n t s query, QPT "n Z β, ecause t e span port on e ng teste or oc us on as er¬ ent depth values for its top and bottom. The value for Z Q PJ is set to the maximum z-value of die span top within die x-coordinate interval of S c , which happens to be x-coordinate with die value xyj 4204, labelled z«-- τ t 4209. The value z % afl 4209 is com¬ puted using the span derivative for S t 4201. Similarly, die value for Z B is set to die maximum z-value of the span bottom within the x-coordinate interval of SQ, and this value is z 4210. The SOT Query finds S 2 4202, and it 4202 is made S N . By a rule similar to Rule 3 2400 of the Segment Span Rasterization Method 2100, Sp (ix, j 4201 ) is rendered from (ix, X 1L B 4204) to the leftmost point of S N (Le, S 2 4202), which is ?m 4204. Over this interval, die visibility characteris- tic does not change for the raster line. That is, S l 4201 is die only geometry that is visible within die interval. The value ofx Q L is changed to X2 B 4211, and S c is the top edge of j 4201 from TT W 4211 to x 2LT 4212 combined with the bottom edge of S 2 4202 over the same interval The valid for jr is set to invalid. For this S Q , the visibility characteristic is consistent in that it includes S t 4201 gradually being covered by S 2 4202 over its entire width. The corresponding Query Region 4213 is over the interval of S c in the x-coordinate dimension. But in the z-coordinate dimension, span top coordinates are tested to see if they are in front otz tαBf2 4214 and span bottom coordinates are tested to see if they are in front of Z2LT 4216. The coordinate z tonp2 4214 is the z-coordinate of the span top of S t 4201 at x-coordinate XJLB 4204. This Query Region 4213 needs to include a search for span tops that are between z teap2 4214 and jjj 4216 because a span with its left top corner in this range would be visible. The query operation is shown as Equation 124. (EQ 124) In this example, the Query Region 4213 finds nothing, so SJJ remains invalid. By a rale similar to Rule 22300, SQ is not hidden, so is rendered, resulting in a blending of S j 4201 and S 2 4202 over the entire width of SQ. The rule men "checks for" die equivalent of an abutting span, and this is known to exist because S 2 4202 continues to the 4218, and XQ is set to JLT 4212. Once again (as always for this version of die metttod), S c has a consistent visibility characteristic over its entire width. The SOT Region 4220 for this S c is shown in Figure 42 and described by Equation 125. The value z tαnp3 4222 is the z-value of the span bottom of S 2 4202 at the x-coordinate X jjj 4212. (EQ 125) The rasterization of the spans in this raster line would continue from this point This version of the method also has rules analogous to Rule 12200, Rule 42500, and Rule 5 2600. In general, this version of the method takes spans, and subdivides diem horizontally in order to create sections that have a consistent visibility characteristic. This means mat die endpoint regions of a span (die part that does not occlude distant geometry, such as the endpoints 3812 end 3814 in Figure 38) are treated separately from die central portion of the span. This causes more query operations to be needed, but can be done in a single occlusion process. This version of the Trapezoidal Span Rasterization Method requires more fields per SMCCAM WαrdOOO because there are four fields per endpoint rather than just two. Additional comparison logic is also needed in die Word Number Field802 because it 802 must be able to check inequality with a Current Span that is the combination of two trapezoidal spans. In the above example, the value of S corresponding to the Query Region 4213 covering x-gjt 4210 to x?ι T 4212 is die combination of j 4201 and S 2 4202. Hence, the SOT Query must check for both (n ≠ 1) and (n ≠ 2), thereby requiring two inequality com- parisons during that query operation. This venion of die method has die advantage of needing only one wordθOO to store a span. Version 3: More comparisons per word to allow more complex SOT Regions In this version of the Trapezoidal Span Rasterization Metiiod, occlusion processing treats each span as a unit just as in Venion 2. However, this venion performs more comparison operations in each SMCCAM WordOOO, thereby providing the ability to make more complicated SOT Regions. Radier than splitting spans at every visibility transition, die Current Span, SC, can contain one visibility transition. In essence, an SOT Region for this venion is die union of two SOT Regions as defined in Version 2. Figure 43 shows roe same two spans 4301 and 4302 as shown in Figure 42, and an SOT Region 4304 mat is the union of two SOT Regions 4213 and 4220 from Venion 2 of the method. To perform this SOT Query, the query operation is the disjunction (i.e, logical "or") of the right sides of Equation 124 and Equation 125. To perform the more complicated query function to generate die SOT Region 4304, the fields in each SMCCAM Word 900 each need to perform two comparison operations in parallel (if the two operations are done sequentially, then it is the same as Version 2). This makes the hardware more complicated, but will reduce the time to perform occlusion processing by about a factor of two. Version 4: Use a looser approximation of the Ocduding Region Another choice to reduce the occlusion processing time is to use a looser approximation of die Occluding Region. For example, the "L-shaped" SOT Region 4304 in Figure 43 (which is a good approximation) can be made into a simple rectangular region by increasing its area. Figure 44 shows die same two spans 4401 and 4402 as shown in Figure 43, and an SOT Region 4404 that is larger and simpler than die SOT Region 4304 from Venion 3 of the method. The SOT Query that generates this SOT Region 4404 is die combination of Equation 124 and Equation 125 such tiiat die looser constraint is used for each field. The query operation is: (EQ 126) F nQ = F nV Λ F Λ Q ( n ≠ S C- Λ I < *»LT < ≠CR> V < X ΛΛ < *CR> I A U x ΛΥ <X cύ V ( Λl W < x C ^ Λ 1 I < Z «LT < *CFT) v < Z «LB Z CFB> I v I < Z «RT < 2 CFT> < 2 »RB < Z CFB> 11 F «Q " F «V A /!, « A < ,t l > Λ ( n ≠ 2 A Λ l (* Λ T < a; 2Rτ) v *« B < J; 2 T) 1 Λ I ('-.RT < *2LB> v <*«RB < *2L1») 1 Λ I I ( Z „LT < Z mp2> V < Z «LB < Z 2LB> J V I < Z »RT < z temp2> v < Z ΛB < Z 2LB> J 1 When this looser approximation is used for the SOT Region 4404, more Potentially Occluding Spans (on the average) that are actually hidden will be found, thereby reducing performance. However, this may yield a net gain because the number of query operations is reduced. Transparency The Span Sorting Rendering Architecture 500 can render transparent geometry (colored geometry that can be seen through) by generating its spans in the same way as those for opaque geometry. Translucency can be handled in a similar way, but this document focuses on transparency. To aid in the rasterization process, the transparency of each span is marked in the Span Memory 408 by one of three methods: 1) another flag bit is added to each word 900; 2) a bit in die Information Pointer Field 814; or 3) another field, a Translucency Field, is added to each word 900. The opacity coefficient (Le, the amount of light transmitted by the transparent geometry) is stored in the Polygon Information Memory 514 along with the other color information. There are various ways to handle transparent spans within die rasterization medwd presented m this document As an aid in the following explanations. Figure 45 (a modified version of Figure 11) shows a set of segment spans4500 to 4513 in a raster line where die visible opaque surfaces are shown as duck black lines and the visible portions of die transparent spans 4502, 4505, and 4507 are shown as duck shaded lines. This section of die document uses an example with segment spans, but the transparency methods can be applied to trapezoidal spans and quadrilateral spans. Version 1 : Keeping visibility characteristic consistent over the Current Span This version of the method keeps the visibility characteristic of die Current Span.Sc, consistent by making S smaller, if necessary, when a transparent span occludes it The method follows die frontmost opaque spans, and adds in the effect of trans¬ parent spans if they are found to occlude S Q . For example, in Figure 45, when the SOT Query for Sj 4501 finds die transparent span S 2 4502, S Q is changed to the part of j 4501 between x 1L 4524 and JL 4526, and S x 4501 is also kept as the Saved Span, S s , so that its part to the right of X 2L 4524 will be the next S Q . When this part becomes S c (ix, die part of S 1 4501 between XJ 4526 and x^ 4528), its SOT Query also finds S 2 4502, and the combination of Sj 4501 and S 2 4502 is rendered. The combination of S 3 4503 and S 2 4502 is processed in a similar way. When S 4 4504 is reached, it is first processed as its part located between x L 4530 and JL 4532 and includes die effect of S 2 4502. Then, when S c is die portion of S 4 4504 to the right of XJL 4532, the SOT Query finds both S s 4505 and 5 6 4506. At this point the method and apparatus can be designed to either 1) read the leftmost opaque ocduding span; 2) read the leftmost transparent occluding span; or 3) read the leftmost span or ether type. The first of heae choices is assumed here. Hence, by a rendering rule similar to Rule 32400, S c is reduced to die portion of S 4 4504 between XJ 4532 and g , 4534. But before S c is rendered, transparent spans in the SOT Region are read, thus obtaining Sj 4505. Because S 5 4505 coven all of S Q (i.e, S 4 4504 between x^ 4532 and ^.4534), S Q is not further divided, and is rendered as die combination of S 4 4504 and ; 4505 over the interval from JL 4532 to x^ 4534. Within the same rendering rule, S 6 4506 is made Sp and all of it 4506 is designated as S Q . The span Sg 4506 is processed similarly to S 4 4504 in mat its first portion, from Q, 4534 to X L 4536, is combined with the transparent span j 4505. Its second portion, from 7 4535 to Xgι.4536, is combined wim the transparent span 5 7 4507. And, its third portion, to the right of x^ 4536, is hidden, and then S 7 4507 becomes Sp From Xg 4536 to the right the spans are processed be described in previous section because there are no more transparent spans. Version 2: Dividing the raster line into pieces where depth visibility changes This venion of the method follows, in left-to-right order, the frontmost spans whether they are opaque or transparent When opaque spans are rendered from left to right up to thex-coordinate where a visible transparent span starts, rendering of the opaque spans is temporarily suspended (in essence, that rendering process is pushed onto a stack), and rendering shifts to the transparent span. Then frontmost transparent spans are rendered from left to right until either: 1) die transparent spans end at an x-coordinate where either only opaque spans or no spans exist; or 2) the frontmost transparent span is occluded by an opaque span. At mat point rendering returns to the rendering of opaque spans that were temporarily suspended (die rendering process stack is popped). As transparent spans are rendered, they are deleted from the Span Memory 408 in order to keep diem from being re-rendered later in the method. Because a transparent span can transition from visible to hidden and then become visible again as the method renders farther to the right the visible part that is already rendered needs to be deleted to keep it from being re-rendered. This can be done by overwriting the transparent span in the Span Memory 408 and changing its left endpoint. Thus, when a transparent span is rendered, if it is rendered to its right endpoint it is deleted completely. When a transparent span is partially rendered, only the rendered part is deleted. In portions of the raster line that have one visible transparent span, the stack-oriented approach renden die transparent spans first then the opaque spans. In portions of the raster line that have two visible transparent spans (one in front of the otherX the stack-oriented approach renden the frontmost transparent spans first men die second from the front transparent spans, and finally the opaque spans. As long as the rendering process stack does not overflow, this method can render any depth of visible transparent spans. The raster line can be ώought of as being divided into pieces at x-coordinate locations where the visibility depth changes (e.g., from one to two, from two to titree, from two to one, etc.). Within these pieces, visible spans are rendered in a front-to-back order. Having the rendering done in front-to-back order allows pixel color values to be correctiy blended. This is in contrast to prior art methods (such as me Z-buffer technique) that renden geometry in random order. Using the spans shown in Figure 45 as an example, this version of the method renden die visible portions ofS 0 4500 and S, 4501 up to 2L 4526. At that point in the method, SQ is the portion of Sj 4501 between JL 4526 andx^ 4528, and it is pushed onto the rendering process stack. Next the transparent spans S 2 4502, S $ 4505, and S 7 4507 are rendered from 2L 4526 to x 8L 4536. As these spans are rendered, S 2 4502 is deleted, S 5 4505 is deleted, and part of S 7 4507 is deleted by changing its left endpoint to (x^, Ztαn i) 4540. Next the rendering process stack is popped, andS c is restored to die portion of i 4501 between x^ 4526 and 4528. There, rendering of opaque spans resumes, and die visible portions of spansS j 4501 , S 3 4503, S 4 4504, and S 6 4506 are rendered from x^ 4526 to &.4536. The next S is set to all of Sg 4508, and die balance of the opaque spans are rendered. The remaining piece of S 6 4506 is hidden, so the metiiod avoids reading it 4506 from the Span Memory 408. Version 3: Perform multiple passes In this version of the method, a multiple pass strategy is used. In the first pass, all die opaque geometry is rendered with the previously described method of this document At die end of rendering die opaque spans, all the Valid Flags816 for the opaque spans have been turned off. Then, in the second pass that renden die transparent spans, the Valid Flags816 for all the opaque spans are turned on, and each transparent span is then sequentially tested to determine if it is occluded by an opaque span, and then its visible portions are rendered. As a possible option, as an opaque span is rendered, a query is done to find all transparent spans mat are completely behind the opaque span and de-assert roe Valid Flags 816 of such transparent spans. This reduces die number of transparent spans that are processed and are hidden, but increases the processing required by each opaque span by adding another query. To reduce this overhead, the query that invalidates transparent spans can be done once after every set of abutting opaque spans. Hence, when the rendering of a set of abutting spans ends, die maximum z-value of any of die visible portions of spans in the set is used as the minimum z-value in the query to find hidden transparent spans. This option is assumed in the example described in the next paragraph. This option may consider a single span as a one-span set for use as occluding transparent spans. Using the spans shown in Figure 45 as an example, in the first pass of this version of the method renden the visible portions of S 0 4500, } 4501 , S 3 4503, and S 4504. At this point in the method, rendering of a set of abutting spans has ended, and transparent spans hidden by the set are invalidated by a query that finds transparent spans completely within thex-coordinate range of XJL 4524 to X Q, 4534 and having the z-value of both its endpoints greater than z tβnp 4542. Next the visible part of S 6 4506 is rendered. Then, the abutting span set of Sg 4508 and S 10 4510 is rendered, and a query is done to invalidate the trans¬ parent spans behind the set Likewise, when S n 4511 and S i2 4512 are rendered, die same sort of query is done. The other opaque spans in the raster line are processed normally. At the beginning of the second pass, all die Valid Flags816 of the opaque spans are asserted, and then the transparent spans are sequentially processed in a left-to-right order. In d e example, S 4502 is read from the Span Memory 408, an SOT Query is done for it 4502 which finds no occluding spans, and it is therefore rendered. The span S 6 4506 is processed similarly. For S 7 4507, its SOT Query finds S g 4508, so S 7 4507 is only rendered up to x 8 L 4536. Since no other transparent spans are left this raster line has been completed. An optional change to this venion of the method is to store die transparent spans in a memory separate from the Span Memory 408. Then, in the second pass, each transparent span is read from tiiis separate memory, has an SOT Query done for it and has its visible parts rendered. Additional considerations for transparencies Polygon coloration is frequently described by texture maps. Some texture maps are defined to have some pixels be 100% transparent (perfectly clear). A typical example use of such a texture map is an image of a tree mapped onto a rectangular "billboard-type" polygon (billboard polygons automatically rotate to face die viewing point), where the comen of die rectangle are clear, and holes within the tree's image can occur. Polygons wim such texture maps need to have their spans processed as transparent spans. This is because they do not completely occlude all die geometry behind diem. Hence, when a polygon uses a texture map with transparent pixels, spans in that polygon are assumed to be transparent and die texture map dictates die opacity coefficient for each of its pixels. When trapezoidal spans (or quadrilateral spans) are used, spans that include comen and edges of polygons that have either a span top or span bottom but not both, can be processed as transparent spans. This can be done because spans of this type do not completely occlude more distant spans, just as transparent spans do. Hence, this section of die document on transparency can be used to process spans that only partially cover die vertical height of die raster line. Spans Represented by Quadrilaterals Representing spans with trapezoids has die disadvantage of requiring die location of four points inx-z plane (not pre- cisely a plane, it has the thickness of one raster lineX which, in turn, requires lots of bits of memory. This is especially true if the z-values are 32-bits each. In order to reduce die memory requirements, the endpoint location of a span can be approximated by twox-values and one z-value. In essence, die two points mat describe the endpoint have the same z-coordinate, but have different x-coordinates. Therefore, the number of fields for storing coordinates is reduced from eight to six. This introduces a small amount of error in the antialiasing methods described above, but roe error is only significant for polygons that are nearly parallel to thex-z plane. For these polygons, the look direction is very close to being a tangent to die plane of the polygon. However, for most applica¬ tions, this errors is acceptable because the projection of these polygons onto the viewing plane 102 has not changed. Figure 46 shows the trapezoidal spans S j 4601, S 3 4603, and S 4 4604 as dashed lines, and shows the quadrilateral approximations of these spans, S' j 4611, S' 3 4613, and S' 4 4614 as solid lines. In this figure, endpoints for die quadrilateral spans are always a horizontal line segment Figure 47 is similar to Figure 39, except mat all the trapezoidal spans have been replaced by their trapezoidal approximation. Note mat some of the trapezoidal spans appear to fold over themselves. Trapezoidal spans can be processed by similar methods to those described in this document for trapezoidal spans. Preservation of Rendering Order For some applications, the order of rendering must be preserved. A typical example is the "painter's algorithm" (see Foley Reference, page 674) as used in computer windowing systems. To render an inner rectangle with a boarder, first the boarder is rendered as a filled rectangle, then the inner rectangle is rendered, over-writing most of the pixels in die boarder rect¬ angle. If the rendering order of these two rectangles is reversed, then the entire area will have roe color of the boarder rectangle because the inner rectangle will be completely over-written. If these two rectangles have a distinct placement due to different z-coordinates, then they will be rendered correctly. However, if no z-coordinate is specified (die default would be die depth of the viewing plane 102), men the order must be preserved. This can be done by having die Bucket Sort Processor 504 and die Cur¬ rent Polygon Processor 506 maintain the order in which they are received from die Polygon Processor 502. The Query Proces¬ sor would maintain the rendering order by placing spans for later input polygons into later positions in the span list Then, as rendering proceeds, rendering order is preserved because, in die case of ties in z-coordinate, spans earlier in die list will be ren- dered first and later geometry with the same z-coordinate will be assumed to be hidden. Method and Apparatus Options and Possible Enhancements Add to single buffered VGA graphics card The video output for computers (for example, VGA and SVGA interfaces on IBM compatibles) generally includes a frame buffer memory that stores the pixel information sent to the display device (Le, die CRTX The 3D graphics rendering meth- ods and/or apparatus described here can be added to such a display system. The CPU (or DMA controller) writes geometry into the renderer, and it gets processed and stored into die Bucket Sort Memory (which may need to be double buffered). When the geometry is done being written, the rest of the pipeline synchronizes to the computer display, and generates spans before they are needed, overwriting the previous frames's data in die computer's frame buffer. Hence, a low cost but high performance, 3D graphics accelerator can be added to a computer without adding more memory to die frame buffer. Turn off antialiasing on specific polygon edges The antialiasing method described above assumes that every polygon has independent color values; and when abutting spans are found, the pixels that include both of the spans need to have their colon be a blend from die two polygons. However, polygons that share an edge often have exactly die same color information along die edge. For example, this occurs for Gouraud shaded polygons that have me same color and surface normal information at bom ends of die same polygon edge. For these types of edges, the pixel blending can be ignored because two identical colon will be blended together. Such polygon edges can be tagged as "skip antialiasing" when they are supplied to die renderer. Then, if such edges are found to be part of an abutting span pair, the pixel color value for one of mem (say, die one on the right) is skipped, tiiereby saving computation. Edges mat are tagged but are not part of an abutting span pair are processed by die antialiasing methods described above. Prior art renderers can not take advantage of this saving because tiiey do not search for abutting spans or polygons. That is, prior art renderen generally assume every polygon is independent from all other polygons. If tagging is not done (due possibly to constraints imposed by the interfacing softwareX the Span Sorting Rendering Pipeline 400 can automatically generate such tags for edges within polygon meshes and strips where an edge shared between two polygons has die same color information for both polygons. Store edge pairs rather Aon polygons in Bucket Sort Memory 404 Rather than store polygons in die Bucket Sort Memory 404, polygon edge pain can be stored. This means polygons are horizontally sliced so that each horizontal strip of a polygon does not contain any polygon comen. Hence, polygons are hor¬ izontally sliced at die y-coordinate (or nearby raster line boundary) of comen that are at neither STAKT oτ ΛSND- This polygon slicing makes downstream processing easier by eliminating the need to test for when to change to a new edge at the comer of a polygon. Eliminate Current Polygons Memory 406 and read from Bucket Sort Memory 404 By adding more "smarts" to the Bucket Sort Processor 504, the Current Polygon Memory 406 and die Current Poly¬ gon Processor 506 can be eliminated. This means polygons within die current raster line are fed, at high speed, directly from the Bucket Sort Processor 504 to the Span Generation Processor 508. This has the disadvantage of accessing the Bucket Sort Memory 404 at a much higher rate, thus probably requiring die Bucket Sort Memory 404 to be fast memory, rather than slow memory. Another disadvantage is die need for a more complex data structure within the Bucket Sort Memory 404, radier than a simple linked list One possible way to do this is to sort poly¬ gons within each "bucket" according to its VE D parameter in reverse order. Then, at each raster line, every "bucket" is read until a polygon is reached that has its VEND parameter greater than the y-coordinate of the current raster line, thereby indicating mat this polygon and those after it in the same bucket are not in die current raster line. A decision to use this alternative must be based on an engineering decision between a large fast memory versus a large slow memory coupled with a small fast memory. Also, die processing time required to doubly sort (Le, into buckets and then also within buckets) the Bucket Sort Memory 404 must be considered. Front and rear clipping planes By adding clipping planes, the view volume (shaped as an infinite pyramid) is changed into a frustum. Right before spans are written into the Span Memory 408, the z-value of their endpoints are compared to the -location of die front and rear clipping planes. If both endpoints are nearer then roe front clipping plane or farther than the rear cupping plane, then die span is discarded. If one endpoint is farther than the rear clipping plane, then that end of die span is shortened so that its endpoint is on the rear clipping plane. If one endpoint is nearer than the front clipping plane, then that end of die span is shortened so that its endpoint is on the front clipping plane. This requires a set of comparaton to be added to die eidier the Span Generation Processor 508 or the Query Processor 510. Multiple arbitrary clipping planes An arbitrary clipping plane could be done die same way as simple front and rear ctipping planes, except, right before a span in written into Span Memory 408, Span Interaction Parameters between the span and the span of clipping plane are gener- ated, and these are used, as described above, to determine die Span Interaction Type (SIT). The span is tiwn kept, clipped, or dis¬ carded depending on the SIT. This could also be done by adding dummy spans into the Span Memory 408 tiiat represent the location of an arbitrary clipping plane. Then the rasterization methods described above could be altered to make sure all rendered spans are behind these dummy spans. Geometry Cache A memory at die input to the pipeline could be added to store geometry as it is input for rendering. Then, when subse¬ quent scenes are rendered, this stored (or "cached") geometry can be re-rendered (wim possibly changed translation matrices), thereby saving cycles on the system bus. This could solve a bottleneck caused by having a renderer mat can process more geom- etry per second than die host computer bus can support It can only be applied to geometry tiiat has not changed shape since its previous rendering. "Squishy" objects would generally need to be supplied to die renderer for every scene. Use only one page of Span Memory 408 It is possible to use only one page of Span Memory 408. This is done by shifting valid spans toward upper words, leaving lower words invalid. Then, as new spans are generated, store diem into die lower words. This strategy can be thought of as a single bank of memory that is separated into two pages by a moving boundary. This can be done because, as a raster line is processed, spans are deleted, while the simultaneous process of preparing for die next raster line generates spans. As an alternate approach, die fixed Word Number Field 802 can be changed to a variable Tag Fidd. Unique (and ran¬ dom will do) tags for each span are written into the Tag Field, and designate if: 1) a span is in the current raster line or the next raster line; and 2) be a unique identifier for the span. Furthermore, die Tags can be included in die query process such that spans from the current raster line can be intermixed wim those in die next raster line. As long as spans in die same raster line are kept in order with respect to each other, then spans from an unrelated raster line can be intermixed as long as they are ignored. This could be done by maintaining two sets of Valid Flags 816, one for each raster line. Spans from more raster lines could be simul¬ taneously maintained by adding more sets of Valid Flags 816. Separate Read and Write Busses in the Span Memory Page The circuit for the SMCCAM Cell 3400 or 3500 can be modified to have both an input bus and an output bus. This allows simultaneous read and write operations. The is specially useful if there is only one page of Span Memory408 as described in the previous section. Computing SIP and SIT only when bounding boxes overlap Rather than computing the SIT for every New Span, S N , compute it sequentially with less hardware only when bound¬ ing boxes overlap. This sacrifices time in order to save circuitry. Split raster line into smaller pieces to save on SMCCAM memory The total number of words in the Span Memory Page 800 imposes a limit on die number of spans that can be pro¬ cessed for a given raster tine. This limitation can be overcome by conditionally splitting die raster line in half (or more pieces if necessaryX and passing through the span data twice. This decision can be done on the fly as a scene is rendered or by an a priori decision before rendering starts. Have an overflow RAM to save spans that are shifted out during sort operations Rather than splitting die raster line in to pieces, die Span Memory Page 800 can be augmented with an "overflow RAM" that stores spans as they are shifted out of the last SMCCAM Word 900. Shifted out spans would start at far right of ras- ter line, so the left side of roe raster line could be processed normally until Q, gets to left of leftmost shifted out span. Then, shifted out spans could be re-written into the Span Memory Page 800 because may spans have been deleted (Le, invalidated) by die rasterizing process. Inclusion rendering primitives other than polygons Geometry primitives other man polygons (such as CSG primitives) can be processed by the Span Sorting Rendering Pipeline 400. This can be done as long as roe ysTART and VEND parameters can be computed (so the primitive can be stored into the Bucket Sort Memory) and spans with bounding boxes can be generated. The comen of die bounding box are used as the Span Parameters, and SOT Queries can be used to find die visible portions of die bounding boxes. Another set of Span Interac¬ tion Types would be needed for the specific set of geometry primitives. Low cost version can use CPU for front end The host CPU, or a dedicated general-purpose processor, could perform the tasks of the Polygon Processor502, thus feeding geometry in screen coordinates (in object-precision) to die rest of die pipeline. Similarly, such a CPU could perform more of the front end of the pipeline 400. For example, a CPU and its general purpose memory could perform die tasks of die Polygon Processor 502, roe Bucket Sort Processor 504, and die Bucket Sort Memory 404, and feeding polygons that start on the present raster line to die rest of the pipeline. Alternate sorting mechanism could use up-counting tag The Word Number Field 802 could be replaced with a conditional up-counter, in order for shifting to be eliminated from the SMCCAM. When a new span is being written to die SMCCAM, a query determines which spans should be later in the sorted list than the new span. Such "later" spans have their up-counter incremented, and no shifting is performed. The up-counter for the new span would be assigned the lowest counter number in die list of "later" spans before die up-count takes place. This approach means the "get the first span in die sorted list" becomes "find die smallest counter value" in the Span Memory 408. Hence, the sorting (ix, shifting) is replaced with a new search type. For tiύs to be fast, die hardware would need to have a "find die smallest" function associated with the set of up-counters. Also, tiiis "find die smallest" could be performed in bit-serial method. Using a generic CAM Generic, prior art CAMs could be used, but magnitude comparisons would be bit sequential. This would greatly slow the processing, but may afford some cost savings in die hardware. This alternative would probably use the up-counting tag, as described in the previous section. Using multiple registers per arithmetic comparator The above description of the SMCCAM assumes a one-to-one match between memory register and arithmetic compar¬ ators. An alternate approach is to have all die memory registers in die same word share a single arithmetic comparator. This saves on circuitry, but slows the processing. However, since not all fields participate in every query operation, die performance loss is not proportional to the total number of fields. Other alternate approaches could share comparaton between words, or between words and fields. These approaches further reduce the amount of hardware, but further reduce roe performance. If any of these shared comparator approaches are used, then a standard six-transistor RAM cell should be used because it provides the greatest density. Hence, die searching and sorting hardware could be made from a set of multiple-word memories, where each such memory has one or more comparators associated with it Using a RAM-based sorting processor An alternative to using a CAM of any type can be done by having a fast linked list sorting processor. By utilizing fast memory, spans could be sorted into a linear list in the same order as described above (using an SMCCAM). But *mce spans are added and deleted frequently, this approach might be very slow. The advantage is the ability to use fast off-the-shelf RAMs that are readily available. To aid in SOT Query operations, a two-dimensional data structure could be used mat sorts die spans in both thex and z dimensions at the same time. Such a searching and sorting structure is described on pages 24 to 55 of "Data Structures and Algo¬ rithms 3: Multi-dimensional Searching and Computational Geometry", by Kurt Mehlhom, a volume in the EATCS series on Monographs on Theoretical Computer Science, edited by Brauer, W, et aLJSBN 0-387-13642-8, published by Springer-Verlag, New York, 1985. Shadow processing Because shadow computations are essentially die same as hidden surface removal, the Span Sorting Renderer500 can be used for shadow computation. This can be done by utilizing multiple Span Sorting Renderen500 in parallel, or it can be done by time-sharing one Span Sorting Renderer 500.

Claims: What is Claimed is: 1. A sorting magnitude comparison content addressable memory (SMCCAM) comprising: a plurality of words of memory storage, each said word having a plurality of fields for storing a polygon's span parameters; query means for performing a query operation between at least two different polygon spans based on comparisons of said stored span parameters between said at least two different polygon spans to determine which of said spans is visible and which of said spans is occluded. 2. The SMCCAM in Claim 1 , wherein said query means further comprises Span Occluding Test (SOT) means for performing a Span Occluding Test to determine which of said spans is visible and which of said spans is occluded. 3. The SMCCAM in Claim 2, wherein said Span Occluding Test (SOT) query means comprises: means for generating a span occulting test (SOT) region based on span parameters for a Current Span Portion (SC) having current span endpoints (x CL , z^J and (x^, z^) being tested to determine if it is occluded; means for identifying a selected span as an occluding span if said selected span having endpoints (x^, z^ and (x^, Z-i) ti es within said Span Occulting Test Region according to the relationship: Selected Span is within SOT Region if { (x^ < X CR ) Λ 4. The SMCCAM in Claim 3, wherein said operation of computing Zc F = Maximum Of (z^, z^ is performed external to said SMCCAM and said SMCCAM further comprises: input bus means for receiving values of ,^, ^, and Z j - p , into said SMCCAM so that said x^, X j -g, and z^ values are compared to said selected span endpoints to identify said selected span as an occulting span; said SMCCAM testing all of said polygon spans simultaneously and in parallel; said SOT query result being stored in a field of said SMCCAM word. 5. The SMCCAM in Claim 4, further comprising: means for preventing words storing invalid data from being identified as occluding spans; and means for preventing a current span from being identified as an occulting span for said current span. 6. The SMCCAM in Claim 4, wherein each said span is modeled by geometric properties of said span including: coordinates of the left endpoint of the span, and coordinates of the right endpoint of the span. 7. The SMCCAM in Claim 6, wherein said spans are represented by trapazoids, and wherein said endpoints of each span are two (x,z) points, one for the top edge of the current raster line and one for the lower edge of said current raster line. 8. The SMCCAM in Claim 6, wherein said spans are represented by quadrilaterals, and wherein said endpoints of each span are an (x, ; ,x L ,z) triplet including one z-coordinate and an x-coordinate for the upper and lower edges of the current raster line. 9. The SMCCAM in Claim 6, wherein said spans are represented by line-segments, and wherein said endpoints of each span are an (x,z) point within the current raster line. 10. A sorting magnitude comparison content addressable memory (SMCCAM) comprising: a plurality of memory registers, each word comprised of a multiplicity of fields, each said field including: means for storing a number; comparison means for performing an arithmetic comparison between said stored number and another number broadcast to and received by all of said memory registers (words); and means for shifting its stored number contents to the corresponding field in the next word, where said shifting is conditionally based upon the results of said arithmetic comparisons; said memory registers storing a set of spans and said comparison means performing parallel searching and sorting operations to find the visible span portions. 11. The SMCCAM in Claim 10, wherein each said n Λ SMCCAM word includes: seven numeric fields including: a Word Number Field (w) tiiat stores a unique identifying number address for each word; a Left X Field (x^) that stores the x-coordinate of the left endpoint of a span; a Left Z Field z^) that stores the z-coordinate of the left endpoint of a span; a Right X Field (x.,,) that stores the x-coordinate of the right endpoint of a span; a Right Z Field (z nI( ) that stores the z-coordinate of the right endpoint of a span; a Span Derivative Field (d.) that stores the dz/dx slope of the span; and an Information Pointer Field (i.) that stores a pointer into a Polygon Information Memory for color information for the span's polygon; and a plurality of flag fields including: a Valid Flag (F„ v ), a single bit value indicating whether the SMCCAM Word is storing valid data; and a Query Flag (F_ Q ), a single bit value indicating whether the SMCCAM Word responded positively to a query operation; each said flag bit having a corresponding wired-nor bus that indicates whether all words have said flag bit turned off, such that for the Valid Flag (F„ v ), if FnV is false for all words (n), then a signal AUWordsInvalid is asserted, and if FnQ is false for all words (n), then a signal NullQueryResponse is asserted; said two wired-nor signals, AUWordsInvalid and NullQueryResponse, providing means for feeding back query results to an external controller in a Query Processor, so that said query Processor can make decisions, including branch decisions. 12. The SMCCAM in Claim 11 , wherein each of said numeric field w, x^, z^, x.,, z_ j ,, d„, and i_ have a corresponding data bus BusW, BusXL, BusZL, BusXR, BusZR, BusD, and BusI for communicating a value to each of said numeric fields; said numeric field w, x^, z^, x.,, z^,, and d„, each comprising a memory portion and a comparator portion; said w field memory portion providing fixed readable memory and said w comparator portion providing an equality comparison circuit used for query operations, that compares the fixed memory value to data received over said input bus, BusW; said numeric field x^, z^, x.-,, z- j ,, d n , and i n field memory portions each providing readable and writable memory and said comparator portions providing an arithmetic magnitude comparison including greater-than, less-than, equal-to, operations and combinations thereof, used for query operations, that compares the stored memory value in said memory portion to the data on the corresponding input bus; said Information Pointer Field, iw, having a readable writable memory portion, said array busses supplying query data to all said words via said Array Busses; means for performing a query operation by all said SMCCAM Words simultaneously and in parallel in response to receipt of said query data; a Query Logic Array comprising a Query Logic circuits associated with each said SMCCAM Word for computing query operation results; said Query Logic receiving the query operation results from said equality and arithmetic comparators and said Valid Flag and said Query Flag values; a query controller generating a QueryCntrl signal for selecting a selected Boolean operation; means for performing said selectable Boolean operation on said query operation results, said Valid Flag values, and said Query Flag values, for every word, to generate a query result bit for every word; means for writing said query result bit back into either said Valid Flag or said Query Flag depending upon a control signal; the set of all Valid Flags for all said SMCCAM words comprising a Valid Flag Word, and the set of all Query Flags for all SMCCAM words comprising a Valid Flag Word; said query results identifying which of said words satisfied the query operation parameters. 13. A query processor apparatus comprising: means receiving each raster line of data; means for receiving spans from the Span Generation Processor; means for determining the visible span portions; means for sending visible span portions of said received spans to an external Rasterize Processor; first Span Memory Page Means for receiving Span Parameters from an external Span Generation Processor; second Span Memory Page Means for query interrogation to determine the visible span portions; multiplexer means (Query Processor crossbar) for swapping data between said span memory page means and said second span memory page means; a register file subdivided into a plurality of registers for storing Span Parameters including: a plurality of registers for storing the Current Portion of a span, SC; a plurality of registers for storing the Present Span, SP; a plurality of registers for storing the New Span, SN; a plurality of registers for storing the Saved Span, SS; and a plurality of temporary registers for storing for storing data including span intersection location data; a Query Processor Controller for determines the sequence of operations in said Query Processor, including the sequence of query operations; SIT Generation Logic means coupled to receive said Current Portion Span Parameter (SC) and said New Span Parameter (SN) and generating a Span Interaction Type (SIT) Result; compare and offset computation means coupled to said span parameter registers and receiving parameters from said registers for computing said SIT Result; and selectably operable Intersection Computation Block means for computing an intersection point between said Current Span (SC) and said New Span (SN), said operation being selected by predetermined rules. 14. A span sorting rendering apparatus comprising: a polygon processor; a bucket sort processor; a bucket sort memory coupled to said bucket sort processor for storing data; a current polygon processor; a current polygon memory coupled to said current polygon; a span generation processor; a query processor; a span memory coupled to said processor; a rasterize processor; and a raster line memory coupled to said rasterizer. 15. In a memory apparatus having a plurality of storage registers for storing data, and a data structure defined within said memory apparatus, a method for testing for span occultation of a current span by a selected different span, said method comprising the steps of: receiving a polygons' span parameters and storing said parameters in predetermined storage locations within said data structure; performing a span occluding test query operation between at least two different polygon spans based on comparisons of said stored span parameters between said at least two different polygon spans to determine which of said spans is visible and which of said spans is occluded; and storing said span occluding test query results in said data structure. 16. The method in Claim 15, wherein said Span Occluding Test (SOT) query comprises the steps of: generating a span occulting test (SOT) region based on span parameters for a Current Span Portion (SC) having current span endpoints (x^, z^ and (x,-,, Z j .,,) being tested to determine if it is occluded; identifying a selected span as an occluding span if said selected span having endpoints (x_ j , z^) and (x^, z nL ) lies within said Span Occulting Test Region according to the relationship: Selected Span is within SOT Region if { (x Λ < CR JΛ (x.,, > Xcι Λ [(Z»L <ZCF) V (Z„ R < ZC))]. here Z C F = Maximum Of (Zc R , Za). 17. The method in Claim 16, wherein said method further comprises: receiving values of ^, x,.,,, and ∑c p , into said memory so that said x^, x^, and z^ values are compared to said selected span endpoints to identify said selected span as an occulting span; testing all of said polygon spans simultaneously and in parallel; and storing said query result in a field of said memory. 18. The method in Claim 17, wherein each said span is modeled by geometric properties of said span including: coordinates of the left endpoint of the span, and coordinates of the right endpoint of the span. 19. The method in Claim 17, wherein said spans are represented by trapazoids, and wherein said endpoints of each span are two (x,z) points, one for the top edge of the current raster line and one for the lower edge of said current raster line. 20. The method in Claim 17, wherein said spans are represented by quadrilaterals, and wherein said endpoints of each span are an (Xu, L ,z) triplet including one z-coordinate and an x-coordinate for the upper and lower edges of the current raster line.

Inventors: DULUK JEROME F JR, DULUK, JEROME, F., JR.
Applicants: DULUK JEROME F JR, SILICON ENGINES INC, DULUK, JEROME, F., JR., SILICON ENGINES, INC.
Application year: 1996
Main classification: G06T15
IPC codes: G06T11, G06T15, G09G5