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

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

ajout de la doc

File size: 5.9 KB
Line 
1<pre>
2#######################################################################
3# MACRO FILE NAME: exN03Vis3.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 demonstrating various drawing styles #
18# #
19# USAGE: % gmake visclean #
20# % $G4BINDIR/exampleN03 #
21# Idle> /control/execute visTutor/exN03Vis3.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/local) #
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 OGLIX (OpenGL Immediate 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# Bird-eye view of events with
69# the hidden-surface drawing style
70/vis/viewer/reset
71/vis/viewer/set/viewpointThetaPhi 45 45
72/vis/viewer/set/style surface
73/run/beamOn 10
74
75##########################################################
76# Visualization with the DAWNFILE driver
77#
78# * Each visualized view is saved to a file "g4_XX.eps"
79# with the "vectorized" PostScript format.
80#
81# * Set an environmental variable if you wish to
82# skip DAWN GUI:
83# % setenv G4DAWNFILE_VIEWER "dawn -d"
84#
85##########################################################
86
87# Invoke the DAWNFILE driver
88/vis/open DAWNFILE
89
90# Create an empty scene and add the detector geometry to it
91/vis/drawVolume
92
93# Add trajectories to the current scene
94# Note: This command is not necessary in exampleN03,
95# since the C++ method DrawTrajectory() is
96# described in the event action.
97#/vis/scene/add/trajectories
98
99# Bird-eye view of events with the
100# wireframe drawing style
101/vis/viewer/reset
102/vis/viewer/zoom 1.5
103/vis/viewer/set/viewpointThetaPhi 45 45
104/vis/viewer/set/style wireframe
105/run/beamOn 3
106
107# Set the trajectory-accumulation mode to "accumulate".
108# Trajectories of each event are accumulated
109# and visualized at the end of one run.
110/vis/scene/endOfEventAction accumulate
111
112# Bird-eye view of events with the
113# hidden-surface drawing style
114/vis/viewer/set/style surface
115/run/beamOn 50
116
117# Cull detector geometry and show only trajectories.
118/vis/viewer/reset
119/vis/viewer/set/culling global true
120/vis/viewer/set/culling density true 999
121/vis/viewer/set/style wireframe
122/run/beamOn 10
123
124# Reset the culling policy for next visualization
125# The default culling policy is:
126# global : on
127# invisible : on
128# low density : off
129# covered daughter: off
130#
131# Note: You may also use "/vis/viewer/reset"
132# for this initialization.
133/vis/viewer/set/culling density false
134
135# Reset trajectory-accumulation mode to "refresh" (default)
136# Trajectories are visualized at the end of each event.
137/vis/scene/endOfEventAction refresh
138</pre>
Note: See TracBrowser for help on using the repository browser.