May 20, 2005Wah-kai Ngai1 Basic Visualization Tutorial Using Geant4.

Slides:



Advertisements
Similar presentations
2D Graphics Drawing Things. Graphics In your GUI, you might want to draw graphics E.g. draw lines, circles, shapes, draw strings etc The Graphics class.
Advertisements

COLOR and Light February 6, 2014.
Light & APPLICATIONS OF Optics
Chapter 2: Section 2 Visible light and Color
Light and Color. Light interacting with matter When light hits matter, at least one of three things can happen: – Reflection When light bounces off an.
© red ©
Informationsteknologi Monday, October 29, 2007Computer Graphics - Class 21 Today’s class Graphics programming Color.
Color Chapter 28.
ROY G BIV The natural light that we see coming from the sun is generally perceived as white light. But we have all seen colored light in the form of a.
And Elvis said ……… ……Let there be Light The Visible Spectrum.
Objective Understand concepts used to create digital graphics. Course Weight : 15% Part Three : Concepts of Digital Graphics.
Visualisation and (G)UI Authors: Hajime Yoshida and Satoshi Tanaka.
Tuesday, Nov 9th 9:30-12:30 –Visualization attributes –Physics processes 14:00-17:00 –Kinematics and event generation (from yesterday) Particle gun –Boolean.
Wave Interactions Chapter 18. Properties of Waves Reflection – ability of a wave to bounce off a surface it cannot pass through –Angle of Incidence –
Geant4 Visualization 1 OpenGL DAWN VRML. Visualization Visualization Seeing what one does usually helps One can visualize geometry, hits, trajectories.
Homework Assignment You are going to research any artist of your choosing from any time period or genre. You are going to complete a one page double- spaced.
INTRO TO LIGHT. Learning Scale 4 – Design an experiment to show how waves move at different speeds through different materials. 3 – Explain why waves.
Light and Color Section 4. Light and Matter When light strikes any matter it can interact with matter in 3 different ways: It can be: reflected, absorbed.
18.4 Color Section Part 2 Note Presentations continued with video...
Color & Light Benjamin Hammel image by refeia
Aim: Explain the difference between primary, secondary and complementary colors of light as well as pigments ? OBJ: Given notes and activity sheet SWBAT.
Light and Color. Light interacting with matter When light hits matter, at least one of three things can happen: Reflection When light bounces off an object.
Light and Color There are 3 primary colors of light RED, GREEN, & BLUE
Color White is the combination of all colors. Spectrum Sunlight can be split into its component colors Called the color spectrum (Roy G. Biv)  Red 
Colors of Pigment The primary colors of pigment are magenta, cyan, and yellow. [
R O Y G B V ellowreenrangelueiolet LONG SHORT ed low energy high energy.
Lesson 2. Review - Energy in a Wave A wave is a disturbance that transfers energy from one point to another without transferring matter. In a water wave,
Elements of Design 1.02 Investigate Design Principles and Elements.
Visualisation, (G)UI and Analysis The full set of lecture notes of this Geant4 Course is available at
17-19 Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan 2007 Geant4 Collaboration.
Light Into Video U7oOI.
Mixing Colors Chapter Notes. White Light Recall that when the frequencies of all visible light is mixed together, it produces white White also.
 There are 3 primary colors of light RED, GREEN, & BLUE  When these colors of light are mixed… White Light is produced  This process is called color.
The Element of COLOR. Color A visual perception created by the spectrum of light. COLOR IS.
Coleen Hill K-2 Students. What color do you think light is?
Java Applets Getting Started. Import Files In order to run the applet properly, we have to import some files into our class. These files are: –import.
Crazy colors By teacher john. Basic colors! White Black red blue Light green yellow orange purple Grey Light blue green.
BEGINNER PROGRAMMING LESSON
LIGHT, COLOR, AND WAVE INTERACTION.
Analysis Frame for MC data
Color.
Visualisation and (G)UI
LIGHT & COLOR.
Notes 22.3: Using Color.
18.1: Light Key concepts: What happens to the light that strikes an object? What determines the color of an opaque, transparent, or translucent object?
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
Basic Graphics Drawing Shapes 1.
Unit 4 Waves Properties of Light.
How would you describe the color RED to a person who cannot see?
The full set of lecture notes of this Geant4 Course is available at
Colour Theories.
Colours.
Visualisation, (G)UI and Analysis
CSE 113 A January 26 – 30, 2009.
How to use Visualization Attributes for GaussVis
Two ways to discuss color 1) Addition 2) Subtraction
Color Systems and Color Wheels
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
Light Intro Video
What Color is it?.
January 26 – 30, 2009 CSE 113 B.
Light and Waves What causes a wave disturbance?
Wave Interactions Wave Interaction
Bell Work: Spring Break
Chapter 3 – Light 3.1 Light and Color.
Ch Light II. Light and Color (p ) Light and Matter
Created for CVCA Physics by Dick Heckathorn 31 May 2K+4
Created By Dick Heckathorn 25 June 2K+3
Created for CVCA Physics by Dick Heckathorn 31 May 2K+4
Light and Color Section 4.
Presentation transcript:

