Scientific Visualization in High Performance Computing - PowerPoint PPT Presentation

1 / 101
About This Presentation
Title:

Scientific Visualization in High Performance Computing

Description:

Broad field requiring technical knowledge and an understanding of many communication issues ... Get this view by rotating the scene around via left mouse button. ... – PowerPoint PPT presentation

Number of Views:149
Avg rating:3.0/5.0
Slides: 102
Provided by: adamz7
Category:

less

Transcript and Presenter's Notes

Title: Scientific Visualization in High Performance Computing


1
Scientific Visualization in High Performance
Computing
  • Chunfang Chen, Danny Thorne, Adam Zornes

CS 521, Spring 2002, University of Kentucky
2
Why We Are Here
  • Broad field requiring technical knowledge and
    an understanding of many communication issues
  • Information about the evolution, uses in
    computational science, and creative process
  • Descriptions of various software tools currently
    available, examples which illustrate techniques,
    and discussion of relevant concerns
  • Insight into the future of this field

3
History From Cave Paintings to CAVEs
  • Need for people to visualize information since
    dawn of time
  • At first this was done by hand
  • Required an artistic ability to mentally
    envision the phenomenon and the manual skills to
    create the image
  • Usually paper, but some others
  • Eventually, certain forms of visualization
    became accepted practices (ex. XY plots)

4
Why Bother?
  • COMPUTATIONAL SCIENCE
  • Laws of nature described by a set of equations
  • Yield numeric solutions
  • Produce vast amounts of information which are
    difficult to see, much less interpret

5
Issues at Hand
  • Interactive visualization
  • Increased control
  • May limit the percentage of data that can be
    examined at a time and the types of
    representation available Batch Process
  • Batch Process
  • Allow complex representations not possible in
    real time

6
Paper or Plastic, Bacon or Sausage,Qualitative
or Quantitative
  • Qualitative
  • View the entire dataset
  • Sense of the entire simulation
  • Provides context
  • Quantitative
  • Precisely represent a subset
  • Details provided
  • Ability to pore over a particular subset of data

7
Tying it together Computational Science and
Visualization
  • Begin with an observation
  • Express the observations in mathematics
  • Express the mathematics in discrete steps
  • Translate into a programming language
  • Solution is typically a dataset (set of values)
  • More intuitive visual form often aids in
    understanding

8
Down to Brass Tacks What Exactly is Scientific
Visualization
  • Scientific Visualization is the use of
    data-driven computer graphic to aid in the
    understanding of scientific information
  • Computer graphics is the medium of choice, but
    visualization is much more
  • Graphics are the tool, visualization is the
    process

9
Notable Alternatives
  • Primary alternative is aural
  • Haptic (force, texture, temperature, etc)
  • Other senses may be used
  • Perceptualization goal is to increase the
    information observers perception

10
Okay, Theyre Pretty Pictures, but How Can I Use
Them
  • Basically, anywhere in science
  • Sub-atomic world, vastness of the universe,
    complicated molecules, complicated machinery, etc
  • Variety of seemingly unrelated sciences share
    similar or identical computational techniques

11
Evolutions Not Involving Darwin
  • Started with simple printing of characters on
    paper
  • Vector display and plotter graphics
  • 3-D images
  • Animated 2-D
  • 3-D renderings of a simulation over time

12
Upping the Ante
  • As the tools improve, so have the idioms
  • Faster computing means more graphical
    computations can be done
  • Higher resolution displays allow for more detail
  • Higher expectations for presentations means an
    increased impact (has bad points)

13
What do You Want to Do Today?
  • Goal could be to demonstrate a scientific concept
    to others or to compare the patterns in the
    simulated data with patterns observed
  • Amount and level of explanation is based on the
    intended audience
  • The goal of the presentation, of course, will
    affect the presentation itself

14
The Four Habits of Successful Scientific
Visualizations
  • Several important steps in the process of
    creating an effective visualization
  • Can be seen as simply a transfer function between
    numbers and images
  • Another view is a barrage of procedures
  • data filtering, representation, potential
    inaccuracy, and human perception

15
The First in our Series of Lame Titles Data
Filtering
  • It is seldom possible to make pictures straight
    from the data source
  • Work needs to be done first
  • Cleaning removing noise, replacing missing
    values, etc.
  • Performing operations on the dataset to yield
    more useful data
  • Medium may also cause filtering

