source: trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/visTutor/exN03Vis2_mac.html @ 904

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

ajout de la doc

File size: 5.6 KB
Line 
1<pre>
2#######################################################################
3#  MACRO FILE NAME: exN03Vis2.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 basic macro for visualization of events                #
18#                                                                     #
19#  USAGE:  % gmake visclean                                           #
20#          % $G4BINDIR/exampleN03                                     #
21#          Idle> /control/execute visTutor/exN03Vis2.mac              #
22#                                                                     #
23#  REQUIRED PLATFORMS & SOFTWARES: Unix, X-window, OpenGL,            #
24#                                  DAWN (version 3.85 or after)       #
25#                                  gv (Ghostview), Tcl/Tk             #
26#                                                                     #
27#  ENVIRONMENTAL VARIABLES (C-MACROS) FOR INSTALLATION:               #
28#  (See geant4/source/visualization/README for details.)              #
29#                                                                     #
30#    % setenv OGLHOME     ... (e.g. /usr/X11R6)                       #
31#    % setenv G4VIS_BUILD_OPENGLX_DRIVER   1                          #
32#                                                                     #
33#  ENVIRONMENTAL VARIABLES (C-MACROS) FOR COMPILATION:                #
34#  (See geant4/source/visualization/README for details.)              #
35#                                                                     #
36#    % setenv G4VIS_USE_OPENGLX            1                          #
37#                                                                     #
38#  ADDITIONAL NOTES:                                                  #
39#    The compound command "/vis/open <vis-driver-name>"               #
40#    is equivalent to the following set of commands:                  #
41#                                                                     #
42#      /vis/sceneHandler/create $1                                    #
43#      /vis/viewer/create                                             #
44#                                                                     #
45#######################################################################
46
47#################################################
48# Store particle trajactories for visualization
49#################################################
50/tracking/storeTrajectory 1
51
52#######################################################
53# Visualization with the OGLSX (OpenGL Stored X) driver
54#######################################################
55
56# Invoke the OGLSX driver
57/vis/open OGLSX
58
59# Create an empty scene and add the detector geometry to it
60/vis/drawVolume
61
62# Add trajectories to the current scene
63#  Note: This command is not necessary in exampleN03,
64#        since the C++ method DrawTrajectory() is
65#        described in the event action.
66#/vis/scene/add/trajectories
67
68# Set viewing parameters
69#  viewpoint  : (theta,phi) = (10*deg, 10*deg).
70#  drawing style: surface
71/vis/viewer/reset
72/vis/viewer/set/style surface
73/vis/viewer/set/viewpointThetaPhi   10  10
74
75# Generate one event and visualize it.
76/run/beamOn  1
77
78
79##########################################################
80# Visualization 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# Create an empty scene and add the detector geometry to it
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 the trajectory-accumulation mode to "accumulate".
103#  Trajectories of each event are accumulated
104#  and visualized at the end of one run.
105/vis/scene/endOfEventAction    accumulate
106
107# Visualize many events (bird's eye view)
108#  viewpoint  : (theta,phi) = (45*deg, 45*deg)
109#  zoom factor: 1.5 x (full screen size)
110#  drawing style: wireframe
111/vis/viewer/reset
112/vis/viewer/set/style  wireframe
113/vis/viewer/set/viewpointThetaPhi   45 45
114/vis/viewer/zoom        1.5
115/run/beamOn             50
116
117# Visualize many events (zoomed-up view)
118#  viewpoint  : (theta,phi) = (90*deg, 0)
119#  zoom factor: 5 x (full screen size)
120/vis/viewer/reset
121/vis/viewer/set/style  wireframe
122/vis/viewer/set/viewpointThetaPhi   90 0
123/vis/viewer/zoom        5
124/run/beamOn             50
125
126# Reset trajectory-accumulation mode to "refresh" (default)
127#  Trajectories are visualized at the end of each event.
128/vis/scene/endOfEventAction       refresh
129</pre>
Note: See TracBrowser for help on using the repository browser.