next up previous
Next: 3D Data and rendering Up: g4.prim format version 2.4 Previous: g4.prim format version 2.4

Introduction

This document explains the ``g4.prim format'' which is able to describe visualizable 3D (three-dimensional) scenes transferred from GEANT4 with help of its visualization manager and Fukui Renderer driver (DAWN driver). In the following, we use the term ``3D data'' meaning a data to construct a 3D scene or a hint information for the construction, e.g., shape, color, body-coordinate definition, and bounding box of the whole scene. On the other hand, the term ``g4.prim-format data'' means a set of 3D data plus several rendering commands to control DAWN.

DAWN receives the g4.prim-format data from GEANT4 via the TCP/IP socket of the default port number 40701, or via the named pipe by specifying -G and -g options, respectively:

     % dawn -G     (invoking DAWN with socket mode)
     % dawn -g     (invoking DAWN with named pipe mode)

GEANT4 invokes DAWN with -G option by default, and with -g option if the environmental variable ``G4DAWN_NAMED_PIPE'' is set to 1. How GEANT4 sends the g4.prim-format data to DAWN is demonstrated in the test programs, ``g4test_inet.cc'' and ``g4test_unix.cc'', included in the DAWN package. G4.prim-format data sent from GEANT4 are automatically saved to a file with the name ``g4.prim" in current directory of DAWN.

G4.prim-format data can also be visualized with the stand alone (off-line) use of DAWN, giving a g4.prim-format file name from a command line as an argument.

     % dawn g4.prim-format-filename

The g4.prim format is designed with the following philosophy:

1.
The format should be suitable to describe 3D data of GEANT4. For this purpose, (i) it should support most of shapes defined in GEANT4 as built-in primitives, and (ii) it should be able to describe both the CSG and B-Rep data.
2.
Attributes such as color should be described with the way of state machine in order to avoid repetitive resetting of them.
3.
The format should be able to describe rendering commands for DAWN as well as 3D data, but the rendering commands should be clearly distinguishable from 3D data.
4.
The format should be suitable for effective data transfer via local or wide area network. For this purpose, it should be compact and be able to be translated into VRML format easily.

next up previous
Next: 3D Data and rendering Up: g4.prim format version 2.4 Previous: g4.prim format version 2.4
Satoshi Tanaka
4/9/1998