16
Representation Issues
  • Must choose an appropriate representation
  • Involves mapping those numbers to a geometric
    form, sonic waves, etc.
  • Requires a certain literacy on the part of the
    developer and the viewer
  • Must have proper symbols
  • Must indicate information about the simulation
    itself

17
Representation Issues Choosing a Medium
  • Must consider
  • Type of information
  • Primary goal
  • Level of detail
  • Resolution of the display
  • All affect the selection of an appropriate medium

18
Accuracy
  • Visualizations are not always subjected to
    intense critical examination
  • Glitz can make a visualization appealing but
    can also occlude the important elements
  • Sources of inaccuracy
  • Change of representation
  • Choices during production such as what to focus
    on and what colors and lighting to use

19
Fighting Inaccuracy with Labels
  • Labels
  • can be used as a tool for showing features of the
    visual representation
  • can be a means to help clarify potentially
    confusing or unclear items
  • make the visualization more clear,
    understandable, and useful as a means of
    communication

20
One Humans Perception
  • Perception does not exactly match with physical
    reality
  • Many elements cannot be directly perceived
  • Instruments can be used to sense elements we
    cant
  • Visualization often involves mapping of
    information to a form we can interpret
  • Much research into what humans perceive

21
More Than One Humans Perception
  • Each of our brains interprets the incoming
    signals differently
  • Experiences have trained our perceptual systems
    uniquely
  • Many biases constant throughout a culture
  • Colors are culturally biased
  • Take perception into account when designing an
    information display

22
Links
  • http//webct.ncsa.uiuc.edu8900/webct/public/home.
    pl
  • http//www.nas.nasa.gov/Groups/VisTech/visWeblets.
    html
  • http//www.llnl.gov/graphics/

23
NCSA VisBench
  • Scientific Visualization Standard of the Future

Danny Thorne, CS 521, University of Kentucky,
March 21, 2002
24
Outline
  • Introduction
  • Overview of VisBench
  • Summary of supporting applications
  • Background info
  • Tutorial
  • Small example
  • Big example

25
Overview
  • VisBench is a component-based system designed
    for visualization and analysis of remote data.
  • Server uses VTK (Visualization Toolkit).
  • Client uses Java.
  • Can also be used as a standalone tool for
    visualizing local data.

26
Goals
  • Minimize data movement.
  • Use HPC resources for visualization and
    analysis.
  • Provide application workbenches.
  • Minimize software costs.

http//visbench.ncsa.uiuc.edu/Presentations/iccs20
01.ppt
27
VisBench Component Architecture
Users interact with client applications to
request service or interact with graphics
Client
Client
Graphics
User request
Request Broker delegates request
Object Request Broker
Vis and Data Service Objects process request,
returning graphics or data.
Data Server
Analysis Server
Vis Server
http//visbench.ncsa.uiuc.edu/Presentations/iccs20
01.ppt
28
VisBench Components
Java Client
CAVE Client
Geometry Client
Application Workbench
Object Request Broker (CORBA)
File Server
O2K
Data Server
??? Server
VTK Server
MATLAB Server
http//visbench.ncsa.uiuc.edu/Presentations/iccs20
01.ppt
29
Middleware
  • Java RMI, DCOM, CORBA
  • CORBA
  • language neutral
  • vendor neutral
  • becoming accepted (in science domains)
  • IDL Interface Definition Language
  • http//www.corba.org

http//visbench.ncsa.uiuc.edu/Presentations/iccs20
01.ppt
30
VisBench Java GUI
  • Java Swing, http//java.sun.com/products/jfc/com
    ponents
  • Facilitates building a visualization pipeline.

31
VTK
  • General purpose visualization.
  • http//public.kitware.com/VTK/
  • Open source, 3D computer graphics, image
    processing, and visualization.
  • C class library and several interpreted
  • interface layers including Tcl/Tk, Java, and
    Python.
  • Scalar, vector, tensor, texture, and volumetric
    methods.
  • Implicit modelling, polygon reduction, mesh
    smoothing, cutting, contouring, and Delaunay
    triangulation.

