####################################################################### # MACRO FILE NAME: exN03Vis4.mac # # # # AUTHOR(S): Satoshi Tanaka # # # # DATE: # # June 20, 2001 # # November 26, 2000 # # October 17, 2000 # # June 06, 2000 # # # # CONTENTS: An example for the compound command, # # "/vis/specify " # # # # USAGE: % gmake visclean # # % $G4BINDIR/exampleN03 # # Idle> /control/execute visTutor/exN03Vis4.mac # # # # REQUIRED PLATFORMS & SOFTWARES: Unix, X-window, # # DAWN (version 3.85 or after) # # gv (Ghostview), Tcl/Tk # # # # ENVIRONMENTAL VARIABLES (C-MACROS) FOR INSTALLATION: # # (See geant4/source/visualization/README for details.) # # # # % setenv G4VIS_BUILD_DAWNFILE_DRIVER 1 # # # # ENVIRONMENTAL VARIABLES (C-MACROS) FOR COMPILATION: # # (See geant4/source/visualization/README for details.) # # # # % setenv G4VIS_USE_DAWNFILE 1 # # # # ADDITIONAL NOTES: # # The compound command "/vis/open " # # is equivalent to the following set of commands: # # # # /vis/sceneHandler/create $1 # # /vis/viewer/create # # # # The compound command "/vis/specify " # # is equivalent to the following set of commands: # # # # /vis/scene/create # # /vis/scene/add/logicalVolume $1 # # /vis/sceneHandler/attach # # /vis/viewer/refresh # # /geometry/print $1 # # # # WARNING: You should execute "/vis/viewer/update" after # # "/vis/specify" in order to complete visualization # # when you use post-processin visualization drivers # # such as the DAWNFILE, VRMLFILE, OpenGL Motif drivers. # # # ####################################################################### ########################################################## # Visualization with the OGLIX driver ########################################################## # Invoke the OGLIX driver /vis/open OGLIX # Set camera /vis/viewer/reset /vis/viewer/zoom 0.9 /vis/viewer/viewpointThetaPhi 35 35 # Visualize a selected logical volume /vis/specify Absorber /vis/viewer/update ########################################################## # Visualization with the DAWNFILE driver # # * Each visualized view is saved to a file "g4_XX.eps" # with the "vectorized" PostScript format. # # * In order to make the file "g4_XX.eps" printable, # append the "showpage" PostScript command to the file. # You can do it with the 4th page of the DAWN GUI panel # or by editing the EPS file by hand. # # * Set an environmental variable if you wish to # skip DAWN GUI: # % setenv G4DAWNFILE_VIEWER "dawn -d" ########################################################## # Invoke the DAWNFILE driver /vis/open DAWNFILE # Set camera /vis/viewer/reset /vis/viewer/zoom 0.9 /vis/viewer/viewpointThetaPhi 35 35 # Visualize a selected logical volume (1) /vis/scene/create /vis/scene/add/logicalVolume Absorber /vis/scene/add/axes 0 0 0 500 /vis/scene/add/text 0 0 0 mm 40 -100 -200 LogVol:Absorber /vis/sceneHandler/attach /vis/viewer/refresh /geometry/print /vis/viewer/update # Visualize a selected logical volume (2) /vis/scene/create /vis/scene/add/logicalVolume Gap /vis/scene/add/axes 0 0 0 500 /vis/scene/add/text 0 0 0 mm 40 -100 -200 LogVol:Gap /vis/sceneHandler/attach /vis/viewer/refresh /geometry/print /vis/viewer/update