source: trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/visTutor/exN03Vis0_mac.html

Last change on this file was 904, checked in by garnier, 17 years ago

ajout de la doc

File size: 5.2 KB
Line 
1<pre>
2#######################################################################
3# MACRO FILE NAME: exN03Vis0.mac #
4# #
5# AUTHOR(S): Satoshi Tanaka #
6# #
7# DATE: #
8# Nov 07, 2001 #
9# Sept 08-09, 2001 (at Hebden Bridge, UK) #
10# June 20, 2001 #
11# November 26, 2000 #
12# October 17, 2000 #
13# June 06, 2000 #
14# May 20, 2000 #
15# November 10, 1999 #
16# #
17# CONTENTS: A simplest macro to demonstrate visualization of #
18# detector geometry and events #
19# #
20# USAGE: % gmake visclean #
21# % $G4BINDIR/exampleN03 #
22# Idle> /control/execute visTutor/exN03Vis0.mac #
23# #
24# REQUIRED PLATFORMS & SOFTWARES: Unix, X-window, OpenGL, #
25# DAWN (version 3.85 or after) #
26# gv (Ghostview), Tcl/Tk #
27# #
28# ENVIRONMENTAL VARIABLES (C-MACROS) FOR INSTALLATION: #
29# (See geant4/source/visualization/README for details.) #
30# #
31# % setenv OGLHOME ... (e.g. /usr/X11R6) #
32# % setenv G4VIS_BUILD_OPENGLX_DRIVER 1 #
33# #
34# ENVIRONMENTAL VARIABLES (C-MACROS) FOR COMPILATION: #
35# (See geant4/source/visualization/README for details.) #
36# #
37# % setenv G4VIS_USE_OPENGLX 1 #
38# #
39# ADDITIONAL NOTES: #
40# The compound command "/vis/open <vis-driver-name>" #
41# is equivalent to the following set of commands: #
42# #
43# /vis/sceneHandler/create $1 #
44# /vis/viewer/create #
45# #
46# The compound command "/vis/drawVolume <physical-volume-name>" #
47# is equivalent to the following set of commands: #
48# #
49# /vis/scene/create #
50# /vis/scene/add/volume $1 #
51# /vis/sceneHandler/attach #
52# #
53#######################################################################
54
55##############################################
56# Visualization of detector geometry
57# with the OGLIX (OpenGL Immediate X) driver
58##############################################
59
60# Invoke the OGLIX driver
61/vis/open OGLIX
62#/vis/open DAWNFILE
63
64# Set camera
65/vis/viewer/reset
66/vis/viewer/set/viewpointThetaPhi 70 20
67
68# Create an empty scene and add the detector geometry to it
69/vis/drawVolume
70
71# The following command "flush"
72# the action of the current viewer.
73# They are required for the post-processing drivers
74# such as DAWNFILE, VRMLFILE, HepRep drivers, etc.
75# For OpenGL drivers, these commands are not required
76# but harmless even if they are described.
77/vis/viewer/flush
78
79#########################################################
80# Visualization of events with the DAWNFILE driver
81#
82# * Each visualized view is saved to a file "g4_XX.eps"
83# with the "vectorized" PostScript format.
84#
85# * Set an environmental variable if you wish to
86# skip DAWN GUI:
87# % setenv G4DAWNFILE_VIEWER "dawn -d"
88##########################################################
89
90# Invoke the DAWNFILE driver
91/vis/open DAWNFILE
92
93# Add the world volume to the current scene
94/vis/drawVolume
95
96# Add trajectories to the current scene
97# Note: This command is not necessary in exampleN03,
98# since the C++ method DrawTrajectory() is
99# described in the event action.
100#/vis/scene/add/trajectories
101
102# Set camera
103/vis/viewer/reset
104/vis/viewer/zoom 1.5
105/vis/viewer/set/viewpointThetaPhi 70 20
106
107# Visualize events added to the current scene
108/tracking/storeTrajectory 1
109/run/beamOn 3
110</pre>
Note: See TracBrowser for help on using the repository browser.