32
WireGL
  • http//graphics.stanford.edu/software/wiregl/
  • Allows graphics (OpenGL) applications to render
    to a cluster of workstations outputting to a
    tiled display.
  • Implemented as an OpenGL driver allowing
    unmodified applications to render to cluster
    environment.
  • Support for TCP/IP and Myrinet GM protocols.
  • Geometry bucketing which only sends geometry to
    servers which need to render primitives.
  • Support for up to 32 rendering nodes.
  • Compiles under Windows, Linux, IRIX, AIX, IA64.
  • New features Support for multiple clients,
    software image recombination, parallel API,
    Windows Service support.

33
Jython
  • http//jython.sourceforge.net/
  • Python language implemented in Java.
  • Necessary for using VisBench in Local mode.
  • Necessary for displaying an image on the Tiled
    Display Wall.
  • Embedded scripting - Java programmers can add
    the Jython libraries to their system to allow end
    users to write simple or complicated scripts that
    add functionality to the application.
  • Interactive experimentation - Jython provides an
    interactive interpreter that can be used to
    interact with Java packages or with running Java
    applications. This allows programmers to
    experiment and debug any Java system using
    Jython.
  • Rapid application development - Python programs
    are typically 2-10X shorter than the equivalent
    Java program. This translates directly to
    increased programmer productivity. The seamless
    interaction between Python and Java allows
    developers to freely mix the two languages both
    during development and in shipping products.

34
Visualization Pipeline
  • Consists of a connected set of objects.
  • Data reader (Data source).
  • Filters -- extract slices from 3D data, compute
    contours, decimate polygonal data, etc.
  • Mapper -- maps the data to graphics primitives.
  • Renderer (Actor) Displays the scene. (Creates
    an image from the scene.)
  • Data source -gt Filter1 -gt Filter2 -gt ... -gt
    Mapper -gt Renderer
  • One can apply Hollywood terminology to the
    rendering process. There are light sources,
    actors (objects that get rendered), and a camera.
    Together these comprise a scene and it is the
    scene that gets rendered into an image.

35
http//www.epcc.ed.ac.uk/direct/VISWS/CINECA/img01
5.JPG
36
Typical VisBench Session
  • Start the GUI which reads in a boilerplate
    script and displays a 3-D axis.
  • Read in user's data file.
  • Construct a visualization pipeline.
  • Interactively view results of the pipeline save
    session (pipeline).

37
JRenderFrame
  • To start VisBench, run the vbJClient executable
    shell script.
  • Environment variables will be set.
  • An empty render window (JRenderFrame) will be
    displayed.
  • The Java Swing GUI will be displayed.
  • A boilerplate script runs and sets up predefined
    VTK objects and displays a 3D axes on the tiled
    wall.
  • If run without WireGL, the rendered results will
    appear in JRenderFrame and not on the tiled wall.

Rotate Left mouse button. Pan Middle mouse
button. Zoom Right mousebutton.
38
VisBench Java Swing GUI
  • Menu bar at the top.
  • Tabbed panels in the body.
  • Text feedback area at the bottom.
  • VBFrames will display in the Main panel
  • VBFrames contain parameters associated with a
    particular visualization object.

39
Data Formats
  • VisBench inherits being able to read any format
    supported by a visualization engine. In the case
    of VTK, there are VTK data formats.
  • Some of the basic formats include structured
    points, unstructured points, polygonal data,
    structured grids, and unstructured grids.
  • In addition to being able to read VTK formats,
    VTK also has readers for other formats, e.g.,
    PLOT3D, OBJ, BYU, DEM, STL, SLC, etc.
  • VisBench provides additional readers that rely
    on other libraries being available, e.g., HDF4
    and HDF5.

40
Tutorial
  • Adapted from http//visbench.ncsa.uiuc.edu/Displa
    yWall/Tutorial/
  • Hello Cone example.
  • Office CFD data example.

41
Example Hello Cone
42
Hello Cone, Step 1
  • Begin by selecting Cone from the Source menu.
  • Source -gtCone.

43
Hello Cone, Step 2
A VBFrame as shown below (left) will be displayed
in the Main panel. At this point, you can change
the name of the object (by default objects
have predefined base names followed by a sequence
number, e.g. "cone1"), as well as change the
parameters of the cone. Press the Create button.
You will notice the Name field is disabled, the
Hide/Show button is enabled, and the Create
button is changed to Update. Once the cone is
created, you can change parameters in the VBFrame
and Update. The Hide button removes the cone from
the rendering. This button is actually a toggle
Hide/Show.
44
Hello Cone, Step 3
  • cone1 shows up in the Objects menu.

