Visualisation and (G)UI

Slides:



Advertisements
Similar presentations
User Interface The full set of lecture notes of this Geant4 Course is available at
Advertisements

Geant4 v9.2p02 User Interface I Makoto Asai (SLAC) Geant4 Tutorial Course.
User Interface I Makoto Asai (SLAC) Geant4 Tutorial Course Geant4 v8.3.
Introduction to Geant4 Visualization
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 18 th, 2002 Getting Started.
Geant4 User Interface Overview Geant4 Mini-Tutorial Hebden Bridge 15 September 2007 Joseph Perl, SLAC (mostly stolen from a talk by Makoto Asai)
Geant4 v9.4 User Interface I Makoto Asai (SLAC) Geant4 Tutorial Course.
12 May 2007 J. Perl Future Plans for Geant4 Visualization 1 HepRep/HepRApp DAWN OpenGL Future Plans for Geant4 Visualization What’s Planned for the Next.
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 18 th, 2002 Getting Started.
Geant4 Visualization Review
12 May 2007 Geant4 Visualization Commands J. Perl 1 DAWN OpenGL Geant4 Visualization Commands Basic Visualization Commands Joseph Perl, SLAC HepRep/HepRApp.
User Commands Makoto Asai (SLAC) Geant4 Users SLAC Feb. 19th, 2002.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Abstraction: Polymorphism, pt. 1 Abstracting Objects.
Software Installation The full set of lecture notes of this Geant4 Course is available at
Chapter 3 Introduction to Event Handling and Windows Forms Applications.
(G)UI status and developments Geant4 Workshop at CERN Oct. 02, 2002 Hajime Yoshida.
G.Barrand, LAL-Orsay Geant4 and interactive frameworks.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
Visualisation and (G)UI Authors: Hajime Yoshida and Satoshi Tanaka.
Chapter 8: Writing Graphical User Interfaces
1 k Jarek Rossignac,  2008 Processing  Install Processing  Learn how to edit, run, save, export, post programs  Understand.
S. Guatelli, CPS Innovations, Knoxville, 13 th -21 st January Brachytherapy exercise.
Maria Grazia Pia Detector Response Acknowledgements: A. Lechner, J. Apostolakis, M. Asai, G. Cosmo, A. Howard.
S. Guatelli, M.G Pia, INFN Genova G. Cosmo, S. Guatelli, M.G Pia Salamanca, July 2002
Geant4 Visualization 1 OpenGL DAWN VRML. Visualization Visualization Seeing what one does usually helps One can visualize geometry, hits, trajectories.
UI command Makoto Asai (SLAC) Geant4 Tutorial CERN May 25-27, 2005 May 2005, Geant4 v7.0p01.
User Application Luciano Pandola INFN-LNGS Partially based on a presentation by Maria Grazia Pia (INFN-Ge)
7 June 2005 Visualization & GGE Demo J. Perl 1 HepRep/WIRED DAWN OpenGL Geant4 Visualization & GGE Demo Joseph Perl, SLAC.
Chapter 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
12 October 2006 G4Vis: Status, New Features and Issues 1 HepRep/WIRED DAWN OpenGL G4Vis: Status, New Features and Issues Geant4 Collaboration Workshop.
Program 2 due 02/01  Be sure to document your program  program level doc  your name  what the program does  each function  describe the arguments.
Maria Grazia Pia INFN Genova Salamanca, July 2002
C++ / G4MICE Course Session 5 Materials in G4MICE Units in G4MICE Visualisation in G4MICE G4MICE Modelling.
Chapter 5 Introduction to Defining Classes
May 20, 2005Wah-kai Ngai1 Basic Visualization Tutorial Using Geant4.
Creating a Java Application and Applet
Geant4 examples Sébastien Incerti On behalf of the Geant4 collaboration with special thanks to Luciano Pandola, INFN.
17-19 Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan 2007 Geant4 Collaboration.
Makoto Asai (SLAC) Getting Started MGP: added class diagram of basic user application.
Objects and Classes Start on Slide 30 for day 2 Java Methods A & AB Object-Oriented Programming and Data Structures Maria Litvin ● Gary Litvin Much of.
Visualisation, (G)UI and Analysis The full set of lecture notes of this Geant4 Course is available at
June 4-8, G4 Paris Visualization II P. Gueye/J. Perl 1 DAWN OpenGL Geant4 Visualization Commands Basic Visualization Commands Paul Guèye, HU Courtesy:
Chapter 5 Introduction to Defining Classes Fundamentals of Java.
Starting with an example PART I Set your environment up and get a Geant4 example.
Microsoft Foundation Classes MFC
Chapter 3 Syntax, Errors, and Debugging
Chapter 1: An Introduction to Visual Basic 2015
Looking at our “Getting Started” application
A C++ generic model for the GLAST Geometric Description
The full set of lecture notes of this Geant4 Course is available at
Chapter 3: Using Methods, Classes, and Objects
Programming Language Concepts (CIS 635)
Java Programming: Guided Learning with Early Objects
Basics of a user application
User Interface
Geant4 Visualization Commands
Social Media And Global Computing Introduction to Visual Studio
Introduction to Python
The full set of lecture notes of this Geant4 Course is available at
Makoto Asai (SLAC) Geant4 Users CERN Nov. 11th, 2002
Visualisation, (G)UI and Analysis
Makoto Asai (SLAC) Geant4 Tutorial Course
Software Installation
Geant4 Workshop, CERN - 1 October 2002 Joseph Perl
Polymorphism Professor Hugh C. Lauer CS-2303, System Programming Concepts (Slides include materials from The C Programming Language, 2nd edition, by Kernighan.
Chapter 7 –Implementation Issues
Visualization Status/Development
Visualisation and (G)UI
Presentation transcript:

Visualisation and (G)UI http://geant4.cern.ch

PART I Geant4 visualisation

Visualization & (G)UI - Geant4 Course 1. Introduction Geant4 Visualisation must respond to varieties of user requirements Quick response to survey successive events Impressive special effects for demonstration High-quality output to prepare journal papers Flexible camera control for debugging geometry Highlighting overlapping of physical volumes Interactive picking of visualised objects … Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 2. Visualisable Objects (1) Simulation data you may like to see: Detector components A hierarchical structure of physical volumes A piece of physical volume, logical volume, and solid Particle trajectories and tracking steps Hits of particles in detector components Visualisation is performed either with commands (macro or interactive) or by writing C++ source codes of user-action classes Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 2. Visualisable Objects (2) You can also visualize other user-defined objects such as: A polyline, that is, a set of successive line segments (example: coordinate axes) A marker which marks an arbitrary 3D position (example: eye guides) Text character strings for description comments or titles … Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 3. Visualization Attributes Necessary for visualization, but not included in geometrical information Colour, visibility, forced-wireframe style, etc A set of visualisation attributes is held by the class G4VisAttributes A G4VisAttributes object is assigned to a visualisable object (e.g. a logical volume) with its method SetVisAttributes() : myVolumeLogical ->SetVisAttributes (G4VisAttributes::Invisible) Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 3.2 Visibility A boolean flag (G4bool) to control the visibility of objects Access function G4VisAttributes::SetVisibility (G4bool visibility) If false is given as argument, visualization is skipped for objects for which this set of visualization attributes is assigned. The default value of visibility is true. Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 3.3 Colour (1) Class G4VisAttributes holds its colour entry as an instance of class G4Colour G4Colour is instantiated by giving RGB components to its constructor: G4Colour::G4Colour(G4double r = 1.0, G4double g = 1.0, G4double b = 1.0 ) The default arguments define “white” color For instance: G4Color red(1.0, 0.0, 0.0); G4Color blue(0.0, 0.0, 1.0); G4Color yellow(1.0, 1.0, 0.0); Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 3.3 Colour (2) A colour can be set in a G4VisAtttributes object via the functions of G4VisAttributes SetColour(const G4Colour& colour) SetColour( G4double r , G4double g , G4double b) Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 3.4 Assigning G4VisAttributes to a logical volume Class G4LogicalVolume holds a pointer of G4VisAttributes Access functions of G4LogicalVolume SetVisAttributes ( const G4VisAttributes* pva ) For instance: G4Colour brown(0.7, 0.4, 0.1); G4VisAttributes* copperVisAttributes = new G4VisAttributes(brown); copper_liquid_log ->SetVisAttributes(copperVisAttributes); logical volume Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 4. Polyline and Marker Polyline and marker are defined in the graphics_reps category They are available to model 3D scenes for visualization Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 4.1 Polyline A set of successive line segments Defined with a class G4Polyline Used to visualize tracking steps, particle trajectories, coordinate axes, etc G4Polyline is defined as a list of G4Point3D objects. Elements of the list define vertex positions of a polyline. Visualization & (G)UI - Geant4 Course

Example C++ code for polyline: //-- C++ source code: An example of defining a line segment // Instantiation G4Polyline x_axis; // Vertex positions x_axis.append ( G4Point3D ( 0., 0., 0.) ); x_axis.append ( G4Point3D ( 5. * cm, 0., 0.) ); // Color G4Colour red ( 1.0, 0.0, 0.0 ); G4VisAttributes att ( red ); x_axis.SetVisAttributes( att ); //-- end of C++ source code Create a polyline Define the points of the polyline Set the visualization attributes of the polyline Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 4.2 Marker (1) Set a mark to an arbitrary 3D position Usually used to visualize hits of particles Designed as a 2-dimensional primitive with shape (square, circle, text), color. Set marker properties with SetPosition( const G4Point3D& ) SetWorldSize( G4double real_3d_size ) SetScreenSize( G4double 2d_size_pixel ) Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 4.2 Marker (2) Kinds of markers Square : G4Square Circle : G4Circle Text : G4Text Constructors G4Circle (const G4Point3D& pos) G4Square (const G4Point3D& pos) G4Text (const G4String& text, const G4Point3D& pos) Visualization & (G)UI - Geant4 Course

Example C++ code for marker: G4Point3D position(0,0,0); G4Circle circle(position); // Instantiate a circle with its 3D position. The // argument "position" is defined as G4Point3D instance circle.SetScreenDiameter(1.0); circle.SetFillStyle (G4Circle::filled); // Make it a filled circle G4Colour colour(1.,0.,0.); G4VisAttributes attribs(colour); // Define a red visualization attribute circle.SetVisAttributes(attribs); // Assign the red end of C++ source code Create a circle in a given position Set diameter and style Set colour and vis attributes Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 5. Visualisation Drivers Visualization drivers are interfaces of Geant4 to 3D graphics software You can select your favorite one(s) depending on your purposes such as Demo Preparing precise figures for journal papers Publication of results on Web Debugging geometry Etc. Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 5.1 Available Graphics Software Geant4 provides several visualization drivers tailored to different purposes: DAWN : Technical High-quality PostScript output OPACS: Interactivity, unified GUI OpenGL: Quick and flexible visualisation OpenInventor: Interactivity, virtual reality, etc RayTracer : Photo-realistic rendering VRML: Interactivity, 3D graphics on Web ... Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 5.2 Available Visualisation Drivers DAWN  Fukui Renderer DAWN OPENGLX  OpenGL with Xlib HepRep  HepRep graphics OIX  OpenInventor with Xlib RayTracer  JPEG files VRML  VRML 1.0/2.0 etc Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 5.3 How to Use Visualization Drivers Visualization should be switched on using the variable G4VIS_USE You can select/use visualisation driver(s) by setting environmental variables before compilation, according to what is installed on your computer: setenv G4VIS_USE_DRIVERNAME 1 Example (DAWN, OpenGLXlib, and VRML drivers): setenv G4VIS_USE_DAWN 1 setenv G4VIS_USE_OPENGLX 1 setenv G4VIS_USE_VRML 1 Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 6. main() Function (1) To have a Geant4 executable able to handle visualization, you have two choices: Instantiate and initialize your own Visualization Manager in the main(). It must inherit by G4VisManager and implement the void RegisterGraphicSystem() method (Easiest) To use the ready-for-the-use G4VisExecutive class available in Geant4. It must be instantiated and initialized in the main() program ( see next slide) Visualization & (G)UI - Geant4 Course

6. main() Function (2) Includes the G4VisExecutive class //----- C++ source codes: Instantiation and initialization of G4VisManager in main() #include "G4VisExecutive.hh“ // Instantiation and initialization of the Visualization Manager #ifdef G4VIS_USE G4VisManager* visManager = new G4VisExecutive; visManager -> initialize(); #endif delete visManager; Includes the G4VisExecutive class Instantiate and initialize the Visualization Manager if G4VIS_USE is “true” Don’t forget to delete the pointer to G4VisExecutive at the end of main() Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 7. Visualisation commands There are some frequently-used built-in visualization commands in Geant4, that you may like to try Geant4 executable in this tutorial is compiled incorporating DAWN, OpenGL and VRML drivers setenv G4VIS_USE_DAWN 1 setenv G4VIS_USE_OPENGLX 1 setenv G4VIS_USE_VRML 1 Visualization & (G)UI - Geant4 Course

7.1 An example of commands to visualize a detector /vis/open OGLIX # or /vis/open DAWNFILE /vis/viewer/reset /vis/viewer/viewpointThetaPhi 70 20 /vis/viewer/set/style wireframe /vis/drawVolume /vis/viewer/flush create a scene handler and a viewer set vis options set the detector geometry as object to visualize, and registers it close visualization These commands can be given interactively or executed via macro (e.g. vis1.mac of N03) Visualization & (G)UI - Geant4 Course

7.2 An Example of Visualizing Events Store particle trajectories for visualization /tracking/storeTrajectory /vis/open DAWNFILE … /vis/scene/create /vis/scene/add/volume /vis/scene/add/trajectories /run/beamOn 10 Scene handler and viewer for DAWN Optional settings (viewpoint, axes, etc.) Creates an empty scene Adds world volumes and trajectories to the scene Shoots events (end of visualization) Again, commands can executed via macro (e.g. vis2.mac of example N03) or interactively Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 7.3 /vis/open command Command Idle> /vis/open <driver_tag_name> The “driver_tag_name” is the driver’s name Example: Creating the OPENGLX driver in the immediate mode: Idle> /vis/open OGLIX How to list available driver_tag_name Idle> help /vis/open or Idle> help /vis/sceneHandler/create Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 7.4 /vis/viewer/… commands Commands Viewpoint setting Idle> /vis/viewer/viewpointThetaPhi <theta_deg> <phi_deg> Zooming Idle> /vis/viewer/zoom <scale_factor> Initialization of camera parameters Idle> /vis/viewer/reset Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 7.5 /vis/drawVolume and /vis/viewer/flush commands Commands: Idle> /vis/drawVolume <physical-volume-name> (Default: world) Idle> /vis/viewer/flush Note that /vis/viewer/flush should be executed to declare end of visualisation. You can draw a specific volume (rather than the full geometry) You can add visualization commands of, say, coordinate axes. For example, Idle> /vis/scene/add/axes <Ox> <Oy> <Oz> <length> <unit> Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 7.6 Commands to Visualize Events Commands Idle> /tracking/storeTrajectory 1 Idle> /vis/scene/add/trajectories Idle> /run/beamOn <number_of_events> Action: Automatic visualization of events Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course Sample Visualization (1) Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course Sample Visualization (2) Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course Sample Visualization (3) Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 8. Visualisation from C++ code It is also possible to hard-code visualization commands in the C++ code (personally, I’d discourage it) You can describe the visualization commands in C++ codes via the ApplyCommand() method of the UI manager, as for any other command: G4UImanager::GetUIpointer() ->ApplyCommand(“/vis/…”); Alternatively, you can use Draw() methods of visualizable classes myPolyline->Draw(); Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 9. Information Geant4 User Guide (and source codes) README file: geant4/source/visualisation/README On-line documentation on Geant4 visualisation http://cern.ch/geant4/G4UsersDocuments/UsersGuides/ForApplicationDeveloper/html/Visualization Visualization & (G)UI - Geant4 Course

PART II Geant4 (G)UI

Visualization & (G)UI - Geant4 Course Steering the simulation (1) A Geant4 simulation can be steered in three ways: everything hard-coded in the C++ source (also the number of events to be shot). You need to re-compile for any change (not very smart!) batch session (via a ASCII macro) commands captured from an interactive session Visualization & (G)UI - Geant4 Course 1

Steering the simulation (2) Setting up batch mode (namely, read commands from a macro file) in the main() G4UImanager* UI = G4UImanager::GetUIpointer(); G4String command = “/control/execute”; G4String fileName = argv[1]; UI->applyCommand(command+fileName); Your executable can be run as myExecutable mymacro.mac To execute a macro interactively: /control/execute mymacro.mac takes the first argument after the executable as the macro name and runs it Visualization & (G)UI - Geant4 Course 1

Steering the simulation (3) Setting up interactive mode is also easy – but there are many choices of interface All of them must be derived from the abstract class G4UIsession Geant4 provides several implementations In the main(), according to the computer environments, construct a G4UIsession concrete class provided by Geant4 and invoke its SessionStart() method Visualization & (G)UI - Geant4 Course 1

An exemple of interactive session For instance: in the main() G4UIsession* session=0; if (argc==1) { session = new G4UIterminal; session->SessionStart(); delete session; } Create a (null) pointer to the base session class If there are no arguments after the executable, starts an interactive session Define the session as a dumb terminal, and starts it Don’t forget to delete it Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course Select (G)UI Geant4 provides several interfaces for various (G)UI: G4UIterminal: C-shell like character terminal G4UItcsh: tcsh-like character terminal with command completion, history, etc G4UIGAG: Java based graphic UI (GUI) G4UIXm: Motif-based GUI, command completion Define and invoke them like G4UIterminal session = new G4UIGAG(); session->StartSession(); Note for G4UItcsh, it must be defined as session = new G4UIterminal (new G4UItcsh); Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course Environmental variables Users can select and plug in (G)UI by setting environmental variables before compilation, similar to what seen for visualization drivers setenv G4UI_USE_GUINAME Example: setenv G4UI_USE_TERMINAL 1 (default) setenv G4UI_USE_GAG 1 setenv G4UI_USE_XM 1 Visualization & (G)UI - Geant4 Course

User interface choices G4UIterminal – C-shell-like character terminal runs on all Geant4-supported platforms G4UItcsh – tcsh-like character terminal with command completion, history, etc. runs only on Solaris and Linux G4UIXm, G4UIXaw, G4UIXWin32 – G4UIterminal implemented over Motif, Athena and WIN32 libraries runs on Unix/linux and Windows, respectively G4UIGAG – Java-based GUI runs on all Geant4 platforms Visualization & (G)UI - Geant4 Course 1

Useful GUI Tools Released by Geant4 Developers GGE: Geometry editor based on Java GUI http://erpc1.naruto-u.ac.jp/~geant4 GPE: Physics editor based on Java GUI OpenScientist: interactive environment for analysis http://www.lal.in2p3.fr/OpenScientist Visualization & (G)UI - Geant4 Course 1

Build-it user commands Geant4 provides a number of general-purpose user interface commands which can be used: interactively via a (G)UI Idle> /run/setCut [value] [unit] in a macro file within C++ code using the ApplyCommand() method of G4UImanager G4UImanager::GetUIpointer() ->ApplyCommand(“/run/setCut 1 cm”); A complete list of built-in commands is available in the Geant4 Application Developers Guide, Chapter 7.1 Visualization & (G)UI - Geant4 Course 1

User-defined commands (1) If built-in commands are not enough, you can make your own (e.g. change at run-time parameters of primary generator, etc.) Geant4 provides several command classes, all derived from G4UIcommand, according to the type of argument they take G4UIcmdWithoutParameter G4UIcmdWithABool G4UIcmdWithADouble G4UIcmdWithADoubleAndUnit ... Visualization & (G)UI - Geant4 Course

User-defined commands (2) Commands have to be defined in messenger classes, that inherit from G4UImessenger Define the command in the constructor: G4UIcmdWithADoubleAndUnit* fThetaCmd = new G4UIcmdWithADoubleAndUnit ("/prim/angle",this); fThetaCmd->SetGuidance(“Opening angle of the source"); fThetaCmd->SetDefaultUnit("deg"); fThetaCmd->SetUnitCandidates(“deg rad”); Delete the command in the destructor Command taking as argument a double and a unit, called /prim/angle Sets guidance, default unit, etc. Visualization & (G)UI - Geant4 Course

User-defined commands (3) Define the action of the command in the SetNewValue() method of the messenger: void MyMessenger::SetNewValue (G4UIcommand* cmd,G4String string) { if (cmd == fThetaCmd) G4double value = fThetaCmd ->GetNewDoubleValue(string); ...->DoSomething(value); } Retrieve a G4double value from the (string) argument given to the command Use the value in the way it is needed (e.g. pass it to other classes: opening angle for primary generator) Visualization & (G)UI - Geant4 Course

PART III Summary

Visualization & (G)UI - Geant4 Course Summary Geant4 can be used to visualize set-ups, tracks and other objects (e.g. axes, markers) A number of visualization drivers is available, each with its pros and cons Visualization can be controlled interactively or by macro, using Geant4 built-in commands Interactive sessions where user can give commands by keyboard can be used (from dumb terminals to graphic interfaces) A number of general-purpose commands are provided by Geant4, but users can define more, according to their needs  flexibility! Visualization & (G)UI - Geant4 Course

PART IV Backup

Visualization & (G)UI - Geant4 Course 7.1 Scene, Scene Hander, Viewer In order to use visualization commands, let’s define “scene”, “scene handler”, and “viewer”: Scene: A set of visualizable 3D data (e.g. a geometry, a polyline, etc.) Scene handler: Computer Graphics data modeler, which uses raw data in a scene Viewer: Image generator Each scene handler is assigned to a scene Each viewer is assigned to a scene handler “visualisation driver” = “scene_handler” + “viewer” Visualization & (G)UI - Geant4 Course

7.2 Logical steps of Visualization Step 1: Create a scene handler and a viewer Step 2: Create an empty scene Step 3: Set camera parameters, drawing style, etc. [Optional] Step 4: Add 3D data to the created scene Step 5: Attach the current scene handler to the current scene Step 6: Make the viewer execute visualisation Step 7: Declare the end of visualization You can do all that interactively or using a macro (see next slide) Visualization & (G)UI - Geant4 Course

Visualization & (G)UI - Geant4 Course 7.5 /vis/viewer/set/style command Command Idle> /vis/viewer/set/style <style_name> The “style_name” can be “wireframe” or “surface” Visualization & (G)UI - Geant4 Course