12.07.2015 Views

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Visualization8.4.13. How to save a visualized views to PostScript filesMost of the visualization drivers offer ways to save visualized views to PostScript files (or Encapsulated PostScript(EPS) files) by themselves.• DAWFILEThe DAWNFILE driver, which co-works with Fukui Renderer DAWN, generates "vectorized" PostScript datawith "analytical hidden-line/surface removal", and so it is well suited <strong>for</strong> technical high-quality outputs <strong>for</strong>presentation, documentation, and debugging geometry. In the default setting of the DAWNFILE drivers, EPSfiles named "g4_00.eps, g4_01.eps, g4_02.eps,..." are automatically generated in the current directoryeach time when visualization is per<strong>for</strong>med, and then a PostScript viewer "gv"is automatically invokedto visualize the generated EPS files.For large data sets, it may take time to generate the vectorized PostScript data. In such a case, visualize the 3Dscene with a faster visualization driver be<strong>for</strong>ehand <strong>for</strong> previewing, and then use the DAWNFILE drivers. Forexample, the following visualizes the whole detector with the OpenGL-Xlib driver (immediate mode) first, andthen with the DAWNFILE driver to generate an EPS file g4_XX.eps to save the visualized view:# Invoke the OpenGL visualization driver in its immediate mode/vis/open OGLIX# Camera setting/vis/viewer/set/viewpointThetaPhi 20 20# Camera setting/vis/drawVolume/vis/viewer/flush# Invoke the DAWNFILE visualization driver/vis/open DAWNFILE# Camera setting/vis/viewer/set/viewpointThetaPhi 20 20# Camera setting/vis/drawVolume/vis/viewer/flushThis is a good example to show that the visualization drivers are complementary to each other.• OpenInventorIn the OpenInventor drivers, you can simply click the "Print" button on their GUI to generate a PostScript fileas a hard copy of a visualized view.• OpenGLThe OpenGL drivers can also generate PostScript files, either from a pull-down menu (Motif and Qt drivers) orwith /vis/ogl/printEPS. It can generate either vector or bitmap PostScript data with /vis/ogl/set/printMode ("vectored" or "pixmap"). You can change the filename by /vis/ogl/set/printMode Andthe print size by /vis/ogl/set/printSize In generating vectorized PostScript data, hidden-surface removalis per<strong>for</strong>med based on the painter's algorithm after dividing facets of shapes into small sub-triangles.Note that a fundamental limitation of the gl2ps library used <strong>for</strong> this PostScript printing causes the /vis/viewer/set/hiddenMarkercommand to be ignored. Trajectories will always be fully drawn in the printEPSoutput even when the hiddenMarker hidden line removal option has been set to hide these trajectories in thecorresponding OpenGL view.The /vis/ogl/set/printSize command can be used to print EPS files even larger than the currentscreen resolution. This can allow creation of very large images, suitable <strong>for</strong> creation of posters, etc. The onlysize limitation is the graphics card's viewport dimension: GL_MAX_VIEWPORT_DIMS# Invoke the OpenGL visualization driver in its stored mode/vis/open OGLSX241

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!