Warning, /geant4/examples/extended/visualization/movies/README is written in an unsupported language. File is not indexed.
0001 =========================================================
0002 Geant4 - an Object-Oriented Toolkit for Simulation in HEP
0003 =========================================================
0004
0005 examples/extended/visualization/movies
0006 --------------------------------------
0007
0008 This example illustrates how to create a movie.
0009
0010 See https://geant4-userdoc.web.cern.ch/UsersGuides/ForApplicationDeveloper/html/Visualization/makingamovie.html#.
0011
0012 A) USING /vis/viewer/save AND /vis/viewer/interpolate
0013 =====================================================
0014
0015 1) a) To see a pre-prepared example, start this example in interactive mode
0016 (i.e., without any command line arguments). Just type
0017 /vis/viewer/interpolate viewfiles/movie-1
0018 If you want to see an electromagnetic shower
0019 /run/beamOn
0020 /vis/viewer/interpolate viewfiles/movie-1
0021
0022 b) To make your own movie, save a sequence of views with
0023 "/vis/viewer/save". Then "fly through" with "/vis/viewer/interpolate".
0024
0025 The procedure is: choose a view, save, choose another view, save, and
0026 so on until you have, say, 10 saved views. Then you may
0027 /vis/viewer/interpolate
0028
0029 Note: This saves views to your current working directory. It is
0030 always good to remove any pre-existing saved files:
0031 rm *.g4view
0032 or save them, e.g.
0033 mkdir views
0034 mv *.g4view views
0035 which can subsequently be interpolated with
0036 /vis/viewer/interpolate views
0037
0038 c) Then you have a choice of how to export the movie - see 3 below.
0039
0040 2) You can use time-slicing to see particles progress through time
0041
0042 a) To see a pre-prepared example
0043 /vis/modeling/trajectories/drawByCharge-0/default/setTimeSliceInterval 0.01 ns
0044 /run/beamOn
0045 /vis/viewer/interpolate viewfiles/movie-2
0046
0047 b) To make your own movie
0048 /vis/scene/add/trajectories rich
0049 /vis/modeling/trajectories/drawByCharge-0/default/setTimeSliceInterval 0.01 ns
0050 # Optionally add features (see guidance on /vis/viewer/set/timeWindow/)
0051 /vis/viewer/set/timeWindow/displayLightFront true 0 0 -20 cm -0.01 ns
0052 /vis/viewer/set/timeWindow/displayHeadTime true
0053 /vis/viewer/set/timeWindow/fadeFactor 1
0054 /run/beamOn
0055 # Then set a time window and save
0056 /vis/viewer/set/timeWindow/startTime 0 ns .1 ns
0057 /vis/viewer/save
0058 # Then zoom, pan etc to a view of interest
0059 # Then set the next time window and save
0060 /vis/viewer/set/timeWindow/startTime .5 ns .1 ns
0061 /vis/viewer/save
0062 # Then zoom, pan etc to a view of interest
0063 # Then set the next time window and save
0064 /vis/viewer/set/timeWindow/startTime 1 ns .1 ns
0065 /vis/viewer/save
0066 # Then another view, the next time window, and a save...
0067 # ...repeat a few more times
0068 # Then try
0069 /vis/viewer/interpolate
0070
0071 3) How to export images using /vis/viewer/interpolate (OpenGL only)
0072 /vis/viewer/interpolate ! ! ! ! export
0073 This produces lots of files.
0074 You can change export format with (for example)
0075 /vis/ogl/set/exportFormat jpg
0076 Then import them into your favourite movie maker - see
0077 https://geant4-userdoc.web.cern.ch/UsersGuides/ForApplicationDeveloper/html/Visualization/makingamovie.html#
0078
0079 B) THE OLD WAY
0080 ==============
0081
0082 These files are inherited from the old "novice" example N03. They draw (and
0083 optionally, save) views using a macro loop. They have not been tested
0084 recently. Best to run in batch mode in the build directory. E.g.
0085
0086 ./movies -m visTutor/exN03Vis12.mac
0087 ./movies -m visTutor/exN03Vis13.mac
0088
0089
0090 John Allison
0091 15th February 2021