next up previous index
Next: DRAW110 Drawing a Up: GEANT Previous: Summary

DRAW010 The Ray-tracing package

Routine ID: DRAW010
Author(s): Submitted: 10.03.94
Origin: S.GianiRevised: 10.03.1994

Running interactively under X11, a new visualization tool is provided in GEANT 3.21: the ray-tracing package. Based on the new GEANT tracking (see GEOM and TRACK), a set of routines doing light processing is provided to visualize the detectors (useful also to visualize the results of boolean operations). Basically, visible light particles are tracked throughout the detector until when they do not hit the surface of a volume declared not transparent; then, the intersection point is transformed to the screen coordinates and the corresponding pixel is drawn with a computed hue and luminosity.

In case the command ( DOPT RAYT ON) is executed, the drawings are performed by the GEANT ray-tracing; automatically, the color is assigned according to the tracking medium of each volume and the volumes with a density lower/equal than the air are considered transparent; if the option ( USER) is set ( ON) (again via the command ( DOPT)), the user can set color and visibility for the desired volumes via the command ( SATT), as usual, relatively to the attributes ( COLO) and ( SEEN). The resolution can be set via the command ( SATT * FILL VALUE), where ( VALUE) is the ratio between the number of pixels drawn and 20 (user coordinates). Parallel view and perspective view are possible ( DOPT PROJ PARA/PERS).

In the first case, we assume that the first mother volume of the tree is a box with dimensions 10000 X 10000 X 10000 cm and the view point (infinetely far) is 5000 cm far from the origin along the Z axis of the user coordinates; in the second case, the distance between the observer and the origin of the world reference system is set in cm by the command ( PERSP NAME VALUE). Grand-angle or telescopic effects can be achieved changing the scale factors in the command ( DRAW). (Please, note that in case of perspective views, fixed the distance of the viewer, the zooming factors for the raytracing option must be 8.25 times bigger than the ones used for the HIDE options in order to get the same picture). When the final picture does not occupy the full window, mapping the space before tracing can speed up the drawing, but can also produce less precise results; values from 1 to 4 are allowed in the command ( DOPT MAPP VALUE), the mapping being more precise for increasing ( VALUE). For ( VALUE = 0) no mapping is performed (therefore max precision and lowest speed).

The command ( VALCUT) allows the cutting of the detector by three planes ortogonal to the x,y,z axis. The attribute ( LSTY) can be set by the command SATT for any desired volume and can assume values from 0 to 7. It determines the different light processing to be performed for different materials: 0 = dark-matt, 1 = bright-matt, 2 = plastic, 3 = ceramic, 4 = rough-metals, 5 = shiny-metals, 6 = glass, 7 = mirror.

The detector is assumed to be in the dark, the ambient light luminosity is 0.2 for each basic hue (the saturation is 0.9) and the observer is assumed to have a light source (therefore he will produce parallel light in the case of parallel view and point-like-source light in the case of perspective view). Finally, a second light source can be positioned in the space (with a desired intensity) via the command ( SPOT).

P.Zanarini, S.Giani

DRAW110


next up previous index
Next: DRAW110 Drawing a Up: GEANT Previous: Summary


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