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.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]
1 =========================================================
2 Geant4 - an Object-Oriented Toolkit for Simulation in HEP
3 =========================================================
4
5 examples/extended/visualization/movies
6 --------------------------------------
7
8 This example illustrates how to create a movie.
9
10 See https://geant4-userdoc.web.cern.ch/UsersGuides/ForApplicationDeveloper/html/Visualization/makingamovie.html#.
11
12 A) USING /vis/viewer/save AND /vis/viewer/interpolate
13 =====================================================
14
15 1) a) To see a pre-prepared example, start this example in interactive mode
16 (i.e., without any command line arguments). Just type
17 /vis/viewer/interpolate viewfiles/movie-1
18 If you want to see an electromagnetic shower
19 /run/beamOn
20 /vis/viewer/interpolate viewfiles/movie-1
21
22 b) To make your own movie, save a sequence of views with
23 "/vis/viewer/save". Then "fly through" with "/vis/viewer/interpolate".
24
25 The procedure is: choose a view, save, choose another view, save, and
26 so on until you have, say, 10 saved views. Then you may
27 /vis/viewer/interpolate
28
29 Note: This saves views to your current working directory. It is
30 always good to remove any pre-existing saved files:
31 rm *.g4view
32 or save them, e.g.
33 mkdir views
34 mv *.g4view views
35 which can subsequently be interpolated with
36 /vis/viewer/interpolate views
37
38 c) Then you have a choice of how to export the movie - see 3 below.
39
40 2) You can use time-slicing to see particles progress through time
41
42 a) To see a pre-prepared example
43 /vis/modeling/trajectories/drawByCharge-0/default/setTimeSliceInterval 0.01 ns
44 /run/beamOn
45 /vis/viewer/interpolate viewfiles/movie-2
46
47 b) To make your own movie
48 /vis/scene/add/trajectories rich
49 /vis/modeling/trajectories/drawByCharge-0/default/setTimeSliceInterval 0.01 ns
50 # Optionally add features (see guidance on /vis/viewer/set/timeWindow/)
51 /vis/viewer/set/timeWindow/displayLightFront true 0 0 -20 cm -0.01 ns
52 /vis/viewer/set/timeWindow/displayHeadTime true
53 /vis/viewer/set/timeWindow/fadeFactor 1
54 /run/beamOn
55 # Then set a time window and save
56 /vis/viewer/set/timeWindow/startTime 0 ns .1 ns
57 /vis/viewer/save
58 # Then zoom, pan etc to a view of interest
59 # Then set the next time window and save
60 /vis/viewer/set/timeWindow/startTime .5 ns .1 ns
61 /vis/viewer/save
62 # Then zoom, pan etc to a view of interest
63 # Then set the next time window and save
64 /vis/viewer/set/timeWindow/startTime 1 ns .1 ns
65 /vis/viewer/save
66 # Then another view, the next time window, and a save...
67 # ...repeat a few more times
68 # Then try
69 /vis/viewer/interpolate
70
71 3) How to export images using /vis/viewer/interpolate (OpenGL only)
72 /vis/viewer/interpolate ! ! ! ! export
73 This produces lots of files.
74 You can change export format with (for example)
75 /vis/ogl/set/exportFormat jpg
76 Then import them into your favourite movie maker - see
77 https://geant4-userdoc.web.cern.ch/UsersGuides/ForApplicationDeveloper/html/Visualization/makingamovie.html#
78
79 B) THE OLD WAY
80 ==============
81
82 These files are inherited from the old "novice" example N03. They draw (and
83 optionally, save) views using a macro loop. They have not been tested
84 recently. Best to run in batch mode in the build directory. E.g.
85
86 ./movies -m visTutor/exN03Vis12.mac
87 ./movies -m visTutor/exN03Vis13.mac
88
89
90 John Allison
91 15th February 2021