45
Example Office CFD Data
  • Sample dataset of an office room.
  • Velocity (vector) field .
  • Temperature (scalar) field.

46
Office CFD Data Create Reader
  • Create a reader Reader -gt VTK -gt VTK Struct
    Grid.
  • This will display a VBFrame for reading in the
    data file.
  • The VBFrame is shown on the next slide.

47
Office CFD Data File to Read
  • The IDir (input directory) field will be filled
    in using the VISBENCH_DATA value set in your
    vbJClient shell script.
  • Enter "office.vtk" into the File field and press
    the Create button.
  • Note that office.vtk is sample data that comes
    with VTK.
  • However, in the new version of VTK (4.0), its
    called office.binary.vtk, and there is no
    office.vtk that I found.

48
Office CFD Data Metadata
  • After entering "office.vtk" into the File field
    and pressing the Create button.
  • The Metadata panel will be filled in and a
    bounding box of the data will be displayed in the
    render window (on next slide).

49
Office CFD Data Reset View
  • Reset the view in order to see the entire
    bounding box.
  • View -gt Reset.

50
Office CFD Data Slice
  • Display a single slice through the data.
  • Scalar -gt Orthog Slice -gt constant X.
  • X slice VBFrame, default name "xslice1".
  • Type "vtkSG1 as the Input object
  • Create.
  • xslice1 frame is updated.
  • A slice will be created at the midpoint of this
    range (see next slide).

51
Office CFD Data Slice Pos Res
  • Get this view by rotating the scene around via
    left mouse button.
  • Slice is at the midpoint of the X range.
  • Move the slider to adjust the positioning of the
    slice.
  • Change resolution with Res drop-down box.

52
Office CFD Data Slice Copy
  • Press the Copy button on in the xslice1 frame to
    get another slice.
  • The copy, xslice2, inherits many properties of
    xslice1, except it is initialized at the midpoint
    of the X range.

53
Office CFD Data Slice Properties
  • Press the Property button for xslice2.
  • Plane definition (3 points), range of the scalar
    field, colormap, diffuse, ambient, opacity,
    display representation, backfaces.
  • On the next slide, we will change the value of
    Opac.

54
Office CFD Data Opacity
55
Office CFD Data Streamlines
  • Create some streamlines.
  • Vector -gt Streamline -gt I,J,K seed.
  • Enter the Input object.
  • Press Create.

56
Office CFD Data Change Seed
  • Change the seed.
  • (I,J,K) specifies the region in which
    streamlines will be seeded.
  • Note that in this example, streamlines are
    seeded from a thin line that extends all the way
    across the domain in the J-direction.

57
Office CFD Data Tubular
  • Make the streamlines tubular.
  • Color them by velocity magnitude.

58
Office CFD Data Update
59
Office CFD Data Starting Over
  • Hide xslice1, xslice2, sline1, and
    sline1IJKSeed.
  • Reset the view.
  • Then there should be nothing left except the
    bounding box and the axes shown in the default
    view.

60
Office CFD Data Vector Glyphs
  • Create a tiny cone.
  • This will be used as a glyph.

61
Office CFD Data Extract K Slice
  • Extract a K slice.
  • (I,J,K) specifies the region of the slice.
  • This will be where the cone glyphs live.
  • We dont want cone glyphs in the whole space.
    That would be too cluttered.

62
Office CFD Data Wireframe
  • Change the K slice to wireframe display mode.