May 20, 2005Wah-kai Ngai1 Basic Visualization Tutorial Using Geant4

May 20, 2005Wah-kai Ngai2 Why visualize? Debugging geometry Demonstration purpose Interactive picking of visualized objects For fun………

May 20, 2005Wah-kai Ngai3 What can you visualize? Detector components Physical volumes Particle trajectories Hits of particles in detector components

May 20, 2005Wah-kai Ngai4 Things you need to do Choose a visualization driver –OpenGL, HepRepFile, DAWN –They have different limitations and advantages. I use OpenGL personally because of its speed No matter which one you use, the following procedures are the same

May 20, 2005Wah-kai Ngai5 Things you need to do Register the drivers, see novice examples N02, –../examples/novice/N02/include/ExN02VisManage r.hh –../examples/novice/N02/src/ExN02VisManager.cc Basically, just copy the code and change some words to make it run

May 20, 2005Wah-kai Ngai6 Things you need to do Add attributes to the detector components you want to visualize Visualization attributes are a set of information associated with objects which can be visualized

May 20, 2005Wah-kai Ngai7 Color G4VisAttributes holds its color entry as an object of the class G4Colour A G4Colour object is created by giving the red, blue and green components of the color G4Color( G4double red=1.0,G4double green=1.0,G4double blue=1.0, G4double a=1.0); The default value of each component is 1, which means white

May 20, 2005Wah-kai Ngai8 Color G4Colour white (); // white G4Colour white(1.,1.,1.); // white G4Colour gray(.5,.5,.5);// gray G4Colour black(0.,0.,0.);// black G4Colour red(1.,0.,0.);// red G4Colour green(0.,1.,0.);// green G4Colour blue(0.,0.,1.);// blue G4Colour cyan(0.,1.,1.);// cyan G4Colour magenta (1.,0.,1.);// magenta G4Colour yellow(1.,1.,0.);// yellow

May 20, 2005Wah-kai Ngai9 Color One can set the RGBA components directly into G4VisAttributes void G4VisAttributes::SetColour (G4double red, G4double green, G4double blue, G4double alpha=1.0); The following G4VisAttributes constructor is also supported G4VisAttributes::G4VisAttributes(const G4Colour& color);

May 20, 2005Wah-kai Ngai10 Forced wireframe and forced solid styles one can select to visualize detector components in “wireframe” or with “surfaces”. The forced wireframe and forced solid styles make it possible to mix wireframe and solid visualization. For instance, one can make the mother volume transparent and still look inside when in “solid” mode Forced wireframe and forced solid are available via: void G4VisAttributes::SetForceWireframe(G4bool force); void G4VisAttributes::SetForceSolid(G4bool force);

May 20, 2005Wah-kai Ngai11 How to assign G4VisAttributes to a volume? In constructing the detector components, one may assign a set of visualization attributes to each LOGICAL VOLUME in order to visualize it later G4LogicalVolume holds a pointer to a G4VisAttributes. –void G4LogicalVolume::SetVisAttributes(const G4VisAttributes* pVa); –ExpHall_log=new G4LogicalVolume(ExpHall_box,Air,”exp_hall”); –G4VisAttributes *expHallVisAtt=new G4VisAttributes(G4Colour(0.,1.,1.)); –expHallVisAtt->SetForceWireframe(true); –ExpHall_log->SetVisAttributes(expHallVisAtt);

May 20, 2005Wah-kai Ngai12 Things you need to do Recompile the program! Need some built-in command to order geant4 for visualization Check out../examples/novice/N02/vis.mac