source: trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/introduction.xml@ 917

Last change on this file since 917 was 905, checked in by garnier, 17 years ago

update

File size: 16.1 KB
Line 
1<!-- ******************************************************** -->
2<!-- -->
3<!-- [History] -->
4<!-- Changed by: Katsuya Amako, 15-Jul-2000 -->
5<!-- Changed by: Dennis Wright, 27-Nov-2001 -->
6<!-- Proof read by: Joe Chuma, 5-Jul-1999 -->
7<!-- Converted to DocBook: Katsuya Amako, Aug-2006 -->
8<!-- -->
9<!-- ******************************************************** -->
10
11
12<!-- ******************* Section (Level#1) ****************** -->
13<sect1 id="sect.VisIntro">
14<title>
15Introduction to Visualization
16</title>
17
18<para>
19The Geant4 visualization system was developed in response to a
20diverse set of requirements:
21
22<orderedlist spacing="compact">
23 <listitem><para>
24 Quick response to study geometries, trajectories and hits
25 </para></listitem>
26 <listitem><para>
27 High-quality output for publications
28 </para></listitem>
29 <listitem><para>
30 Flexible camera control to debug complex geometries
31 </para></listitem>
32 <listitem><para>
33 Tools to show volume overlap errors in detector geometries
34 </para></listitem>
35 <listitem><para>
36 Interactive picking to get more information on visualized objects
37 </para></listitem>
38</orderedlist>
39</para>
40
41<para>
42No one graphics system is ideal for all of these requirements,
43and many of the large software frameworks into which Geant4 has
44been incorporated already have their own visualization systems, so
45Geant4 visualization was designed around an abstract interface that
46supports a diverse family of graphics systems. Some of these
47graphics systems use a graphics library compiled with Geant4, such
48as OpenGL, Qt, while others involve a separate application, such as
49WIRED or DAWN.
50</para>
51
52<!-- ******************* Section (Level#2) ****************** -->
53<sect2 id="sect.VisIntro.What">
54<title>
55What Can be Visualized
56</title>
57
58<para>
59Simulation data can be visualized:
60
61<itemizedlist spacing="compact">
62 <listitem><para>
63 Detector components
64 <itemizedlist spacing="compact">
65 <listitem><para>
66 A hierarchical structure of physical volumes
67 </para></listitem>
68 <listitem><para>
69 A piece of physical volume, logical volume, and solid
70 </para></listitem>
71 </itemizedlist>
72 </para></listitem>
73 <listitem><para>
74 Particle trajectories and tracking steps
75 </para></listitem>
76 <listitem><para>
77 Hits of particles in detector components
78 </para></listitem>
79</itemizedlist>
80</para>
81
82<para>
83Other user defined objects can be visualized:
84
85<itemizedlist spacing="compact">
86 <listitem><para>
87 Polylines, such as coordinate axes
88 </para></listitem>
89 <listitem><para>
90 3D Markers, such as eye guides
91 </para></listitem>
92 <listitem><para>
93 Text, descriptive character strings, comments or titles
94 </para></listitem>
95 <listitem><para>
96 Scales
97 </para></listitem>
98 <listitem><para>
99 Logos
100 </para></listitem>
101</itemizedlist>
102</para>
103
104</sect2>
105
106
107<!-- ******************* Section (Level#2) ****************** -->
108<sect2 id="sect.VisIntro.Choice">
109<title>
110You have a Choice of Visualization Drivers
111</title>
112
113<para>
114The many graphics systems that Geant4 supports are complementary to
115each other.
116
117<itemizedlist spacing="compact">
118 <listitem><para>
119 OpenGL
120 <itemizedlist spacing="compact">
121 <listitem><para>
122 View directly from Geant4
123 </para></listitem>
124 <listitem><para>
125 Uses GL libraries that are already included on most Linux
126 systems (plus some Windows availability)
127 </para></listitem>
128 <listitem><para>
129 Rendered, photorealistic image with some interactive features
130 </para></listitem>
131 <listitem><para>
132 zoom, rotate, translate
133 </para></listitem>
134 <listitem><para>
135 Fast response (can usually exploit full potential of graphics
136 hardware)
137 </para></listitem>
138 <listitem><para>
139 Limited printing ability (pixel graphics, not vector graphics)
140 </para></listitem>
141 </itemizedlist>
142 </para></listitem>
143 <listitem><para>
144 Qt
145 <itemizedlist spacing="compact">
146 <listitem><para>
147 View directly from Geant4
148 </para></listitem>
149 <listitem><para>
150 Uses Qt and GL libraries that are already included on most Linux
151 systems (plus some Windows availability)
152 </para></listitem>
153 <listitem><para>
154 Rendered, photorealistic image
155 </para></listitem>
156 <listitem><para>
157 Many interactive features
158 </para></listitem>
159 <listitem><para>
160 zoom, rotate, translate
161 </para></listitem>
162 <listitem><para>
163 Fast response (can usually exploit full potential of graphics
164 hardware)
165 </para></listitem>
166 <listitem><para>
167 Expanded printing ability (vector and pixel graphics)
168 </para></listitem>
169 <listitem><para>
170 Make movies interactively
171 </para></listitem>
172 </itemizedlist>
173 </para></listitem>
174 <listitem><para>
175 OpenInventor
176 <itemizedlist spacing="compact">
177 <listitem><para>
178 View directly from Geant4
179 </para></listitem>
180 <listitem><para>
181 Requires addition of OpenInventor libraries (freely available
182 for most Linux systems).
183 </para></listitem>
184 <listitem><para>
185 Rendered, photorealistic image
186 </para></listitem>
187 <listitem><para>
188 Many interactive features
189 </para></listitem>
190 <listitem><para>
191 zoom, rotate, translate
192 </para></listitem>
193 <listitem><para>
194 click to "see inside" opaque
195 volumes
196 </para></listitem>
197 <listitem><para>
198 Fast response (can usually exploit full potential of graphics
199 hardware)
200 </para></listitem>
201 <listitem><para>
202 Expanded printing ability (vector and pixel graphics)
203 </para></listitem>
204 </itemizedlist>
205 </para></listitem>
206 <listitem><para>
207 HepRep/WIRED
208 <itemizedlist spacing="compact">
209 <listitem><para>
210 Create a file to view in the WIRED3 HepRep Browser or the
211 WIRED4 JAS Plugin
212 </para></listitem>
213 <listitem><para>
214 Requires WIRED browser (a Java application easily to install on
215 all operating systems)
216 </para></listitem>
217 <listitem><para>
218 Wireframe or simple area fills (not photorealistic)
219 </para></listitem>
220 <listitem><para>
221 Many interactive features
222 </para></listitem>
223 <listitem><para>
224 zoom, rotate, translate
225 </para></listitem>
226 <listitem><para>
227 click to show attributes (momentum, etc.)
228 </para></listitem>
229 <listitem><para>
230 special projections (FishEye, etc.)
231 </para></listitem>
232 <listitem><para>
233 control visibility from hierarchical (tree) view of data
234 </para></listitem>
235 <listitem><para>
236 Hierarchical view of the geometry
237 </para></listitem>
238 <listitem><para>
239 Export to many vector graphic formats (PostScript, PDF, etc.)
240 </para></listitem>
241 </itemizedlist>
242 </para></listitem>
243 <listitem><para>
244 DAWN
245 <itemizedlist spacing="compact">
246 <listitem><para>
247 Create a file to view in the DAWN Renderer
248 </para></listitem>
249 <listitem><para>
250 Requires DAWN, available for all Linux and Windows systems.
251 </para></listitem>
252 <listitem><para>
253 Rendered, photorealistic image
254 </para></listitem>
255 <listitem><para>
256 No interactive features
257 </para></listitem>
258 <listitem><para>
259 Highest quality technical rendering - output to vector PostScript
260 </para></listitem>
261 </itemizedlist>
262 </para></listitem>
263 <listitem><para>
264 VRML
265 <itemizedlist spacing="compact">
266 <listitem><para>
267 Create a file to view in any VRML browser (some as web browser
268 plug-ins).
269 </para></listitem>
270 <listitem><para>
271 Requires VRML browser (many different choices for different
272 operating systems).
273 </para></listitem>
274 <listitem><para>
275 Rendered, photorealistic image with some interactive features
276 </para></listitem>
277 <listitem><para>
278 zoom, rotate, translate
279 </para></listitem>
280 <listitem><para>
281 Limited printing ability (pixel graphics, not vector graphics)
282 </para></listitem>
283 </itemizedlist>
284 </para></listitem>
285 <listitem><para>
286 RayTracer
287 <itemizedlist spacing="compact">
288 <listitem><para>
289 Create a jpeg file
290 </para></listitem>
291 <listitem><para>
292 Forms image by using Geant4's own tracking
293 to follow photons through the detector
294 </para></listitem>
295 <listitem><para>
296 Can show geometry but not trajectories
297 </para></listitem>
298 <listitem><para>
299 Can render any geometry that Geant4 can handle (such as Boolean
300 solids)
301 </para></listitem>
302 <listitem><para>
303 Supports shadows, transparency and mirrored surfaces
304 </para></listitem>
305 </itemizedlist>
306 </para></listitem>
307 <listitem><para>
308 ASCIITree
309 <itemizedlist spacing="compact">
310 <listitem><para>
311 Text dump of the geometry hierarchy
312 </para></listitem>
313 <listitem><para>
314 Not graphical
315 </para></listitem>
316 <listitem><para>
317 Control over level of detail to be dumped
318 </para></listitem>
319 <listitem><para>
320 Can calculate mass and volume of any hierarchy of volumes
321 </para></listitem>
322 </itemizedlist>
323 </para></listitem>
324</itemizedlist>
325</para>
326
327</sect2>
328
329
330<!-- ******************* Section (Level#2) ****************** -->
331<sect2 id="sect.VisIntro.ChoDrv">
332<title>
333Choose the Driver that Meets Your Needs
334</title>
335
336<para>
337<itemizedlist spacing="compact">
338 <listitem><para>
339 If you want very responsive photorealistic graphics (and have
340 the OpenGL libraries installed)
341 <itemizedlist spacing="compact">
342 <listitem><para>
343 OpenGL is a good solution (if you have the Motif extensions,
344 this also gives GUI control)
345 </para></listitem>
346 </itemizedlist>
347 </para></listitem>
348 <listitem><para>
349 If you want very responsive photorealistic graphics plus more
350 interactivity (and have the OpenInventor libraries installed)
351 <itemizedlist spacing="compact">
352 <listitem><para>
353 OpenInventor is a good solution
354 </para></listitem>
355 </itemizedlist>
356 </para></listitem>
357 <listitem><para>
358 If you want GUI control, very responsive photorealistic graphics plus more
359 interactivity (and have the Qt libraries installed).
360 <itemizedlist spacing="compact">
361 <listitem><para>
362 Qt is a good solution
363 </para></listitem>
364 </itemizedlist>
365 </para></listitem>
366 <listitem><para>
367 If you want GUI control, want to be able to pick on items to
368 inquire about them (identity, momentum, etc.), perhaps want to
369 render to vector formats, and a wireframe look will do
370 <itemizedlist spacing="compact">
371 <listitem><para>
372 HepRep/WIRED will meet your needs
373 </para></listitem>
374 </itemizedlist>
375 </para></listitem>
376 <listitem><para>
377 If you want to render highest quality photorealistic images for
378 use in a poster or a technical design report, and you can live
379 without quick rotate and zoom
380 <itemizedlist spacing="compact">
381 <listitem><para>
382 DAWN is the way to go
383 </para></listitem>
384 </itemizedlist>
385 </para></listitem>
386 <listitem><para>
387 If you want to render to a 3D format that others can view in a
388 variety of commodity browsers (including some web browser plug-ins)
389 <itemizedlist spacing="compact">
390 <listitem><para>
391 VRML is the way to go
392 </para></listitem>
393 </itemizedlist>
394 </para></listitem>
395</itemizedlist>
396
397<?soft-pagebreak ?>
398<itemizedlist spacing="compact">
399 <listitem><para>
400 If you want to visualize a geometry that the other
401 visualization drivers can't handle, or you need
402 transparency or mirrors, and you don't need to
403 visualize trajectories
404 <itemizedlist spacing="compact">
405 <listitem><para>
406 RayTracer will do it
407 </para></listitem>
408 </itemizedlist>
409 </para></listitem>
410 <listitem><para>
411 If you just want to quickly check the geometry hierarchy, or if
412 you want to calculate the volume or mass of any geometry hierarchy
413 <itemizedlist spacing="compact">
414 <listitem><para>
415 ASCIITree will meet your needs
416 </para></listitem>
417 </itemizedlist>
418 </para></listitem>
419 <listitem><para>
420 You can also add your own visualization driver.
421 <itemizedlist spacing="compact">
422 <listitem><para>
423 Geant4's visualization system is modular. By
424 creating just three new classes, you can direct Geant4 information
425 to your own visualization system.
426 </para></listitem>
427 </itemizedlist>
428 </para></listitem>
429</itemizedlist>
430</para>
431
432</sect2>
433
434<!-- ******************* Section (Level#2) ****************** -->
435<sect2 id="sect.VisIntro.CntVis">
436<title>
437Controlling Visualization
438</title>
439
440<para>
441Your Geant4 code stays basically the same no matter which driver
442you use.
443</para>
444
445<para>
446Visualization is performed either with commands or from C++ code.
447
448<itemizedlist spacing="compact">
449 <listitem><para>
450 Some visualization drivers work directly from Geant4
451 <itemizedlist spacing="compact">
452 <listitem><para>
453 OpenGL
454 </para></listitem>
455 <listitem><para>
456 Qt
457 </para></listitem>
458 <listitem><para>
459 OpenInventor
460 </para></listitem>
461 <listitem><para>
462 RayTracer
463 </para></listitem>
464 <listitem><para>
465 ASCIITree
466 </para></listitem>
467 </itemizedlist>
468 </para></listitem>
469 <listitem><para>
470 For other visualization drivers, you first have Geant4 produce
471 a file, and then you have that file rendered by another application
472 (which may have GUI control)
473 <itemizedlist spacing="compact">
474 <listitem><para>
475 HepRep/WIRED
476 </para></listitem>
477 <listitem><para>
478 DAWN
479 </para></listitem>
480 <listitem><para>
481 VRML
482 </para></listitem>
483 </itemizedlist>
484 </para></listitem>
485</itemizedlist>
486</para>
487
488</sect2>
489
490
491<!-- ******************* Section (Level#2) ****************** -->
492<sect2 id="sect.VisIntro.Details">
493<title>
494Visualization Details
495</title>
496
497<para>
498The following sections of this guide cover the details of Geant4
499visualization:
500
501<itemizedlist spacing="compact">
502 <listitem><para>
503 <xref linkend="sect.VisAddExe" />
504 Adding Visualization to Your Executable
505 </para></listitem>
506 <listitem><para>
507 <xref linkend="sect.VisDrv" />
508 The Visualization Drivers
509 </para></listitem>
510 <listitem><para>
511 <xref linkend="sect.VisCntCmmd" />
512 Controlling Visualization from Commands
513 </para></listitem>
514 <listitem><para>
515 <xref linkend="sect.VisCntCmpl" />
516 Controlling Visualization from Compiled Code
517 </para></listitem>
518 <listitem><para>
519 <xref linkend="sect.VisAtt" />
520 Visualization Attributes
521 </para></listitem>
522 <listitem><para>
523 <xref linkend="sect.VisEnhTrj" />
524 Enhanced Trajectory Drawing
525 </para></listitem>
526 <listitem><para>
527 <xref linkend="sect.VisPlylMrkTxt" />
528 Polylines, Markers and Text
529 </para></listitem>
530</itemizedlist>
531</para>
532
533<para>
534Other useful references for Geant4 visualization outside of this
535user guide:
536
537<itemizedlist spacing="compact">
538 <listitem><para>
539 Introduction to Geant4 Visualization (
540 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4VisTutorial.pdf">
541 pdf</ulink>,
542 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4VisTutorial.ppt">
543 ppt</ulink> )
544 </para></listitem>
545 <listitem><para>
546 Status of Geant4 Visualization (giving current status and a
547 summary of what has been improved over the last few releases) (
548 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4VisStatus.pdf">
549 pdf</ulink>,
550 <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4VisStatus.ppt">
551 ppt</ulink> )
552 </para></listitem>
553 <listitem><para>
554 Macro files distributed in Geant4 source in
555 <literal>examples/novice/N03/visTutor/</literal>.
556 </para></listitem>
557</itemizedlist>
558</para>
559
560
561</sect2>
562</sect1>
Note: See TracBrowser for help on using the repository browser.