source: trunk/documents/UserDoc/UsersGuides/ForApplicationDeveloper/html/Visualization/introduction.html @ 1231

Last change on this file since 1231 was 1208, checked in by garnier, 15 years ago

CVS update

File size: 8.8 KB
Line 
1<HTML>
2<TITLE>Introduction to Visualization
3</TITLE>
4<!-- Changed by: Katsuya Dosanjh, 15-Jul-2000 -->
5<!-- Changed by: Dennis Wright, 27-Nov-2001 -->
6<!-- Proof read by: Joe Chuma,  5-Jul-1999 -->
7
8<!-- 7.1 Introduction  -->
9<!-- *spell, *tag, *contents, *s -->
10<BODY>
11
12<TABLE WIDTH="100%" >
13<TR>
14<TD>
15</A>
16<A HREF="index.html">
17<IMG SRC="../../../../resources/html/IconsGIF/Contents.gif" ALT="Contents" HEIGHT=16 WIDTH=59></A>
18<IMG SRC="../../../../resources/html/IconsGIF/PreviousGR.gif" ALT="Previous" HEIGHT=16 WIDTH=59>
19<a href="visexecutable.html">
20<IMG SRC="../../../../resources/html/IconsGIF/Next.gif" ALT="Next" HEIGHT=16 WIDTH=59></a>
21</TD>
22
23<TD ALIGN="Right"><FONT COLOR="#238E23"><FONT SIZE=-1>
24<B>Geant4 User's Guide</B> <BR>
25<B>For Application Developers</B> <BR>
26<B>Visualization</B> </FONT></FONT> </TD>
27</TR>
28</TABLE>
29
30<CENTER><FONT COLOR="#238E23"><FONT SIZE=+3>
31<b>8.1 Introduction to Visualization</b><BR>
32</FONT></FONT></CENTER>
33<BR>
34
35<HR ALIGN="Center" SIZE="7%"><BR>
36
37<!-- ============================================== Section --> 
38 The Geant4 visualization system was developed in response to a diverse set of requirements:
39  <OL>
40  <LI>Quick response to study geometries, trajectories and hits
41  <LI>High-quality output for publications
42  <LI>Flexible camera control to debug complex geometries
43  <LI>Tools to show volume overlap errors in detector geometries
44  <LI>Interactive picking to get more information on visualized objects
45 </OL>
46<P>
47 No one graphics system is ideal for all of these requirements, and many of the large
48 software frameworks into which Geant4 has been incorporated already have their own
49 visualization systems, so Geant4 visualization was designed around an abstract interface that
50 supports a diverse family of graphics systems.
51 Some of these graphics systems use a graphics library compiled with Geant4, such as OpenGL,
52 while others involve a separate application, such as WIRED or DAWN.
53 
54 
55 <h4>8.1.1 What Can be Visualized</h4>
56Simulation data can be visualized:
57 <UL>
58  <LI>Detector components
59      <UL>
60       <LI>A hierarchical structure of physical volumes
61       <LI>A piece of physical volume, logical volume, and solid
62      </UL>
63  <LI>Particle trajectories and tracking steps
64  <LI>Hits of particles in detector components
65 </UL>
66
67 Other user defined objects can be visualized:
68 <UL>
69  <LI>Polylines, such as coordinate axes
70  <LI>3D Markers, such as eye guides
71  <LI>Text, descriptive character strings, comments or titles
72  <LI>Scales
73  <LI>Logos
74 </UL>
75
76
77 <h4><A NAME="choice">8.1.2 You have a Choice of Visualization Drivers</A> </h4>
78 The many graphics systems that Geant4 supports are complementary to each other.
79<UL>
80<LI>
81OpenGL
82<UL>
83<LI>
84View directly from Geant4
85<LI>
86Uses GL libraries that are already included on most Linux systems (plus some Windows availability)
87<LI>
88Rendered, photorealistic image with some interactive features
89<LI>
90zoom, rotate, translate
91<LI>
92Fast response (can usually exploit full potential of graphics hardware)
93<LI>
94Limited printing ability (pixel graphics, not vector graphics)
95</UL>
96
97<LI>
98OpenInventor
99<UL>
100<LI>
101View directly from Geant4
102<LI>
103Requires addition of OpenInventor libraries (freely available for most Linux systems).
104<LI>
105Rendered, photorealistic image
106<LI>
107Many interactive features
108<LI>
109zoom, rotate, translate
110<LI>
111click to “see inside” opaque volumes
112<LI>
113Fast response (can usually exploit full potential of graphics hardware)
114<LI>
115Expanded printing ability (vector and pixel graphics)
116</UL>
117
118<LI>
119HepRep/WIRED
120<UL>
121Create a file to view in the WIRED3 HepRep Browser or the WIRED4 JAS Plugin
122<LI>
123Requires WIRED browser (a Java application easily to install on all operating systems)
124<LI>
125Wireframe or simple area fills (not photorealistic)
126<LI>
127Many interactive features
128<LI>
129zoom, rotate, translate
130<LI>
131click to show attributes (momentum, etc.)
132<LI>
133special projections (FishEye, etc.)
134<LI>
135control visibility from hierarchical (tree) view of data
136<LI>
137Hierarchical view of the geometry
138<LI>
139Export to many vector graphic formats (PostScript, PDF, etc.)
140</UL>
141
142<LI>
143DAWN
144<UL>
145<LI>
146Create a file to view in the DAWN Renderer
147<LI>
148Requires DAWN, available for all Linux and Windows systems.
149<LI>
150Rendered, photorealistic image
151<LI>
152No interactive features
153<LI>
154Highest quality technical rendering - output to vector PostScript
155</UL>
156
157<LI>
158VRML
159<UL>
160<LI>
161Create a file to view in any VRML browser (some as web browser plug-ins).
162<LI>
163Requires VRML browser (many different choices for different operating systems).
164<LI>
165Rendered, photorealistic image with some interactive features
166<LI>
167zoom, rotate, translate
168<LI>
169Limited printing ability (pixel graphics, not vector graphics)
170</UL>
171
172<LI>
173RayTracer
174<UL>
175<LI>
176Create a jpeg file
177<LI>
178Forms image by using Geant4’s own tracking to follow photons through the detector
179<LI>
180Can show geometry but not trajectories
181<LI>
182Can render any geometry that Geant4 can handle (such as Boolean solids)
183<LI>
184Supports shadows, transparency and mirrored surfaces
185</UL>
186
187<LI>
188ASCIITree
189<UL>
190<LI>
191Text dump of the geometry hierarchy
192<LI>
193Not graphical
194<LI>
195Control over level of detail to be dumped
196<LI>
197Can calculate mass and volume of any hierarchy of volumes
198</UL>
199</UL>
200
201 <h4>8.1.3 Choose the Driver that Meets Your Needs</h4>
202<UL>
203<LI>
204If you want very responsive photorealistic graphics (and have the OpenGL libraries installed)
205<UL>
206<LI>
207OpenGL is a good solution
208(if you have the Motif extensions, this also gives GUI control)
209</UL>
210<LI>
211If you want very responsive photorealistic graphics plus more interactivity (and have the OpenInventor libraries installed)
212<UL>
213<LI>
214OpenInventor is a good solution
215</UL>
216
217<LI>
218If you want GUI control, want to be able to pick on items to inquire about them (identity, momentum, etc.), perhaps want to render to vector formats, and a wireframe look will do
219<UL>
220<LI>
221HepRep/WIRED will meet your needs
222</UL>
223
224<LI>
225If you want to render highest quality photorealistic images for use in a poster or a technical design report, and you can live without quick rotate and zoom
226<UL>
227<LI>
228DAWN is the way to go
229</UL>
230
231<LI>
232If you want to render to a 3D format that others can view in a variety of commodity browsers (including some web browser plug-ins)
233<UL>
234<LI>
235VRML is the way to go
236</UL>
237
238<LI>
239If you want to visualize a geometry that the other visualization drivers can’t handle, or you need transparency or mirrors, and you don’t need to visualize trajectories
240<UL>
241<LI>
242RayTracer will do it
243</UL>
244
245<LI>
246If you just want to quickly check the geometry hierarchy, or if you want to calculate the volume or mass of any geometry hierarchy
247<UL>
248<LI>
249ASCIITree will meet your needs
250</UL>
251
252<LI>
253You can also add your own visualization driver.
254<UL>
255<LI>
256Geant4’s visualization system is modular.  By creating just three new classes, you can direct Geant4 information to your own visualization system.
257</UL>
258</UL>
259 <h4>8.1.4 Controlling Visualization</h4>
260 Your Geant4 code stays basically the same no matter which driver you use.
261<P>
262Visualization is performed either with commands or from C++ code.
263<UL>
264<LI>
265Some visualization drivers work directly from Geant4
266<UL>
267<LI>
268OpenGL
269<LI>
270OpenInventor
271<LI>
272RayTracer
273<LI>
274ASCIITree
275</UL>
276<LI>
277For other visualization drivers, you first have Geant4 produce a file,
278and then you have that file rendered by another application (which may have GUI control)
279<UL>
280<LI>
281HepRep/WIRED
282<LI>
283DAWN
284<LI>
285VRML
286</UL>
287</UL>
288
289 <h4>8.1.5 Visualization Details</h4>
290
291The following sections of this guide cover the details of Geant4 visualization:
292 <UL>
293   <LI>
294   <A HREF="visexecutable.html">
295   Adding Visualization to Your Executable</A></LI>
296   <LI>
297   <A HREF="visdrivers.html">
298   The Visualization Drivers</A></LI>
299   <LI>
300   <A HREF="commandcontrol.html">
301   Controlling Visualization from Commands</A></LI>
302   <LI>
303   <A HREF="compiledcontrol.html">
304   Controlling Visualization from Compiled Code</A></LI>
305   <LI>
306   <A HREF="attributes.html">
307   Visualization Attributes</A></LI>
308   <LI>
309   <A HREF="enhanceddrawing.html">
310   Enhanced Trajectory Drawing</A></LI>
311   <LI>
312   <A HREF="markertext.html">
313   Polylines, Markers and Text</A></LI>
314  </UL>
315<P>
316Other useful references for Geant4 visualization outside of this user guide:
317<UL>
318<LI>
319Introduction to Geant4 Visualization
320(
321<A HREF="http://geant4.slac.stanford.edu/Presentations/vis/G4VisTutorial.pdf">pdf</A>
322,
323<A HREF="http://geant4.slac.stanford.edu/Presentations/vis/G4VisTutorial.ppt">ppt</A>
324)
325<LI>
326Status of Geant4 Visualization (giving current status and a summary of what has been improved
327over the last few releases)
328(
329<A HREF="http://geant4.slac.stanford.edu/Presentations/vis/G4VisStatus.pdf">pdf</A>
330,
331<A HREF="http://geant4.slac.stanford.edu/Presentations/vis/G4VisStatus.ppt">ppt</A>
332)
333<LI> 
334Macro files distributed in Geant4 source in <tt>examples/novice/N03/visTutor/</tt>.
335</UL>
336<P>
337
338<HR>
339 <A HREF="visexecutable.html">Next section</A><BR>
340 <A HREF="index.html">Back to contents</A>
341</BODY>
342</HTML>
Note: See TracBrowser for help on using the repository browser.