Page 193 - DCAP504_Computer Graphics
P. 193

Computer Graphics



                                             The vertices of the polygon  mesh in figure  12.10  (a) are on the surface of an
                                             underlying cylinder. The normal vector N at a point on the underlying cylinder
                                             is perpendicular to the axis of the cylinder.

                          To determine normal vector N at vertex E in figure 12.10 (b), we use the average of the normal vectors
                          of the polygons that meet at E:
                          N=N1 + N2 + N3 + N4
                          The value of N can then be normalized by dividing it by |N|.
                          Common normal vectors at the vertices of a polygon mesh that are used to shade a curved surface result
                          in color values that are shared by adjacent polygons and also eliminate abrupt modifications in shading
                          characteristics  across polygon edges. Even when the polygon mesh is relatively coarse, Gouraud
                          shading is very useful in eliminating abrupt modifications.


                                      Consider a hexagonal polygon, draw a bilinear interpolation diagram and analyze how
                                      you can find out normals at each vertex.


                          Some of the advantages of Gouraud shading are:
                          1.  Unlike a constant shaded polygon, Gouraud shading allows to use different shade for each vertex
                              of a polygon.
                          2.  Gouraud shading provides much better image than constant shading.
                          3.  Gouraud shading  is not too computationally expensive as it calculates only one  illumination
                              formula for each vertex.
                          Some of the disadvantages of Gouraud shading are:
                          Gouraud shading eliminates folds that you may want to retain.

                                      In some cases, it is not  appropriate to use Gouraud shading for polygons with three
                                      vertices. Polygons may appear quite different when they have more than three vertices
                                      with different shades for each.
                          The following figure 12.11 depicts the Gouraud shading of an image.

                                                    Figure 12.11: Gouraud Shading of an Image































                          186                     LOVELY PROFESSIONAL UNIVERSITY
   188   189   190   191   192   193   194   195   196   197   198