View
218
Download
0
Category
Preview:
Citation preview
CSC 7600 Lecture 14 : VisualizationSpring 2011
HIGH PERFORMANCE COMPUTING: MODELS, METHODS, & MEANS
VISUALIZATION
Chirag Dekate ( w. Thomas Sterling)Department of Computer ScienceLouisiana State UniversityMarch 3rd, 2011
CSC 7600 Lecture 14 : VisualizationSpring 2011
Topics
• Introduction • Application of Visualization• Challenges and Approaches• GnuPlot• OpenGL• VisIt• Summary – Materials for Test
2
CSC 7600 Lecture 14 : VisualizationSpring 2011
Topics
• Introduction • Application of Visualization• Challenges and Approaches• GnuPlot• OpenGL• VisIt• Summary – Materials for Test
3
CSC 7600 Lecture 14 : VisualizationSpring 2011
Goals of visualization
• Understand not the data but the underlying phenomenon.a) Computers produce too much data.
b) Bandwidth of human visual channel is high and large portion of brain devoted to visual processing.
c) Well developed languages for visual communication.
• Understanding of the phenomenon represented by the data.
• Achieving compelling visual depictions.
5
CSC 7600 Lecture 14 : VisualizationSpring 2011
Why Visualization ? u = -6.427857 , -6.523186 , -6.54103 , -6.54103 , -6.482776 , -6.390405 , -6.390405 , -6.572558 , -6.97136 , -7.201595 , -7.348364 , -7.329116 , -7.452635 , -7.64616 , -7.942822 , -8.201272 , -8.43337 , -8.660357 , -8.717431 , -8.655432 , -8.406534 , -8.33491 , -8.369874 , -8.578186 , -8.721748 , -8.844964 , -8.925459 , -8.98138 , -8.984378 , -8.983262 , -8.971765 , -8.961585 , -8.971635 , -8.925839 , -8.84674 , -8.710734 , -8.628431 , -8.573109 , -8.573581 , -8.507746 , -8.403376 , -8.241115 , -8.10023 , -7.968015 , -7.840099 , -7.750834 , -7.682921 , -7.671621 , -7.535857 , -7.322661 , -6.97717 , -6.752327 , -6.593081 , -6.5627 , -6.429719 , -6.255228 , -5.996966 , -5.849945 , -5.849944 , -5.849944 , -5.866279 , -6.008289 , -6.256032 , -6.256031 , -6.061061 , -5.582273 , -5.318203 , -5.304733 , -5.304731 , -5.304732 , -5.400971 , -5.525061 , -5.695447 , -5.908212 , -6.120428 , -6.483144 , -6.929903 , -7.499269 , -7.870482 , -7.944466 , -7.944464 , -7.944464 , -7.659261 , -7.229546 , -6.725167 , -6.161546 , -5.556448 , -4.978111 , -4.438664 , -3.956492 , -3.541891 , -3.200402 , -2.948171 , -2.725869 , -2.547415 , -2.403962 , -2.328887 , -2.328887 , -2.362912 , -2.47964 , -2.661769 , -2.897908 , -3.173306 , -3.469175 , -3.77889 , -4.023475 , -4.197217 , -4.269307 , -4.269307 , -4.141403 , -3.900984 , -3.598546 , -3.241225 , -2.838429 , -2.448151 , -2.077646 , -1.729339 , -1.448499 , -1.221355 , -1.075136 , -0.8622113 , -0.610992 , -0.309599 , -0.008249226 , 0.2866637 , 0.5844232 , 0.7551345 , 0.7551345 , 0.7404107 , 0.628957 , 0.4618129 , 0.254385 , -0.001586894 , -0.2942654 , -0.6273276 , -0.9602203 , -1.302442 , -1.651798 , -2.040005 , -2.473109 , -2.927637 , -3.536143 , -4.256138 , -5.131937 , -5.909329 , -6.632139 , -7.264142 , -7.914654 , -8.569831 , -9.225504 , -9.972804 , -10.79719 , -11.69678 , -12.65146 , -13.63585 , -14.65405 , -15.52981 , -16.26998 , -16.84625 , -17.27217 , -17.54335 , -17.63945 , -17.68136 , -17.6488 , -17.5907 , -17.36112 , -17.01713 , -16.55005 , -16.1187 , -15.72782 , -15.39774 , -15.21338 , -15.21338 , -15.29171 , -15.5386 , -5.872988 , -6.085768 , -6.315414 , -6.46691 , -6.566167 , -6.463671 , -6.516846 , -6.661736 , -6.950105 , -7.139693 , -7.292792 , -7.35294 , -7.509007 , -7.711919 , -7.98795 , -8.204489 , -8.388111 , -8.53765 , -8.549171 , -8.494419 , -8.274727 , -8.235106 , -8.290669 , -8.485452 , -8.631478 , -8.758162 , -8.843537 , -8.905816 , -8.901114 , -8.923553 , -8.900274 , -8.85834 , -8.826035 , -8.742122 , -8.633344 , -8.481342 , -8.38605 , -8.324376 , -8.328 , -8.283401 , -8.224975 , -8.140258 , -8.033843 , -7.907145 , -7.744395 , -7.630397 , -7.540941 , -7.511995 , -7.380935 , -7.18389 , -6.89576 , -6.690366 , -6.539803 , -6.49908 , -6.338212 , -6.121155 , -5.800247 , -5.614371 , -5.590841 , -5.617583 , -5.618993 , -5.705396 , -5.831448 , -5.808238 , -5.637913 , -5.273538 , -5.048944 , -4.978347 , -4.939844 , -4.935815 , -5.005646 , -5.125065 , -5.340047 , -5.640095 , -6.118582 , -6.479867 , -7.020726 , -7.656367 , -8.091928 , -8.235412 , -8.256392 , -8.288987 , -8.02024 , -7.594208 , -7.080354 , -6.493727 , -5.853112 , -5.222045 , -4.61448 , -4.051221 , -3.540982 , -3.094106 , -2.729883 , -2.4017 , -2.128516 , -1.901242 , -1.783949 , -1.794434 , -1.854288 , -2.025638 , -2.276666 , -2.588354 , -2.951093 , -3.336414 , -3.737945 , -4.051697 , -4.247976 , -4.299063 , -4.287614 , -4.141403 , -3.773021 , -3.392112 , -2.966861 , -2.511141 , -2.104363 , -1.752656 , -1.458143 , -1.264281 , -1.149855 , -1.12121 , -1.021299 , -0.857702 , -0.6503528 , -0.3679736 , -0.04715691 , 0.330871 , 0.5817654 , 0.6693039 , 0.6839384 , 0.6188942 , 0.4083084 , 0.09041793 , -0.2997381 , -0.7528136 , -1.269037 , -1.776355 , -2.282719 , -2.770765 , -3.301226 , -3.86602 , -4.443498 , -5.119157 , -5.857961 , -6.703572 , -7.392374 , -7.978982 , -8.419954 , -8.906201 , -9.416592 , -9.960371 , -10.61076 , -11.35791 , -12.20694 , -13.09808 , -14.01462 , -14.95342 , -15.77099 , -16.46989 , -17.01907 , -17.4528 , -17.75783 , -17.91834 , -18.00619 , -17.99242 , -17.95625 , -17.69617 , -17.28662 , -16.70866 , -16.18466 , -15.72867 , -15.31314 , -15.07428 , -15.04266 , -15.08206 , -15.2573 ,………
v = -1.094848 , -1.388215 , -1.7774 , -1.87638 , -1.769933 , -1.374895 , -1.068985 , -0.7930366 , -0.6055306 , -0.4153382 , -0.2618484 , -0.1600156 , -0.09336649 , -0.0933665 , -0.09336649 , -0.29928 , -0.6517227 , -1.185737 , -1.632164 , -2.017494 , -2.310865 , -2.50579 , -2.557264 , -2.540595 , -2.557264 , -2.543922 , -2.557264 , -2.534354 , -2.340377 , -2.021534 , -1.68185 , -1.31723 , -0.9375733 , -0.6081405 , -0.331678 , -0.1343881 , 0.0349655 , 0.1550956 , 0.2184148 , 0.2184148 , 0.09506586 , -0.1572805 , -0.3115382 , -0.4108411 , -0.3943729 , -0.472298 , -0.5880879 , -0.7785369 , -0.8741692 , -0.8741691 , -0.852599 , -0.7818746 , -0.6815349 , -0.559538 , -0.4188876 , -0.2667979 , -0.1274622 , 0.04737541 , 0.222767 , 0.4350842 , 0.4537844 , 0.3320421 , 0.02712467 , -0.2381335 , -0.4869398 , -0.7065635 , -0.8304897 , -0.8304898 , -0.7885993 , -0.7802173 , -0.8343163 , -0.9507663 , -0.9507663 , -0.7676437 , -0.4141116 , 0.03086369 , 0.5632063 , 1.191833 , 1.741727 , 2.228943 , 2.614007 , 2.988411 , 3.328841 , 3.646137 , 3.926322 , 4.182895 , 4.416797 , 4.670647 , 4.945902 , 5.249022 , 5.59187 , 5.97444 , 6.391531 , 6.847597 , 7.327731 , 7.829793 , 8.284888 , 8.688264 , 9.02784 , 9.276457 , 9.431317 , 9.460448 , 9.460449 , 9.355015 , 9.180367 , 8.963261 , 8.718586 , 8.452602 , 8.229078 , 8.049659 , 7.91937 , 7.852942 , 7.852942 , 7.884611 , 7.904743 , 7.898197 , 7.849684 , 7.732419 , 7.538555 , 7.259863 , 6.899429 , 6.457614 , 5.938355 , 5.356821 , 4.723446 , 4.041956 , 3.363791 , 2.691295 , 2.037988 , 1.397454 , 0.7774612 , 0.1903167 , -0.394103 , -0.9607456 , -1.504752 , -1.999091 , -2.432707 , -2.797345 , -3.046965 , -3.053234 , -3.053234 , -3.023986 , -2.730067 , -2.301303 , -1.71073 , -0.9851491 , -0.1510314 , 0.7523372 , 1.677023 , 2.615013 , 3.343748 , 3.86464 , 4.160915 , 4.184602 , 3.966629 , 3.474625 , 3.016644 , 2.568788 , 2.165158 , 1.824501 , 1.54189 , 1.360883 , 1.035977 , 0.6115122 , 0.06123456 , -0.5250472 , -1.146736 , -1.800962 , -2.367146 , -2.846602 , -3.223269 , -3.491419 , -3.655909 , -3.702413 , -3.745571 , -0.5370894 , -0.8362811 , -1.261836 , -1.431323 , -1.439548 , -1.197057 , -1.010797 , -0.8057232 , -0.6501509 , -0.4674788 , -0.2819314 , -0.1039538 , -0.003672248 , -0.03016879 , -0.08807017 , -0.2992798 , -0.6517226 , -1.04221 , -1.493191 , -1.87203 , -2.175377 , -2.407176 , -2.555969 , -2.599726 , -2.671768 , -2.712004 , -2.75505 , -2.75902 , -2.60304 , -2.328378 , -2.018466 , -1.671619 , -1.297618 , -0.9531922 , -0.6438362 , -0.3950594 , -0.1701427 , 0.01022664 , 0.1364522 , 0.1747276 , 0.07895294 , -0.163308 , -0.3119612 , -0.4108411 , -0.4113753 , -0.4671833 , -0.514634 , -0.6230809 , -0.6598164 , -0.6212637 , -0.5786133 , -0.5099974 , -0.4389736 , -0.3768384 , -0.2941028 , -0.184191 , -0.06520332 , 0.04737541 , 0.222767 , 0.4200633 , 0.4607859 , 0.3320421 , 0.3006737 , 0.07510712 , -0.07692574 , -0.2115855 , -0.2936291 , -0.2928487 , -0.292287 , -0.2969472 , -0.3166117 , -0.4137569 , -0.4247616 , -0.2855123 , -0.01641562 , 0.3228842 , 0.7352448 , 1.223382 , 1.67242 , 2.098369 , 2.465089 , 2.82751 , 3.167285 , 3.493491 , 3.772224 , 4.01767 , 4.227215 , 4.45173 , 4.692906 , 4.956936 , 5.272628 , 5.639721 , 6.05663 , 6.525858 , 7.034393 , 7.579512 , 8.094472 , 8.572382 , 9.010693 , 9.246994 , 9.600247 , 9.734415 , 9.818371 , 9.768746 , 9.634361 , 9.467207 , 9.223889 , 8.935048 , 8.680677 , 8.465234 , 8.293701 , 8.204026 , 8.200741 , 8.238729 , 8.27344 , 8.296266 , 8.249908 , 8.143016 , 7.933974 , 7.620547 , 7.205623 , 6.692104 , 6.073251 , 5.356821 , 4.704732 , 3.950881 , 3.223222 , 2.52102 , 1.863057 , 1.214219 , 0.5855544 , -0.008720525 , -0.6155071 , -1.212232 , -1.798152 , -2.302297 , -2.713413 , -2.993824 , -3.092898 , -3.038303 , -2.847107 , -2.602939 , -2.127067 , -1.511888 , -0.7935675 , -0.009873301 , 0.8129019 , 1.657815 , 2.47968 , 3.274564 , 3.86061 , 4.223564 , 4.421453 , 4.368874 , 4.113844 , 3.630303 , 3.202399 , 2.802837 , 2.467391 , 2.162023 , 1.88674 , 1.675342 , 1.306858 , 0.8053824 , 0.09287734 , -0.5250471 , -1.144472 , -1.850449 , -2.463693 , ……...
MM5 Data (Left) MM5 Viz (Right) using Amira
6
CSC 7600 Lecture 14 : VisualizationSpring 2011
Topics
• Introduction • Application of Visualization• Challenges and Approaches• GnuPlot• OpenGL• VisIt• Summary – Materials for Test
7
CSC 7600 Lecture 14 : VisualizationSpring 2011
Computational fluid dynamics
10
CSC 7600 Lecture 14 : VisualizationSpring 2011
Types of Input Data
• Point / Particle– N-body simulation
• Regular grid– Medical scan
• Curvilinear grid– Engineering model
• Unstructured grid– Extracted surface
Src: TACC
CSC 7600 Lecture 14 : VisualizationSpring 2011
Point – scattered values with no defined structure
Types of Input Data
Src: TACC
CSC 7600 Lecture 14 : VisualizationSpring 2011
Grid – regular structure, all voxels (cells) are the same size and shape
Types of Input Data
Src: TACC
CSC 7600 Lecture 14 : VisualizationSpring 2011
Curvilinear – regularly grided mesh shaping function applied
Types of Input Data
Src: TACC
CSC 7600 Lecture 14 : VisualizationSpring 2011
Unstructured grid – irregular mesh typically composed of tetrahedra, prisms, pyramids, or hexahedra.
Types of Input Data
Src: TACC
CSC 7600 Lecture 14 : VisualizationSpring 2011
Visualization Techniques
• Surface Rendering, is an indirect geometry based technique
• Direct Volume Rendering, is a technique for the visualization of 3D scalar data sets without a conversion to surface representations
• Visualization Operations– Surface Shading (Pseudocolor)– Isosufacing (Contours)– Volume Rendering– Clipping Planes– Streamlines
Src: TACC
CSC 7600 Lecture 14 : VisualizationSpring 2011
Surface Shading (Pseudocolor)
Given a scalar value at a point on the surface and a color map,
find the corresponding color (and opacity) and apply it to the surface point.
Most common operation, often combined with other ops
Src: TACC
CSC 7600 Lecture 14 : VisualizationSpring 2011
Isosurfaces (Contours)
• Surface that represents points of constant value with a volume
• Plot the surface for a given scalar value.
• Good for showing known values of interest
• Good for sampling through a data range
Src: TACC
CSC 7600 Lecture 14 : VisualizationSpring 2011
Volume Rendering
Expresses how light travels through a volume
Color and opacity controlled by transfer function
Smoother transitions than isosurfaces
Src: TACC
CSC 7600 Lecture 14 : VisualizationSpring 2011
Clipping / Slicing Planes
Extract a plane from the data to show features
Hide part of dataset to expose features
Src: TACC
CSC 7600 Lecture 14 : VisualizationSpring 2011
Particle Traces (Streamlines)
Given a vector field, extract a trace that follows that trajectory defined by the vector.
Pnew = Pcurrent + VPt
Streamlines – trace in space
Pathlines – trace in time
Src: TACC
CSC 7600 Lecture 14 : VisualizationSpring 2011
Uses of visualization
• Data exploration.• Hypothesis testing.• Steering of computation.• Program/performance debugging.• Presentation.
26
CSC 7600 Lecture 14 : VisualizationSpring 2011
Data exploration
• Cygron's DataScope utilizes innovative data visualization technology that leverages the natural human ability to see patterns in pictures rather than numbers.
• DataScope creates real-time, high quality database graphics, but it also offers powerful data transformation, filtering, querying, drill-down and automatic correlation discovery capabilities.
• http://www.cygron.com/VisualExploration.html
28
CSC 7600 Lecture 14 : VisualizationSpring 2011
Hypothesis testing
• Promoters of statistical methods may use linear correlation coefficients to detect relationships between variables, which works wonderfully when there is a linear relationship between variables and when the data is free from anomalies.
• However, if the relationship is quadratic (or exponential, sinusoidal, etc.) a linear algorithm may fail to detect the relationship.
• Similarly if there are data collection problems that add outliers or if there are discontinuities over the range (e.g. freezing or boiling points of water), then linear correlation may fail.
• A visual presentation is more likely to help researchers find such phenomena and suggest richer hypotheses.
29
CSC 7600 Lecture 14 : VisualizationSpring 2011
Steering of computation
• Understanding the atmospheric dispersion of reacting chemicals is one of the major scientific challenges in the world today.
• Scientists study the problem by constructing a numerical simulation of the dispersion, combining the expertise of the scientist in the physical processes involved, and the skill of numerical mathematicians in the numerical modeling of these processes.
• As part of the analysis, a scientist will want to explore different scenarios: varying the chimney height, varying the terrain, varying the emission rate and varying the wind direction.
• http://www.visualization.leeds.ac.uk/CovisaG/demo.html
31
CSC 7600 Lecture 14 : VisualizationSpring 2011
Steering of computation
• The IRIS Explorer application (shown on the right) provides a 'user friendly' interface to computational steering and visualization.
• This application allows the scientist to control the simulation, experiment with different wind directions and see the visualized results with or without the ground and chimney geometry displayed.
32
CSC 7600 Lecture 14 : VisualizationSpring 2011
Program/performance debugging
• TAU was designed to improve parallel programming productivity by combining advances in parallel debugging, performance evaluation, and program visualization tools.
33
CSC 7600 Lecture 14 : VisualizationSpring 2011
Presentation(2D)
• QuikScat measurements of Arctic perennial sea ice coverage (shown in red) in winter 2006 were 14-percent less than in winter 2005. Image credit: NASA/JPL
35
CSC 7600 Lecture 14 : VisualizationSpring 2011
Presentation(3D)
• Debris (NASA) The debris software package includes programs for computing debris trajectories relative to a vehicle in flight, for detecting possible debris impacts on any part of the flight vehicle, and for filtering, sorting, and managing very large databases of debris impacts.
36
CSC 7600 Lecture 14 : VisualizationSpring 2011
Presentation (Mars movie)
• Images of the "Columbia Hills" region inside Mars' Gusev Crater, taken by the High Resolution Imaging Science Experiment camera on NASA's Mars Reconnaissance Orbiter, provided detailed, three-dimensional information that was used to create this animation of a hypothetical flyover.
• http://mars.jpl.nasa.gov/mro/gallery/video/movies/Columbia640.mov
37
CSC 7600 Lecture 14 : VisualizationSpring 2011
Topics
• Introduction • Application of Visualization• Challenges and Approaches• GnuPlot• OpenGL• VisIt• Summary – Materials for Test
38
CSC 7600 Lecture 14 : VisualizationSpring 2011
Scalability and large dataset management
• Databases often store data on the terabyte scale. Simulation results are often several gigabytes in size.
• Software growth exceeds hardware growth. Hence, processing speed is limited.
• Visualization algorithms have to process huge amounts of data to generate visual representations. Delay should be minimum.
• Some have to filter the data in order to extract relevant information.• Visualization algorithms should be scalable.
39
CSC 7600 Lecture 14 : VisualizationSpring 2011
Challenges & Approaches
• High data dimensionality :– Understand relationship between the attributes or dimensions.– Represent data with high dimensionality or multiple attributes
accurately; e.g. representation of flow simulation data attributes that describe the flow like velocity, temperature, pressure, kinetic energy, etc.
– Representation becomes more complex if data is time-dependent.
• Time dependent data– Questions asked about time-dependent data element
• does it exist, when, how long, where, how often, in what order?
– Challenges• High-dimensional temporal data.
• Comparability of visualizations for time-frames.
40
CSC 7600 Lecture 14 : VisualizationSpring 2011
Challenges & Approaches
• Cross-Platform Visualization :– Large variety of hardware, operating systems and display
devices.– User-friendly visualization tools must adapt to variable
environments.
• Other challenges include defining the audience, the primary features in the visual depiction, appropriate visual metaphors, user-friendly design, choosing compelling visual representations and interactive/pre-generated graphics
41
CSC 7600 Lecture 14 : VisualizationSpring 2011
Visualization process
Sensors, cameras,
etc.
Supercomputers
Financial data
Data
Image
Display
sampling
simulation
sampling
transform
42
CSC 7600 Lecture 14 : VisualizationSpring 2011
Topics
• Introduction • Application of Visualization• Challenges and Approaches• GnuPlot• OpenGL• VisIt• Summary – Materials for Test
43
CSC 7600 Lecture 14 : VisualizationSpring 2011
gnuplot
• Portable command-line driven – interactive data and function plotting utility
• for UNIX, IBM OS/2, MS Windows, DOS, Macintosh, VMS, Atari and many other platforms.
– copyrighted but freely distributed.– supported and under development since 1986.
44
CSC 7600 Lecture 14 : VisualizationSpring 2011
gnuplot
• Plots– 2D and 3D.
• Presentations– lines, points, boxes, contours, vector fields, surfaces, and
various associated text.
• Output– interactive screen terminals– direct output to printers– output to many types of file (eps, jpeg, LaTeX, pdf, png,
postscript).
45
CSC 7600 Lecture 14 : VisualizationSpring 2011
gnuplot
• Newest version of gnuplot is 4.4.0 (March 2010) • Official web site is http://www.gnuplot.info/ • Current version can be obtained at
– http://sourceforge.net/project/showfiles.php?group_id=2055
• For a development version:http://sourceforge.net/projects/gnuplot/
46
CSC 7600 Lecture 14 : VisualizationSpring 2011
gnuplot
• “exec gnuplot” shows a gnuplot command line prompt "gnuplot> ".
• exit or quit command terminates gnuplot.
gnuplot> save "savefile.plt"
gnuplot> load "savefile.plt"
% gnuplot savefile.plt
The above command is in batch mode.
47
CSC 7600 Lecture 14 : VisualizationSpring 2011
gnuplot
• 2 basic commands to plot a graph– plot: 2-dimensional graph.– splot: 3-dimensional graph.
• To plot a function– use the plot/splot command
with a range of X-axis (or X and Y ranges for 3-dim. plot) and the function.
– you can omit the range parameters.
gnuplot> plot [0:5] sin(x)
gnuplot> plot sin(x)
48
CSC 7600 Lecture 14 : VisualizationSpring 2011
gnuplot
• You can change the appearance of your plot by the set command.
gnuplot> help set
gnuplot> set xlabel "X-AXIS“
gnuplot> set ylabel "Y-AXIS"
gnuplot> set xrange [0:5]
gnuplot> set yrange [-2:2]
gnuplot> plot sin(x)
49
CSC 7600 Lecture 14 : VisualizationSpring 2011
gnuplot
• Produces a graph in a Postscript format when “set terminal postscript” command is given.
• If no destination is specified, the produced postscript is rendered on the screen.
• The set output command changes the destination of output. gnuplot> help set
50
CSC 7600 Lecture 14 : VisualizationSpring 2011
gnuplot
• You can use gnuplot as a calculator.
gnuplot> set xrange [-2*pi:2*pi] gnuplot> a=0.5 gnuplot> print a 0.5 gnuplot> plot a*sin(x)
gnuplot> f(x)=a*sin(x)*cos(x)
• You can also define your own function.
51
CSC 7600 Lecture 14 : VisualizationSpring 2011
Alternative Styles
• The alternative to lines is points, steps or impulses.
gnuplot> plot “output.dat” using 1:2
with lines
52
CSC 7600 Lecture 14 : VisualizationSpring 2011
Multicolumn Data
1 2 3 4
0.10 9.0484E-01 9.0484E-01 9.0484E-01
0.20 8.1873E-01 8.1871E-01 8.1875E-01
0.30 7.4082E-01 7.4074E-01 7.4091E-01
0.40 6.7032E-01 6.7010E-01 6.7059E-01
0.50 6.0653E-01 6.0606E-01 6.0714E-01
....
4.60 1.0052E-02 -7.0237E-02 5.7632E-01
4.70 9.0953E-03 -7.2510E-02 6.0325E-01
4.80 8.2297E-03 -7.4627E-02 6.3077E-01
4.90 7.4466E-03 -7.6597E-02 6.5886E-01
5.00 6.7379E-03 -7.8431E-02 6.8750E-01
53
gnuplot> set xlabel "x" gnuplot> set ylabel "y=exp(-x)" gnuplot> set title "Pade approximation" gnuplot> plot "output.dat" using 1:2 title "Analytical" with lines, \ >"output.dat" using 1:3 title "L=1, M=2" with lines,\ >"output.dat" using 1:4 title "L=2, M=1"
with lines
CSC 7600 Lecture 14 : VisualizationSpring 2011
gnuplot
• Graduations starts with 0, and the interval is 0.5.– change graduations, use “set {x|y}tics” .
• Controlled by 3 optional numbers after “set tics” command. – One number: increment.
– Two numbers: initial value and increment.
– Three: initial value, increment and final value.
• Draw small tics inside the interval with the set m{x|y}tics n where n is the number of divisions.
54
CSC 7600 Lecture 14 : VisualizationSpring 2011
gnuplot
• Draw a color-mapped 3D figure by setting pm3d.
gnuplot> set xrange [-2:2] gnuplot> set yrange [-2:2] gnuplot> set pm3d gnuplot> splot exp(-x*x)*exp(-y*y)
55
CSC 7600 Lecture 14 : VisualizationSpring 2011
gnuplot
• References:• http://t16web.lanl.gov/Kawano/gnuplot/index-e.html• http://gnuplot.sourceforge.net/demo/index.html• http://www.gnuplot.info/ • http://www.duke.edu/~hpgavin/gnuplot.html• http://sparky.rice.edu/~hartigan/gnuplot.html• http://www.chemie.fu-berlin.de/chemnet/use/suppl/gpcard.html• http://gnuplot.flexkb.net/wc.dll?gnu~HomeTopic
56
CSC 7600 Lecture 14 : VisualizationSpring 2011
Topics
• Introduction • Application of Visualization• Challenges and Approaches• GnuPlot• OpenGL• VisIt• Summary – Materials for Test
57
CSC 7600 Lecture 14 : VisualizationSpring 2011
Visualization software
• Visualization software are present at both low and high levels of abstraction.
• Those at higher levels may use libraries from any software at the lower level.
• Visualization software implement different visualization algorithms.
58
CSC 7600 Lecture 14 : VisualizationSpring 2011
Visualization software
• OpenGL is a popular visualization software at a low level of abstraction.
• Visualization software like OpenDX, VTK, etc. use OpenGL libraries.
• Other popular graphic APIs similar to OpenGL are Mesa 3D (an open source version of OpenGL) and Direct3D (Microsoft).
• Common visualization software at high level of abstraction are OpenDX, Visualization ToolKit (VTK), AVS, Amira, Vis5D, Iris Explorer, Para View, etc.
59
CSC 7600 Lecture 14 : VisualizationSpring 2011
OpenGL
“OpenGL (Open Graphics Library) is a standard specification defining a cross-language cross-platform API for writing applications that produce 3D computer graphics (and 2D computer graphics as well). The interface consists of over 250 different function calls which can be used to draw complex three-dimensional scenes from simple primitives. OpenGL was developed by Silicon Graphics and is popular in the video games industry where it competes with Direct3D on Microsoft Windows platforms. OpenGL is widely used in CAD, virtual reality, scientific visualization, information visualization, flight simulation and video game development. “ ……Wikipedia
60
CSC 7600 Lecture 14 : VisualizationSpring 2011
OpenGL
• Hides the complexities of interfacing with different hardware platforms from the user.
• Accepts primitives such as points, lines and polygons, and converts them into pixels via a graphics pipeline called OpenGL state machine.
• Issues primitives to the graphics pipeline, configures how the pipeline processes these primitives.
61
CSC 7600 Lecture 14 : VisualizationSpring 2011
OpenGL
OpenGL pipeline:
Vertex data Per-Vertex Operations& Primitive Assembly
Rasterization
Per-fragment OperationsFramebuffer
62
CSC 7600 Lecture 14 : VisualizationSpring 2011
OpenGL
• Vertex data: Data for geometric objects consist of vertices.• Per-vertex operations: Translations and rotations are performed for
some vertices. Positions in the 3D world are projected onto positions on the screen. Lighting calculations are performed using the vertices, surface normal, light sources, and material properties.
• Primitive assembly: Clipping eliminates portions of geometry, which fall outside the screen.
• Rasterizations: Conversion of geometric data into fragments. Each fragment square corresponds to a pixel in the framebuffer. Color and depth (z coordinate) values are assigned.
• Per-fragment operations: Hidden surface removal using the depth buffer (z buffer) or alpha blending for transparent materials.
• Framebuffer: A collection of buffers that store data for screen pixels (screen is, for example, 1280 pixels wide and 1024 pixels high) such as color, depth information for hidden surface removal, etc.
63
CSC 7600 Lecture 14 : VisualizationSpring 2011
OpenGL
• Low-level API.• Programmer dictates the exact steps required to render
a scene as opposed to just describing the scene and letting the API handle it.
• Disadvantage: requires programmers to have a good knowledge of the graphics pipeline.
• Advantage: flexibility to implement novel rendering algorithms.
• Advantage: other high-level APIs can be created using OpenGL. e.g. VTK, VMD, Java3D, VRML, Open Inventor.
64
CSC 7600 Lecture 14 : VisualizationSpring 2011
OpenGL
• Completely independent of the operating system, allowing cross-platform development.
• However some integration with the native windowing system is required to allow clean interaction with the host system. This is performed through the add-on APIs GLX – X11, WGL – Microsoft Windows, CGL – Mac OS X.
• Additionally the GLUT and SDL libraries provide functionality for basic windowing using OpenGL, in a portable manner.
65
CSC 7600 Lecture 14 : VisualizationSpring 2011
OpenGLThis code draws a red sphere in a white window.#include <GL/glut.h>…………………….OpenGL Utility Toolkit: GLUT.
void display (void){ glClearColor(1.0, 1.0, 1.0, 0.0);………Clear the color buffer filled with the last picture before drawing.
glClear(GL_COLOR_BUFFER_BIT); glColor3f(1.0, 0.0, 0.0);………………..Set the color to red (RGB mode) before any drawing.
glutSolidSphere(0.4, 50, 40); glFlush();………………………………...Sends all buffered but not transmitted graphics data to the
display hardware.
}int main(int argc, char** argv){ glutInit(&argc, argv);………………………………………Initializes the GLUT library.
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);….Specifies a display mode (color mode or buffer). In this case, a single-buffered and RGB color mode window is specified.
glutInitWindowSize(500, 500);…..........Specifies window’s size in pixels.
glutInitWindowPosition(100, 100);………Specifies the location of the upper-left corner of the window.
glutCreateWindow(”A red sphere in a white window"); glutDisplayFunc(display);…Opens window with previously set characteristics (display mode, size, etc). Window is not displayed until glutMainLoop()is called.
glutMainLoop();…………….GLUT event processing loop. return 0;} 66
CSC 7600 Lecture 14 : VisualizationSpring 2011
OpenGL
• Popular because of excellent documentation. http://www.opengl.org.
• Current version is OpenGL 2.1.• Mesa 3D is a free/open source implementation of
OpenGL. http://www.mesa3d.org/.
67
CSC 7600 Lecture 14 : VisualizationSpring 2011
Topics
• Introduction • Application of Visualization• Challenges and Approaches• GnuPlot• OpenGL• VisIT• Summary – Materials for Test
68
CSC 7600 Lecture 14 : VisualizationSpring 2011
VisIt
• Visit is a free interactive parallel visualization and graphical analysis tool – used for viewing scientific data on UNIX, Windows
98/2000/XP, Mac OS. – developed at Lawrence Livermore National Laboratory.– released in 2002.
• Handles – multi-block data, mixed material zones, multi-species
materials. – many mesh types: 2D and 3D multi-block rectilinear,
curvilinear, and unstructured meshes.• http://www.llnl.gov/VisIt/home.html
69
CSC 7600 Lecture 14 : VisualizationSpring 2011
VisIt Examples
contour plot volume plot
CSC 7600 Lecture 14 : VisualizationSpring 2011
VisIt Features
• Has rich feature set for scalar, vector, and tensor field visualization
Operators consist of operations that can be performed on the data prior to visualization. Some examples include slice, index select, iso-surface, onion peel, reflect, threshold, and part selection.
• Provides qualitative and quantitative visualization and analysis
Line-out, which allows you to create curves from higher dimensional datasets by interactively defining lines using the mouse .
CSC 7600 Lecture 14 : VisualizationSpring 2011
• The cone operator is used to display data on the surface of a cone
VisIt Examples
CSC 7600 Lecture 14 : VisualizationSpring 2011
• The onion-peel operator is used to display fields in a local region around a cell.
VisIt Examples
CSC 7600 Lecture 14 : VisualizationSpring 2011
• The line-out creates curves of field values as a function of distance along the line.
VisIt Examples
CSC 7600 Lecture 14 : VisualizationSpring 2011
VisIt contains tools to interactively position geometric shapes used by the operators
VisIt Examples
CSC 7600 Lecture 14 : VisualizationSpring 2011
Multi-platform support
• Parallel and distributed architecture for visualizing terascale data sets – VisIt employs a distributed and parallel architecture in order to handle
extremely large data sets interactively.
• VisIt can run on a variety of platforms from PCs running Windows or Linux all the way up to supercomputers running AIX. – Windows XP, Vista, 7
– Linux (x86, x86_64, Itanium, Altix)
– MacOS X 10.4 through 10.6 (PowerPC and Intel)
– AIX 5.3
CSC 7600 Lecture 14 : VisualizationSpring 2011
Interfaces with C++, Python, and Java
• VisIt also supports C++, Python and Java interfaces.
• The C++ and Java interfaces make it possible to provide alternate user interfaces for VisIt or allow existing C++ or Java applications to add visualization support.
• The Python scripting interface gives users the ability to batch process data using a powerful scripting language. This feature can be used to create extremely sophisticated animations or implement regression suites.
CSC 7600 Lecture 14 : VisualizationSpring 2011
How to use VisIT
• VisIt can be controlled by a Graphical User Interface (GUI)
• or through the Python scripting language.
• The basic paradigm used by VisIt to visualize data is to create one or more plots in a visualization window.
• Plots take as input one or more variables.
• VisIt reads its data and performs most of its processing in compute engine processes.
• http://www.visitusers.org/index.php?title=Short_Tutorial
CSC 7600 Lecture 14 : VisualizationSpring 2011
OpenDX
• Based on code and ideas found in the IBM Visualization Data Explorer program product.
• On May 18, 1999 IBM announced the withdrawal of the program product.
• A week later the creation of the IBM Open Visualization Data Explorer was announced in conjunction with the creation of the IBM Deep Computing Institute.
• Latest version of OpenDX is 4.4.4.• Website: http://www.opendx.org/.
81
CSC 7600 Lecture 14 : VisualizationSpring 2011
Visualization Toolkit (VTK)
• An open-source freely available software system.• Visualize any data in 3D medical, scientific or financial
data.• Build applications with C++, Java or Tcl.• Implemented on Unix-based platforms and PC.• Source: http://public.kitware.com/VTK.• ParaView is a turn-key visualization system build on top
of VTK, and makes VTK easier to use with an interactive, point and click interface.
• ParaView also supports supercomputing applications, including tiled display and distributed parallel processing.
82
CSC 7600 Lecture 14 : VisualizationSpring 2011
Advanced Visual Systems(AVS)
• AVS Express, Open Viz.• Open Viz for displaying business data. Turns ordinary business
information into an interactive experience. • AVS/Express is a development environment. It is not an end-user,
point-and-click visualization tool. More power and complexity.• Object-oriented (C++, Java, Visual Basic).• Source: http://www.avs.com.
83
CSC 7600 Lecture 14 : VisualizationSpring 2011
Open Inventor
• Object-oriented toolkit (C and C++).• Platform independent.• Toolkit which presents a programming model based on a
3D scene database that dramatically simplifies graphics programming.
• Source: http://oss.sgi.com/projects/inventor/.
84
CSC 7600 Lecture 14 : VisualizationSpring 2011
Amira
• Based on OpenGL and Open Inventor.• Windows, Unix, Linux.• State-of-the-art visualization techniques allow you to
gain detailed insight into your data. Graphics hardware is utilized to display even very large data sets at interactive speed.
• Source: http://www.amiravis.com.
85
CSC 7600 Lecture 14 : VisualizationSpring 2011
Explosion in an underground bunker
86
CSC 7600 Lecture 14 : VisualizationSpring 2011
Topics
• Introduction • Application of Visualization• Challenges and Approaches• GnuPlot• OpenGL• VisIt• Summary – Materials for Test
88
CSC 7600 Lecture 14 : VisualizationSpring 2011
Summary – Material for the Test
• Goals of Visualization: (slides 5-6)• Uses of Visualization: (slides 15 - 25)• Visualization Challenges: (slides 28 - 31)• Gnuplot: (slides 33 - 45)• OpenGL: (slides 47- 54)• OpenDX: (slides 58 - 61)• Other Visualization Toolkits: (slides 65-68)
89
CSC 7600 Lecture 14 : VisualizationSpring 2011
OpenDX
• A programming environment for data visualization and analysis that employs a data-flow driven client-server execution model.
• Provides a graphical program editor that allows the user to create an interactive visualization using a point and click interface.
• Supports interactions in a number of ways, including via a graphical user interface with direct (i.e., in images) and indirect (i.e., via Motif widgets) interactors, visual programming, a high-level scripting language and a programming API.
• The indirect interactors are data-driven (i.e., they can configure themselves based on data characteristics).
• Visual and scripting language programming support hierarchy (i.e., macros) and thus, can be used to build complete applications.
• The programming API provides data support, error handling, access to lower level tools, etc. for building modules and is associated with a Module Builder utility.
91
CSC 7600 Lecture 14 : VisualizationSpring 2011
OpenDX
The principal components of OpenDX are• Data model
– This is the set of definitions, rules, and conventions used to describe Data Explorer entities (including data fields, geometrical objects, and images).
• Data Prompter– A user interface for describing data to be imported into Data Explorer.
• Data Browser– A user interface for viewing a data file, determining the layout and
organization of the data it contains, and transferring this information to the Data Prompter.
• Scripting Language– A high-level language for creating visualization programs. It can also be
used directly in a command mode to perform various tasks. Visual programs--i.e., the visualization programs displayed in the Visual Program Editor window as networks of module icons--are also written in the scripting language.
92
CSC 7600 Lecture 14 : VisualizationSpring 2011
OpenDX
• Visual Program Editor (VPE)– A graphical user interface for creating and modifying visual programs.
Programs created with this editor are translated into the scripting language by Data Explorer and are stored in that form.
• Modules– The building blocks (visualization tools) that constitute a visual program
network. They can be directly accessed and manipulated in the Visual Program Editor.
• Module Builder– A user interface for creating customized modules to be used in visual
programs.• Image Window
– An interactive window for viewing and modifying the presentation of the image produced by a visual program.
• Control Panels– A user interface for changing the parameter values used by a visual
program.
93
Recommended