63
Office CFD Data Display Glyphs
64
Saving/Restoring a Session
After conducting a VisBench session, you will
probably want to save the results of your your
pipeline. To do so, use File -gt Save Session.
This will create an XML file containing all the
current VBFrames, as well as the render window's
parameters (including the camera orientation).
When you return at a later time, you can simply
read in your saved session via File -gt Read
Session and have your pipeline automatically
executed. Note 1 Like any other computer
application, it's a good idea to save (update)
your session file frequently. Note 2 While it is
possible for a user to manually edit the XML
session file, one should do so with care.
65
Animations
66
Access to VTK Classes
67
VisBench Related Links
  • Tech Focus gt Projects gt NCSA Projects --
    http//www.ncsa.uiuc.edu/TechFocus/Projects/NCSA/V
    isBench.html
  • VTK Home Page -- http//public.kitware.com/VTK/
  • NCSA VisBench for a Tiled Display Wall --
    http//visbench.ncsa.uiuc.edu/DisplayWall/
  • Parallel Computing WithThe Visualization Toolkit
    (VTK) -- http//www.epcc.ed.ac.uk/direct/VISWS/CIN
    ECA/index.htm
  • VisBench Presentations -- http//visbench.ncsa.ui
    uc.edu/Presentations/
  • Supercomputing '99 VisBench, Condor-Globus --
    http//www.ncsa.uiuc.edu/heiland/sc99/
  • Welcome To The OMG's CORBA Website --
    http//www.corba.org
  • Java(TM) Foundation Classes --
    http//java.sun.com/products/jfc/components
  • WireGL -- http//graphics.stanford.edu/software/w
    iregl/
  • Jython Home Page -- http//jython.sourceforge.net
    /
  • Parallel Computing With The Visualization
    Toolkit (VTK) -- http//www.epcc.ed.ac.uk/direct/V
    ISWS/CINECA/index.htm
  • NCSA Grid-in-a-Box -- http//www.ncsa.uiuc.edu/Te
    chFocus/Deployment/GiB/

68
General Links, Page 1
  • Visualization/VR Projects at HPC2N --
    http//www.hpc2n.umu.se/projects/visvr/
  • Scientific Computing and Visualization Home Page
    -- http//scv.bu.edu/
  • LBNL Visualization Group -- http//www-vis.lbl.go
    v/index.html
  • Electronic Visualization Laboratory at
    University of Illinois at Chicago --
    http//www.evl.uic.edu/home.html
  • Parallel Computing Links -- http//www.indiana.ed
    u/rac/hpc/links.html
  • SCV Virtual Reality - LIVE -- http//scv.bu.edu/L
    IVE/
  • Boston University MARINER Project Home Page --
    http//mariner.bu.edu/
  • Alliance Advanced Computational Resources --
    http//alliance.bu.edu/Alliance/ACR.html
  • evl papers scientific visualization --
    http//www.evl.uic.edu/paper/template_pap.php3?cat
    7
  • Data Retrieval Through Virtual Experimentation
    -- http//www.evl.uic.edu/aej/papers/cgi/cgi.html
  • Data Analysis Group -- http//www.nas.nasa.gov/Gr
    oups/VisTech/
  • HipArt -- Home -- http//scv.bu.edu/hipart/
  • HPC2N -- http//www.hpc2n.umu.se/
  • Fakespace Systems Inc. - Better Ways to Create
    Communicate -- http//www.fakespacesystems.com/
  • Teleimmersion at EVL -- http//www.evl.uic.edu/ca
    vern/
  • hewlett-packard workstations / scalable
    visualization -- http//www.hp.com/workstations/pr
    oducts/immersive/index.html
  • SGI - Visualization Systems Overview --
    http//www.sgi.com/visualization/
  • SGI - SGI Reality Center Home Page --
    http//www.sgi.com/realitycenter/
  • Video projector page. Hometheater video --
    http//www.hometheater1.com/proj.htm

