source: trunk/source/interfaces/visTutor/exN03Vis2.mac@ 1118

Last change on this file since 1118 was 562, checked in by garnier, 18 years ago

r565@mac-90108: laurentgarnier | 2007-08-14 14:18:03 +0200
mise a jour suite au plantage de svk (cheksum error) suite au crash du DD en juin

File size: 5.6 KB
Line 
1#######################################################################
2# MACRO FILE NAME: exN03Vis2.mac #
3# #
4# AUTHOR(S): Satoshi Tanaka #
5# #
6# DATE: #
7# Nov 07, 2001 #
8# Sept 08-09, 2001 (at Hebden Bridge, UK) #
9# June 20, 2001 #
10# November 26, 2000 #
11# October 17, 2000 #
12# June 06, 2000 #
13# May 20, 2000 #
14# November 10, 1999 #
15# #
16# CONTENTS: A basic macro for visualization of events #
17# #
18# USAGE: % gmake visclean #
19# % $G4BINDIR/exampleN03 #
20# Idle> /control/execute visTutor/exN03Vis2.mac #
21# #
22# REQUIRED PLATFORMS & SOFTWARES: Unix, X-window, OpenGL, #
23# DAWN (version 3.85 or after) #
24# gv (Ghostview), Tcl/Tk #
25# #
26# ENVIRONMENTAL VARIABLES (C-MACROS) FOR INSTALLATION: #
27# (See geant4/source/visualization/README for details.) #
28# #
29# % setenv OGLHOME ... (e.g. /usr/X11R6) #
30# % setenv G4VIS_BUILD_OPENGLX_DRIVER 1 #
31# #
32# ENVIRONMENTAL VARIABLES (C-MACROS) FOR COMPILATION: #
33# (See geant4/source/visualization/README for details.) #
34# #
35# % setenv G4VIS_USE_OPENGLX 1 #
36# #
37# ADDITIONAL NOTES: #
38# The compound command "/vis/open <vis-driver-name>" #
39# is equivalent to the following set of commands: #
40# #
41# /vis/sceneHandler/create $1 #
42# /vis/viewer/create #
43# #
44#######################################################################
45
46#################################################
47# Store particle trajactories for visualization
48#################################################
49/tracking/storeTrajectory 1
50
51#######################################################
52# Visualization with the OGLSX (OpenGL Stored X) driver
53#######################################################
54
55# Invoke the OGLSX driver
56/vis/open OGLSX
57
58# Create an empty scene and add the detector geometry to it
59/vis/drawVolume
60
61# Add trajectories to the current scene
62# Note: This command is not necessary in exampleN03,
63# since the C++ method DrawTrajectory() is
64# described in the event action.
65#/vis/scene/add/trajectories
66
67# Set viewing parameters
68# viewpoint : (theta,phi) = (10*deg, 10*deg).
69# drawing style: surface
70/vis/viewer/reset
71/vis/viewer/set/style surface
72/vis/viewer/set/viewpointThetaPhi 10 10
73
74# Generate one event and visualize it.
75/run/beamOn 1
76
77
78##########################################################
79# Visualization with the DAWNFILE driver
80#
81# * Each visualized view is saved to a file "g4_XX.eps"
82# with the "vectorized" PostScript format.
83#
84# * Set an environmental variable if you wish to
85# skip DAWN GUI:
86# % setenv G4DAWNFILE_VIEWER "dawn -d"
87##########################################################
88
89# Invoke the DAWNFILE driver
90/vis/open DAWNFILE
91
92# Create an empty scene and add the detector geometry to it
93/vis/drawVolume
94
95# Add trajectories to the current scene
96# Note: This command is not necessary in exampleN03,
97# since the C++ method DrawTrajectory() is
98# described in the event action.
99#/vis/scene/add/trajectories
100
101# Set the trajectory-accumulation mode to "accumulate".
102# Trajectories of each event are accumulated
103# and visualized at the end of one run.
104/vis/scene/endOfEventAction accumulate
105
106# Visualize many events (bird's eye view)
107# viewpoint : (theta,phi) = (45*deg, 45*deg)
108# zoom factor: 1.5 x (full screen size)
109# drawing style: wireframe
110/vis/viewer/reset
111/vis/viewer/set/style wireframe
112/vis/viewer/set/viewpointThetaPhi 45 45
113/vis/viewer/zoom 1.5
114/run/beamOn 50
115
116# Visualize many events (zoomed-up view)
117# viewpoint : (theta,phi) = (90*deg, 0)
118# zoom factor: 5 x (full screen size)
119/vis/viewer/reset
120/vis/viewer/set/style wireframe
121/vis/viewer/set/viewpointThetaPhi 90 0
122/vis/viewer/zoom 5
123/run/beamOn 50
124
125# Reset trajectory-accumulation mode to "refresh" (default)
126# Trajectories are visualized at the end of each event.
127/vis/scene/endOfEventAction refresh
Note: See TracBrowser for help on using the repository browser.