Abstract:
A method for rendering a three-dimensional image on a computer graphics display device involving the steps of providing a data base defining at least the geometry and reflectivity of light emitters and object in the scene and approximating surfaces of each object in the scene as patches in three dimensional space. Each patch is approximated as one or more elements defined by vertices. A source of irradiated light in the scene is selected and defined as a light source. Then, for each vertex, a form factor representing the fraction of light energy that arrives at the vertex from the source is determined by ray tracing from the vertex to the source. Radiosity is then determined at each vertex based on the form factors determined for each vertex. This process is repeated a selected number of times using a different light source each time. In this manner a plurality of radiosities are determined that collectively indicate the global illumination of the scene. The scene is then displayed based upon these radiosities.

Description:
CROSS REFERENCE TO RELATED APPLICATION(S) 
     This is a continuation of copending application Ser. No. 07/531,377 filed on May 31, 1990, now abandoned. 
    
    
     FIELD OF THE INVENTION 
     The present invention relates generally to the field of three dimensional computer graphics. More particularly, the present invention relates to a global illumination technique for generating three dimensional computer graphics employing ray tracing to compute form factors in radiosity. 
     BACKGROUND OF THE INVENTION 
     The synthesis of realistic images in three dimensional computer graphics requires the evaluation of a shading model simulating the propagation of light within a scene or environment. In the prior art, local shading models have been employed wherein shading is computed based only on direct illumination by light sources. Synthesis of realistic shading, and hence of realistic images, however, requires the use of a global illumination model in which secondary illumination provided by light reflected from other sources in the scene, and the shadowing of one surface by another, are taken into account. 
     A number of global illumination techniques for generating three dimensional computer graphics are known, the most common of which are ray tracing and radiosity. The following publications, which are incorporated herein by reference, are illustrative: Goral, Cindy M. et al., &#34;Modeling the Interaction of Light Between Diffuse Surfaces&#34;, Computer Graphics, vol. 18, no. 3, pp. 213-222 (July, 1984); Cohen, Michael F. et al., &#34;The Hemi-Cube: A Radiosity Solution For Complex Environments&#34;, SIGGRAPH Proceedings, vol. 19, no. 3, pp. 31-40 (1985); Greenberg, Donald P. et al. &#34;Radiosity: A Method For Computing Global Illumination&#34;, The Visual Computer, vol. 2, pp. 291-297 (1986); Cohen, Michael F. et al., &#34;An Efficient Radiosity Approach For Realistic Image Synthesis&#34;, IEEE CG&amp;A, pp. 26-35 (March, 1986); Cohen, Michael F. et al., &#34;A Progressive Refinement Approach to Fast Radiosity Image Generation&#34;, Computer Graphics, vol. 22, no. 4, pp. 75-84 (August, 1988). See also the following publications, incorporated herein by reference, which describe various ray tracing techniques: Maxwell, Gregory M. et al., &#34;Calculation of the Radiation Configuration Using Ray Casting&#34;, Computer Aided Design, vol. 18, no. 7, pp. 371-379 (September 1986); Arvo, James, &#34;Backward Ray Tracing&#34;, Apollo Computer, Inc. Chelmsfor, Mass. (date unknown); Cook, Robert L. et al., &#34;Distributed Ray Tracing&#34;, Computer Graphics, vol. 18, no. 3, pp. 137-145 (July, 1984); Chattopadhyay, Sudeb et al., &#34;Bi-Directional Ray Tracing&#34;, Proceedings of Computer Graphics 1987, pp. 335-343 (1987). 
     Ray tracing approximates the global illumination of a scene by tracing rays from the eye through a viewing plane and into the three dimensional environment. For each ray, the closest surface intersection point is determined. Depending upon the material properties of the surface, it may spawn reflected and refracted rays, which are recursively traced in the same fashion. As the spawned rays are propagated through the environment, a tree of intersection locations is constructed for each sample point on the viewing plane. The final image intensity of this point is determined by traversing the tree and computing the contribution of each node according to a shading model. 
     The intensity calculation for each node consists of two parts. The first part determines if the intersection point can be seen from each light source. If no opaque object blocks the light from the intersection point, then the second part consists of using the attributes of the surface and the light source to calculate the contribution to the final color intensity of the pixel. 
     The first operation, called &#34;shadow testing&#34;, is normally the most computationally expensive process of the ray tracing technique. The reason for this is that each object in the entire environment must be tested to determine if it occludes each light source for every ray intersection point. For scenes with complex lighting schemes, the percentage of time required for occlusion testing can increase to over 80% of the total computation time. 
     Thus, ray tracing techniques can be slow and in any event suffer from the disadvantage that they are view dependent, i.e., the scene must be recreated for each new view. 
     The advantage of the radiosity technique is that it is view independent. The radiosity technique consists of a series of independent steps. First, the geometry, surface color and surface reflectance properties of the object in the scene are specified and stored in a data base. Each surface is subdivided into a number of discrete surface patches for which a constant intensity or radiosity is assumed. The geometric relationship between each patch and the environment to every other patch is next determined, resulting in a system of simultaneous equations. Solving these equations yields the radiosity for each patch. Finally, the radiosity information is used to render an image of the environment from any given view point. 
     Calculating the geometry relationships, or form factors, between patches, is the most computationally expensive part of the radiosity technique for complex environments (i.e., environments where some patches may fully or partially occlude others). Thus, despite the advantage of view independence, the radiosity technique has been considered impractical for scenes of high complexity; the time and storage costs of the algorithm were expensive (i.e., O(n 2 ), where n is the number of surfaces in the scene). 
     Another rendering technique is known as progressive radiosity. Progressive radiosity is a refinement upon the basic radiosity technique and provides good synthetic images early in the solution process. In the progressive radiosity technique, illumination is computed one step at a time. At each step, the reflected or emitted illumination provided by a single source is distributed to all other surfaces. The determination of where the illumination falls in the scene is accomplished using the well known &#34;hemi-cube&#34; algorithm, (see, e.g., the above referenced Cohen et al. publication relating to the hemi-cube), in which the scene is scan converted from the point of view of the surface providing the illumination. In effect, light is &#34;shot out&#34; from the source in a predefined uniform set of directions to land where it may in the environment. Although the overall progressive radiosity technique provides improvements over prior radiosity techniques for graphics, the use of the hemi-cube algorithm to determine illumination suffers inherently from aliasing and undersampling, particularly as the scene complexity increases. 
     The present invention employs an improvement to the progressive radiosity technique and, therefore, additional detail respecting the underlying physics and mathematics of the progressive radiosity technique is provided herein as background. 
     As mentioned, the original radiosity technique determines diffuse global illumination by solving a system of equations expressing the dependence of the energy leaving each surface and that arriving from every other surface. The energy leaving a surface is determined according to the following relationship: ##EQU1## where B i  =radiosity of surface i (energy per unit area) 
     A i  =area of surface i 
     E i  =emitted energy per unit area 
     P i  =reflectivity of surface i 
     B j  =radiosity of surface j 
     A j  =area of surface j 
     F ji  =form-factor from surface j to surface i 
     The form-factor, F ji , is the fraction of energy leaving surface j that arrives at a second surface i. 
     An equation of this form exists for every surface in the scene. The resulting system of simultaneous equations can be solved using conventional matrix techniques to determine the surface radiosities. A known shading calculation then uses these surface radiosities to determine the radiosity at the vertices of smaller polygonal elements into which the surfaces have been subdivided. (The elements are actually defined by vertices of the polygons.) Following the radiosity solution, Gouraud interpolation based on the element vertex radiosities can be used to render smoothly shaded images. 
     Forming the matrix prior to the solution requires determining and saving the form factor between each surface and every other surface, a process that is expensive (O(n 2 )) both in time and memory requirements. The progressive radiosity technique overcomes this difficulty by solving the radiosity equations in a series of steps. The solution proceeds as follows: 
     do [the following steps] until the image is converged: 
     1. select the surface with the greatest reflected and/or emitted energy (i.e., the surface having the greatest irradiated light energy); 
     2. compute the form-factors from that surface to all surface elements; and, 
     3. add the resulting contribution to the radiosity of each element. 
     In the prior art, the form-factors from the source surface to the receiving elements are computed using the well known hemi-cube technique, in which all elements are projected, scan converted and z-buffered onto the five faces of a hemi-cube positioned at the source surface. In the early steps, the surfaces chosen will be the light emitters since other surfaces will have, as yet, received very little illumination. Subsequent steps will select secondary sources, starting with those surfaces that received the most light directly from the light sources, and so on. 
     Since each solution step updates the radiosity of all surfaces, an increasingly accurate result can be displayed following each step. An ambient term derived from the known energy yet to be distributed can be added to improve the image. Useful images can thus be produced very early in the solution process. There are, however, inherent problems in using a hemi-cube placed at the source surface to determine form factors. These are discussed below. 
     The source of efficiency in the progressive radiosity algorithm is that illumination is computed roughly in the order that light propagates through the environment. In effect, the path of light is followed from the light emitters into the scene. 
     The more common strategy for computer graphics, however, is to start at the eye and trace the light back to the source. This has the advantage of restricting shading effort to those points in the scene that appear in the image and to the directions that reach the eye. Ray tracing and its derivatives, distributed ray tracing and path tracing, employ this approach. However, these methods do not have information about where in the scene to look for important sources of light, other than the light emitters themselves. Hence, for a diffuse surface, much sampling may be expended on directions from which little energy turns out to arrive. 
     By reversing the process and following the propagation of energy from the emitters, progressive radiosity continually has information about where the energy arrives from. Attention can thus be focused on the most important surfaces of illumination. Even very small secondary sources that nonetheless happen to reflect a great deal of light will be detected, a very difficult case when working entirely from the eye by ray tracing. 
     The foremost difficulty with the hemi-cube approach employed in progressive radiosity is uneven and inadequate sampling. A surface that is fairly large in the image may, when viewed from the light source, be small enough to fall between the hemi-cube pixels. Such a surface will receive no illumination. FIG. 1 illustrates this problem. FIG. 1 illustrates a portion of a scene having surfaces A, B and C and a source S over which a hemi-cube H has been superimposed. As shown, the hemi-cube is divided into pixels PI. Surfaces A, B and C are all substantially the same size. Surface A covers two hemi-cube pixels (rays R1 and R2) while surface B covers only pixel (ray R4). Surface C drops out entirely and therefore incorrectly receives no illumination. In addition, since the hemi-cube is a uniform sampling method, it will produce aliasing. The shading of a fine grid of small polygons (defined by the vertices) will show a distinct plaid pattern if the polygons are small enough to alias on the hemi-cube. FIG. 2 schematically illustrates this phenomenon in two dimensions. As shown in FIG. 2, a surface patch P consisting of a grid of polygons (defined by the polygon or &#34;element&#34; vertices) is illuminated by a small light source S. The rectangular hemi-cube sampling pattern interacts with the regular receiving grid of polygons to generate aliasing. Increasing the resolution of the hemi-cube to reduce these effects becomes expensive in terms of both computation time and storage, and, in any case, can never guarantee adequate sampling for all polygons. 
     There are additional problems with the progressive radiosity technique that employs the hemi-cube approach. First, in the radiosity method, light sources are normally surfaces with area. Performing a single hemi-cube at a surface is equivalent to treating the surface as a point source. To approximate an area source, hemi-cubes must be performed at several points on the surface. However, the number of points necessary for a good approximation depends upon how close the area is to the surface it illuminates. Employing the hemi-cube approach, the number of points representing the source area will be the same for all receiving surfaces, since all surfaces are projected onto each hemi-cube. 
     A further serious limitation derives from the fact that a hemi-cube placed over the light source determines the energy received by source areas (the elements), not points on the surface. Since it is actually the shading at element vertices that is used in rendering the final image, the radiosity at each vertex must be determined by averaging the radiosity of the elements surrounding it. This requires connectivity information that is not always available. Similarly, smooth shading of curved surfaces which are approximated by independent polygonal facets also requires connectivity information when the hemi-cube is used. Continuity of shading across such surfaces is normally ensured by calculating shading at the facet vertices using the true surface normal, as in Gouraud shading. Using the hemi-cube approach, radiosities can be determined directly only for each facet and averaging must be performed to obtain vertex shading. 
     It is therefore desirable to provide a method of rendering a three-dimensional, computer generated, graphics image that attains the benefits of both progressive radiosity and ray tracing, but avoids the problems inherent in employing the hemi-cube approach. It is also desirable to provide a method for generating a three dimensional image that is less costly in terms of computational time and storage than the conventional progressive radiosity technique. The present invention achieves these objectives. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 schematically illustrates a problem with a prior art global illumination technique. 
     FIG. 2 schematically illustrates another problem with the same prior art global illumination technique. 
     FIG. 3 schematically illustrates the ray tracing technique for computing form factors in accordance with the practice of the present invention. 
     FIGS. 4, 5, 6 and 7 conceptually illustrate form factor computation according to the practice of the present invention. 
     FIGS. 8A, 8B and 9A, 9B illustrate actual performance of the present invention against an analytical model. 
     FIGS. 10, 11 and 12 conceptually illustrate light sources that may be implemented in the practice of the present invention. 
     FIGS. 13A, B are a flow chart generally setting forth the method of the present invention. 
    
    
     SUMMARY OF THE INVENTION 
     A method of rendering a three dimensional scene according to the invention comprises the steps of providing a database defining light emitters and objects in the scene, and approximating surfaces of each object in the scene as patches in three dimensional space, wherein each patch is subdivided into one or more elements defined by vertices. A source of irradiated light energy, which can comprise a source of emitted and/or reflected light, is selected and defined as a light source. Thus, the light source can comprise either an actual light emitter or a surface in the scene that reflects a high amount of light energy, or both. 
     According to the invention, form factors from the light source to each vertex are determined by ray tracing, then radiosity at each vertex are determined by employing these form factors in the basic radiosity equation set forth above. After the radiosity of each patch due to the selected light source has been obtained, a new light source in the scene is selected and the process of determining form factors by ray tracing from that light source to each vertex and determining new radiosities is repeated. The result is a plurality of radiosities collectively indicating global illumination of the scene that can be employed to display the three dimensional scene in well known manner. 
     According to the invention, the light source can be a point or a surface having an area, defined as a source surface. In the case of source surfaces, form factors are determined from at least one sample point, and preferably from a plurality of sample points, on the source surface to each vertex, and the number of sample points on the source surface from which the form factor is determined is independently selected from vertex to vertex. Stated otherwise, for a particular vertex, a ray is cast (i.e., by ray tracing) from the vertex to each sample point on the source surface, and the number of rays cast from each vertex is independent of the number of rays cast from any other vertex. Occlusion between the source surface and a vertex by an object in the scene in determined with respect to each vertex by casting rays from the vertex to the sample points on the source surface. A test for intersection of any of the rays with the object is performed, and the form factor for the source surface to the vertex is determined based upon the number of intersecting and nonintersecting ray cast from the vertex to the source surface. The form factor for an intersecting ray is defined as having zero magnitude, whereas the magnitude of other form factors will vary depending upon such characteristics as vertex and source orientation, and the form factor equation employed. A total form factor for the source surface to each vertex is determined by summing the values of the form factors for each ray cast from the vertex to each sample point on the source surface and dividing the result by the total number of rays cast from the vertex. 
     A significant advantage flowing from the practice of the present invention is the ability to define light sources in radiosity that have artificial (and arbitrary) characteristics. For example, so called &#34;non-physical&#34; light sources with no attenuation over distance or light having arbitrary quadratic attenuation can be simulated. Further, light sources such as &#34;point lights&#34; (i.e., a light emitter that has no area) and &#34;positional lights&#34; (e.g., spot lights and cone lights) having artificial light distribution patterns, as well as so called &#34;directional lights&#34; (i.e., parallel light rays located an infinite distance from the scene) can be simulated in radiosity. In the practice of the invention, these features are achieved by redefining the form factor equation for the desired effect. 
     DETAILED DESCRIPTION OF THE INVENTION 
     The following definitions are employed herein for convenience, though their meaning and significance is well known in the art. 
     Surface: A bounded area with a constant or continuous surface normal, for example, polygons and curved surfaces. Surfaces are not limited by complexity, and may be concave polygons with holes. 
     Patch: A whole or part of a surface which has been divided through some number of binary subdivisions. It is the basic geometric unit which acts as an illuminator of the environment, whether direct (light) or indirect (reflector). Reflectivity and emission characteristics are assumed constant over the patch. Global illumination is solved in terms of patch radiosities. 
     Element: Whole or part of a patch which has been divided through some number of binary subdivisions. It is the smallest geometric unit for which the environment intensities are computed. It acts as a receiver of light for patches and as a discrete unit for numerical integration of the patch to patch form factors. An element is usually a polygon, but may assume other shapes. 
     Vertices: Points having X, Y and Z coordinates defining the elements. 
     According to the present invention, the aforementioned problems with the prior art method of progressive radiosity employing the hemi-cube approach may be eliminated by determining the illumination directly at the vertices. As before, at each solution step, the surface with the most radiated and/or emitted energy to contribute to the environment is treated as the source surface. Instead of performing a hemi-cube at the source, each element vertex in the scene is then visited and a form factor is computed form the source surface to the vertex by casting rays (i.e., by ray tracing) from the vertex to sample points on the source. This process is sometimes referred to as &#34;shooting rays.&#34; This process eliminates sampling problems inherent in the hemi-cube approach since illumination is guaranteed to be computed at every vertex. This is schematically illustrated in FIG. 3 wherein rays from a source S are cast to each of the vertices defining the surface elements or polygons of a patch P. As illustrated in FIG. 3, a plurality of sample points SP 1 , Sp 2  and SP 3 , are defined on the area of the source and are uniformly distributed thereon. The number of sample points on the source S may vary from one vertex to the next, thus allowing area sources to be approximated as accurately as desired. Since the form factors are computed independently at each vertex, each form factor may be computed to any desired accuracy. The true surface normal at the vertex may be used, thus solving the problem of continuous shading of independent surface facets. 
     FIG. 4 conceptually illustrates the concept of a form factor from a differential area dA 1  to a differential area dA 2 , wherein the differential areas are separated by a distance r. As illustrated in FIG. 4, the ray cast between the two differential areas subtends an angle θ 1  to the surface normal of differential area dA 1  and subtends an angle θ 2  to the surface normal of the differential area dA 2 . The form factor from differential area dA 1  to differential area dA 2  is: ##EQU2## For a finite area A 2 , this equation must be integrated over that area and can be solved analytically for simple configurations, but, for computer usage, it must be evaluated numerically. Numerical integration may be accomplished in straightforward manner by approximately the integral as the sum of form factors computed for smaller regions of areas &#34;delta A 2  &#34; (each corresponding to a patch i). This is conceptually illustrated in FIG. 5 where the subscript &#34;i&#34; has been added to the terms r, θ and θ 2  to indicate that form factors to a number &#34;n&#34; of patches i are to be determined. With reference to FIG. 5, the form factor from the differential area dA 1  to the finite area A 2  can be shown to be: ##EQU3## 
     A problem with the foregoing equation is that it breaks down if the size of delta A 2  is large relative to the distance r; thus as r becomes less than unity, the size of delta A 2  must be shrunk correspondingly, or the resulting form factor grows without bound. 
     To limit the subdivision of the source area A 2 , and thus the computational cost of computing form factors while avoiding the difficulty of the preceding equation, the delta areas (delta A 2  or patches i) are explicitly treated as finite areas. An equation for the form factor from finite delta areas (patches i) can be obtained by approximating each delta area by a simple finite geometry for which an analytical solution is available. For simplicity, a disk has been chosen as the finite area upon which to base the approximation. With reference to FIG. 6, the form factor dF 21 , from a source area A 2  to a directly opposing, parallel differential area dA 1  is provided by the following relationship: 
     
         dF.sub.21 =dA.sub.1 /(πr.sup.2 +A.sub.2) 
    
     FIG. 7 illustrates the case where the source area A 2  and the differential area dA 1  are not in parallel planes. For this case, the form factor from the area A 2  (source surface) to the differential area dA 1  (receiving area) is approximated as: 
     
         dF.sub.21 =dA.sub.1 cos θ.sub.1 cos θ.sub.2 /(πr.sub.2 +A.sub.2) 
    
     As in the case of FIG. 5, to evaluate the form factor from a general source A 2  to a vertex at the receiving area dA 1 , the source A 2  is divided into delta areas or patches. The form factor due to each patch is computed utilizing the immediately preceding equation. Occlusion between the source surface and the vertex by an object in the scene is tested by applying ray tracing methods, i.e., by &#34;shooting&#34; or &#34;casting&#34; a single ray from the receiving vertex to the center of the patch on the source. This ray is a simple shadow ray, in other words, it provides only a yes or no answer to the question of whether anything is intersected. For a yes answer, the magnitude of the form factor is zero. For a no answer, the magnitude of the form factor is computed according to the form factor equation. In the remaining discussion herein, this process of &#34;shooting&#34; rays to determined whether anything is intersected will be referred to as &#34;sampling the source&#34; and rays will be said to be &#34;shot&#34; from the vertex to sample points on the source. If sample points are distributed uniformly on the source, then the total form factor is simply the sum of the form factors computed for each sample point i according to the following relationship: ##EQU4## where n=number of sample points on source 
     δ i  =1 if sample point is visible to vertex, 0 if occluded. 
     In the immediately preceding equation, the presence of the area term, A 2 , in the denominator prevents the result from growing without bound for small values of r. This allows approximate form factors to be computed using large delta areas or patches, and hence a low number of sample points. Thus, a fast, approximate radiosity solution can be obtained using a very small number of rays (as few as one ray per vertex per source). The accuracy of the result increases as the number of sample points on the source is increased. This can be seen by observing that as the value of n grows larger, the term A 2  /n tends towards zero and each term of the summation approaches the equation for a form factor from a differential area to a differential, as in the case of the equation for FIG. 4. Thus, a smooth continuum of results is available depending upon the computational time that one is willing to expend on the executing computer system. 
     It can be shown that the radiosity of patch i due to energy received from another patch j (i.e., patch j being a source) can be determined according to the following relationship: 
     
         B.sub.i A.sub.i =P.sub.i B.sub.j A.sub.j F.sub.ji 
    
     where: 
     B i  =radiosity of patch i; 
     A i  =area of patch i; 
     P i  =reflectivity of patch i; 
     B j  =radiosity of patch j; 
     A j  =area of patch j; and, 
     F ji  =form factor from patch j to patch i. 
     If the radiosities are computed at vertices, instead of at the center of a patch, it can be shown that, by combining the form factor equation with the above radiosity equation, the equation for radiosity at a vertex 1 due to illumination by a source surface 2 is: ##EQU5## where: B 1  =radiosity at the vertex 1; 
     P 1  =reflectivity at vertex 1; 
     B 2  =radiosity at source surface 2; 
     A 2  =area of source surface 2; 
     n=the number of sample points defined on the source surface (2); 
     i represents one of the n sample points on the source surface (2) (for i=1 to n); 
     δ i  =1 if the sample point i is not occluded at vertex 1 and zero if occluded; 
     θ 1i  =is the angle between a surface normal of the source surface 2 and the ray cast from the sample point i to the vertex 1; 
     θ 2i  =is the angle between the surface normal of the patch at the vertex 1 and the ray cast from the sample point i to the vertex 1; 
     r=is the distance between the vertex 1 and the sample point i. 
     At each step of the progressive solution, the contribution to the radiosity of each element vertex in the environment due to the current source is computed using this relationship. 
     It was previously mentioned that a uniform distribution of sample points on the source is used. However, it has been found that this can produce a form of aliasing, particularly at shadow edges. There are a number of solutions to this problem. The vertex radiosities can be filtered using a weighted averaged of neighboring vertex radiosities. Alternatively, the accuracy of form factors can be increased by shooting a variable number of rays for each vertex-source pair. The form factor for a given vertex-source pair can be computed using successively greater numbers of rays, until the variation and the resulting form factors drops below a certain criteria. Thus, at vertices lying on shadow boundaries, many rays may be shot to achieve an accurate form factor, while vertices completely inside or outside the shadow will require a much smaller number. This approach also increases the accuracy of form factors for sources that are very close to the vertex, in which case a large number of sample points may also be required. 
     Form factors obtained using ray tracing from a vertex to an area source are compared to analytical results for several configurations in FIGS. 8A, 8B and 9A, 9B. As can be seen, the actual and analytical results are quite close for a square source, as illustrated in FIGS. 9A and 9B. Accuracy decreases as the source becomes more oblong, as illustrated in FIGS. 8A and 8B. The results also becomes less accurate as the source and vertex move off axis from one another, as illustrated in FIGS. 9A and 9B. However, since the magnitude of the form factors decreases at the same time, relative error is greatest at angles where incoming energy will make the smallest contribution. In each case, increasing the number of sample points brings the approximate result closer to the correct result. 
     The use of ray tracing to compute form factors in radiosity allows the geometry used for shadow testing to be different from that used to represent objects for shading and rendering. When shooting a ray, it is not necessary to test for intersection against all the elements into which the environment has been subdivided. The original surface geometries can be used instead. However, for shadow testing during the form factor computation, the ray tracer intersects the original, true surface geometries. The ability to use different geometric representations for shadow testing and for shading and rendering provides an important source of efficiency for radiosity. Adequately representing complex shadows can require subdividing surfaces into a very large number of small elements. By ray tracing against the original geometries, surfaces can be represented by as many facets as desired for shading and display, without increasing the cost of each shadow test. 
     The following is a pseudo-code listing setting forth the method of the present invention. The listing includes self-evident explanatory comments. 
     At a given step of the radiosity solution, a single surface patch is selected to act as the source surface. The contribution of the energy reflected or emitted by that patch to the radiosity of every element vertex in the environment is determined based on the form-factor from the source to the vertex. The form-factor for a source patch to a vertex is determined as follows: 
     
         ______________________________________current.sub.-- ff.sub.-- estimate = 0.0 (ff = form factor)do ( previous.sub.-- ff.sub.-- estimate = current.sub.-- ff.sub.-- estimate for several different points on the light source (  determine direction from vertex to point on light source  if vertex and light source face each other for this point (   shoot ray from vertex to point   if ray does not intersect anything between vertex and   light (    label point on light as visible   )  ) ) current.sub.-- ff.sub.-- estimate = 0.0 for each point on light (  if point was labeled as visible (   current.sub.-- ff.sub.-- estimate = ##STR1## )) until absolute value of current.sub.-- ff.sub.-- estimate  minus previous.sub.-- ff.sub.-- estimate is  less than some accuracy criterionform.sub.-- factor = current.sub.-- ff.sub.-- estimateThe following terms used above are defined here: Area = area of source patch theta.sub.-- v = angle between vertex normal and direction to point on light theta.sub.-- s = angle between source normal and direction to the vertex num.sub.-- points = total number of points to   which rays have been shot on the   light source patch for this vertexPoint lights and directional lights use the same basic algorithm,except that the equation for the form-factor is different,and only one ray needs to be shot (since the lightsource has no area) determine direction from vertex to light if vertex is within cone of influence of the light (  shoot ray from vertex to light source   (for directional light, shoot ray in direction of lightsource)  if ray does not intersect anything between vertex and light ( ##STR2##  ) )The equation given here for the form.sub.-- factoris a general equation that encompasses the most widely used&#34;non-physical&#34; light source types. These areexplained in more detail below. Cone lights are takeninto account by the step in which the vertex is checked forinclusion in the &#34;cone of influence&#34; of the light.a1, a2 and a3 are the attenuation coefficients.n is a spot light power.______________________________________ **means to the power of, e.g. distance **2 means distance squared. 
    
     FIGS. 13A, B illustrate, in flow chart form, the method of the present invention described above and set forth in the pseudo code listing. 
     The present invention may be employed in connection with any suitable three dimensional graphics software, such as the commercially available Starbase Graphics software package and HPUX hardware manufactured and sold by Hewlett-Packard Company, Palo Alto, Calif. Attached hereto as Appendix A is a source code listing, written in the programming language &#34;C&#34;, implementing the method of the present invention on such system. The implementation is for a three dimensional rendering of an object floating in the space of a room. 
     As pointed out in the pseudo code listing above, an important feature of the present invention is the ability to employ so called &#34;non-physical&#34; light sources in radiosity. A &#34;non-physical&#34; light source is one which has no physical counterpart outside of the computer. The ability to employ such light sources can be helpful in creating certain shading effects that help to define special relationships, surface geometries, etc. of the same scene. 
     According to the invention, different light sources including &#34;non-physical&#34; light sources are modeled by varying the form factor equation. This follows since light energy received at a point from a source is determined according to the selected form factor equation. Thus, by varying the form factor equation from point to point, variations in light characteristics, such as attenuation, distribution, etc., can be simulated. 
     As set forth in the pseudo code listing and with reference to FIG. 10, the basic equation for defining characteristics of light source according to the present invention is: ##EQU6## where: F=form factor; 
     θ v , θ s  and r are as show in FIG. 10; 
     n=a distribution characteristic of the light source; and, 
     a 1 , a 2 , and a 3  =constants representing attenuation behavior of emitted light, i.e., the attenuation coefficients. 
     Thus, light having arbitrary quadratic attenuation can be simulated by arbitrarily selecting values of the constants a 1 , a 2  and a 3 . Alternatively, a 1  can be set to unity and a 2  and a 3  can be set to zero, in which case the preceding equation becomes: 
     
         F=cos θ.sub.v (cos θ.sub.s).sup.n 
    
     thus defining a light source that emits non-attenuating light. 
     FIG. 11 illustrates the case of a &#34;point light&#34; PL. By definition, a &#34;point light&#34; has no area and therefore the term (cos θ s ) n  becomes unity, and the form factor from the point light PL to any vertex on a surface becomes: 
     
         F=cos θ.sub.v. 
    
     FIG. 12 illustrates the case of a &#34;directional light&#34; DL. In the case of a directional light, all emitted rays are parallel and the term cos θ s  is ignored (treated as unity) and thus the form factor employed in connection with a directional light becomes: 
     
         F=cos θ.sub.v. 
    
     where θ v  gives the angle between the surface normal at the vertex and the light source direction. 
     &#34;Positional lights&#34; e.g., spot lights, cone lights, and the like can be simulated by varying the value of n in the equation F=cos θ v  (cos θ s ) n . Distribution patterns approximating those of spot lights, cone lights and other types of positional lights can also be simulated. 
     The present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof and, accordingly, reference should be made to the appended claims rather than to the foregoing specification as indicating the scope of the invention. ##SPC1##