69
General Links, Page 2
  • Third Party Applications Directory --
    http//www.sgi.com/products/appsdirectory.dir/apps
    /app_number284136.html
  • Da-Lite Reflections -- http//www.da-lite.com/ed
    ucational_materials/reflections.php?actiondetails
    issueid15
  • Computer Visualization Hardware and Software
    used at IMV -- http//www.bocklabs.wisc.edu/sciviz
    .html
  • UMSI User's Guide - Scientific Visualization --
    http//www.msi.umn.edu/user_support/scivis/scivis-
    list.html
  • Teleimmersion at EVL -- http//www.evl.uic.edu/ca
    vern/
  • Barco Projection Systems -- http//www.barco.co
    m/projection_systems/index.asp?topicproduct
  • Scientific Development Visualization
    Laboratory -- http//www.msi.umn.edu/sdvl/
  • Tools for Scientific Visualization --
    http//math.nist.gov/mcsd/savg/vis/tools.html
  • AHPCC Research Activities -- http//www.ahpcc.unm
    .edu/Research/Viz/
  • Va Tech - Lab for Scientific Visual Analysis --
    http//www.sv.vt.edu/
  • Scientific Visualization -- http//cmag.cit.nih.g
    ov/Suh/sci_vis_ve.htm
  • What is SciVis -- http//www.cc.gatech.edu/scivis
    /tutorial/linked/whatisscivis.html
  • USGS OFR 00-325 What Visualization Contributes
    to Digital Mapping -- http//pubs.usgs.gov/openfil
    e/of00-325/morin.html
  • IEC - IRIS Explorer Center -- http//www.nag.com/
    Welcome_IEC.html
  • Stereoscopic 3D Virtual Reality Homepage -
    Complete Market Surveys of 3D-Glasses VR-Helmets
    3D-Software -- http//www.stereo3d.com/3dhome.htm
  • SDSC Web Center -- http//www.sdsc.edu/webcenter/
    response.cgi?categoryGraphics
  • SDSC Visualization and Graphics Software --
    http//www.sdsc.edu/Software/vis.html
  • Scientific Visualizations -- http//www.scivis.or
    g/
  • GC3 Software Archive Data Visualization --
    http//lca.ncsa.uiuc.edu8080/archives/soft_vis.ht
    ml

70
General Links, Page 3
  • SAL- Scientific Data Processing Visualization
    - Software Packages -- http//sal.kachinatech.com/
    D/1/index.shtml
  • NCSA Software Tools -- http//archive.ncsa.uiuc.e
    du/SDG/Software/SDGSoftDir.html
  • PACI -- http//www.paci.org/
  • Scientific Visualization at PSC --
    http//www.psc.edu/general/software/categories/gra
    phics.html

71
Visualization Using MATLAB
  • Chunfang Chen
  • March 26, 2002

72
What is Visualization
  • Use of graphical
  • representations of
  • information to make
  • certain characteristics
  • or values more
  • apparent.

73
What is Visualization (cont.)
  • Visualization conveys information by employing
  • geometric forms (e.g., surfaces, solids) and
    colors
  • that are mapped to data values in particular
    ways.
  • The geometric forms may represent real-life
  • objects, such as an airplane or wave guide, or
    may
  • be graphical elements that indicate data value
  • such as streamlines or slice planes.

74
Automated Example
75
Why Visualization
  • There is truth to the phrase A picture is worth
    a thousand words. Visualizations help users
    understand their data.
  • Visualization helps researchers find errors in
    their simulations and experiments.
  • Researchers can see complex patterns and
    relationships in their data.
  • Conveys information and ideas efficiently among
    collaborators
  • Visualization helps educate funders and the
    public.

76
Visualization Process
  • Generate Data
  • Determine what type of analysis desired and
    target audience
  • Convert Data to geometry
  • Render Geometry
  • Verify accuracy of visualization

77
Visualizations in MATLAB
  • - Graphics
  • plotting vector and matrix
  • data in 2-D representation
  • - 3-D Visualization
  • plot with information about
  • 3-D line and surface graph

78
2-D Graph
  • Analysis of small portions of the data
  • few variables per graph
  • inexpensive

79
Basic Plotting functions in 2-D Graphs
  • plot Graph 2-D data with linear scales
    for both axes
  • loglog Graph with logarithmic scales for
    both axes
  • semilogx Graph with a logarithmic scale for the
    x-axis
  • and a linear scale for the
    y-axis
  • semilogy Graph with a logarithmic scale for the
    y-axis and
  • a linear scale for the x-axis
  • plotyy Graph with y-tick labels on the
    left and right side

80
Example
  • t 0pi/1002pi
  • y1 sin(t)
  • plot(t,y)
  • grid on
  • y2 sin(t-0.25)
  • y3 sin(t-0.5)
  • plot(t,y1,t,y2,t,y3)

81
Specialized plot
  • Bar and area
  • - graphs are useful to view results over
    time, comparing results,
  • and displaying individual contribution to
    a total amount.
  • Pie charts
  • - show individual contribution to a total
    amount.
  • Stem and stair step
  • - plots display discrete data.
  • Compass, feather, and quiver
  • - plots display direction and velocity
    vectors.
  • Contour
  • - plots show equivalued regions in data.
  • Animations
  • - add an addition data dimension by
    sequencing plots.

