next up previous index
Next: Summary Up: DRAW001 Introduction to Previous: Graphics functionality of

The shading algorithm

In GEANT 3.16 a new shading algorithm has been introduced which is 10 to 100 times faster than the algorithm which was implemented in GEANT 3.15. In the new algorithm the search for the visible portions of all the faces of every volume is performed in the following steps:

  1. the vertices of each face are transformed from the MARS to the screen reference system. In this way the dimensions of the face are of the order of magnitude of centimeters.
  2. in the screen reference system the face is filled with horizontal lines scan-lines according to the desired resolution.
  3. These lines are then transformed back in the MARS, where the hidden line removal technique is used to find their visible portions.
  4. The colour luminosity is chosen as a function of the angle between the normal to the surface and the line of view which is considered to be also the line of illumination.
  5. The visible portions of the lines are finally transformed into the screen reference system and drawn with the calculated luminosity so that they fill only the visible part of each face.
The resulting picture can be saved into GEANT view banks or HIGZ picture files.


Janne Saarela
Mon Apr 3 12:46:29 METDST 1995