82
Specialized plots (cont.) Bar - view results
over time
  • temp 29 23 27 25 20 23 23 27
  • days 0535
  • bar(days,temp)
  • xlabel('Day')
  • ylabel('Temperature (oC)')

83
Specialized plots (cont.) Histogram - show the
distribution of data
  • yn randn(10000,1)
  • hist(yn)

84
Specialized plots (cont.)quiver - display
direction and velocity vectors.
  • n 2.0.22.0
  • X,Y,Z peaks(n)
  • contour(X,Y,Z,10)
  • U,V gradient(Z,.2)
  • hold on
  • quiver(X,Y,U,V)
  • hold off

85
Specialized plots (cont.)Contour plots show
equivalued regions in data.
  • X,Y,Z peaks
  • contour(X,Y,Z,20)

86
3-D Graph
  • Varying, larger and more complex data sets
  • Information dissemination

87
Line Plots of 3-D Data
  • t 0pi/5010pi
  • plot3(sin(t),cos(t),t)
  • axis square grid on

88
Representing a Matrix As a Surface
  • mesh, surf
  • - Surface plot
  • meshc, surfc
  • - Surface plot with contour plot beneath it
  • Meshz
  • - Surface plot with curtain plot (reference
    plane)
  • Pcolor
  • - Flat surface plot (value is proportional
    only to color)
  • Surfl
  • - Surface plot illuminated from specified
    direction
  • Surface
  • -Low-level function (on which high-level
    functions are
  • based) for creating surface graphics
    objects

89
3-D graph Example Surface plot
  • X,Y meshgrid(-8.58)
  • R sqrt(X.2 Y.2) eps
  • Z sin(R)./R
  • mesh(Z)

90
Volume Visualization Techniques
  • Volume visualization is the creation of graphical
  • representations of data sets that are defined on
    three
  • dimensional grids. Volume data sets are
    characterized by
  • multidimensional arrays of scalar or vector data.
    These
  • data are typically defined on lattice structures
    representing
  • values sampled in 3-D space. There are two basic
    types of
  • volume data
  • Scalar volume data contains single values for
    each point.
  • Vector volume data contains two or three values
    for each
  • point, defining the components of a vector.

91
Visualizing Scalar Volume Data
  • x,y,z,v flow
  • min(v())
  • ans -11.5417
  • max(v())
  • ans 2.4832
  • Hpatch patch(isosurface(x,y,z,v,0))
  • isonormals(x,y,z,v,hpatch)
  • set(hpatch,'FaceColor','red','EdgeColor','none')
  • daspect(1,4,4)
  • view(-65,20)
  • axis tight
  • camlight left
  • set(gcf,'Renderer','zbuffer') lighting phong

92
Visualizing Vector Volume Data
  • load wind
  • zmax max(z()) zmin min(z)))
  • streamslice(x,y,z,u,v,w,,,(zmax-zmin)/2)

93
GUI Application in PDE
  • The Elliptic Equation is given by

94
GUI Application (cont.)
  • Invoke MATLAB
  • Pdetool
  • Option grid
  • Draw rectangle /circle ( or use the button)
  • Open a dialog box to edit coordinates.

95
GUI Application (cont.)
  • (R1C1R2)-C2
  • Save as .M file

96
GUI Application (cont.)
  • Boundary Boundary mode (or click the boundary
    icon)

97
GUI Application (cont.)
  • Select segments and set the Neumann boundary
    condition dn/du -5 (g -5)

98
GUI Application (cont.)
  • Select Elliptic
  • Put in coefficient value

99
GUI Application (cont.)
  • Mesh Initialize mesh
  • Refine mesh
  • Solve Solve PDE (or press button)

100
GUI Application (cont.)
101
GUI Application (cont.)
  • Plot - Parameter
  • Choose 3-D plot

102
GUI Application (cont.)
103
Resources
  • http//www.mathworks.com/access/helpdesk/help/tool
    box/rtw/rtw.shtml
  • http//www-vis.lbl.gov/index.html
  • http//scv.bu.edu/
  • http//www.ncsa.uiuc.edu/
  • http//math.nist.gov/mcsd/savg/vis/tools.html
Write a Comment
User Comments (0)
About PowerShow.com