Lecture
2
Basic
Data Representation
(includes text and images from the 3rd edition of the VTK
User's Guide)
Four
views of the Earth

Discrete
nature of data (Chap 5 vtk)
(possibly) continuous data represented by discrete sampling
Interpolation
- (nearest
neighbour)
- linear
- quadratic
- cubic
- spline
A
familiar example is a weather map showing the current temperature
across the state or country, but the data is only sampled at certain
scattered stations which is then interpolated.
http://www.sws.uiuc.edu/warm/icnstationmap.asp
Here
is another nice example of interpolating winds from the San Francisco
Bay area
http://sfports.wr.usgs.gov/wind
Structured
or Unstructured Data
- Regular
(Structured)
- stored
more compactly, faster computation
- single
mathematical relationship within composing points (geometry) and cells
(topology)
- Irregular
(Unstructured)
Dimension
(number of independent variables)
Abstract
Dataset
- Structure
- Topology
- set of properties invariant under rotation, translation, non-uniform
scaling
- Geometry
- instantiation of topology, the specification of positions in 3-space
- Consists
of one or more Cells (topology) and Points (geometry)
- Data
Attributes - supplemental info associated with topology or geometry eg
scalars, vectors, normals, texture coords, tensors
Cells
specify topology while points specify geometry

Types
of Datasets (each of these has their own class in vtk)
- image
data - points and cells on a regular rectangular lattice
- if points
and cells are arranged on a plane -> pixmap / bitmap / image
- if
arranged as stacked planes -> volume
- regular
(structured) geometry and topology
- rectilinear
grid - points and cells on a regular lattice
- rows,
columns, planes are parallel to x-y-z coordinate system
- regular
topology, geometry only partially regular (spacing between points may
vary)
- structured
grid
- regular
topology, irregular geometry
- warped
into any configuration w/o overlap or intersection
- topology
stored implicitely
- geometry
explicitely represented by array of point coordinates
- cells are
quadrilaterals (2D) or hexahedron (3D)
- useful
for finite difference computions - fluid flow, heat transfer,
combustion
- unstructured
points - points irregularly located in space
- no
topology, completely unstructured geometry
- typically
converted to a more structured form for visualization
- polygonal
data
- unstructured
topology and geometry
- collection
of graphics primitives (vertices, lines, polygons, triangle strips,
etc)
- unstructured
grid
- most
general
- completely
unstructured topology and geometry
- requires
most memory and processing
- used in
structural design, vibration, dynamics, heat transfer
Cell
- type plus
connectivity list (ordered list of points)

Linear
Cells - linear or constant interpolation functions
- vertex -
0D cell
- polyvertex
- composite 0-dimensional cell
- arbitrary
ordered list of points
- line- 1D
cell
- 2 points
- direction is from first to second
- polyline
- composite 1-dimensional cell
- one or
more connected lines, from point i to i+1
- triangle
- 2D cell
- counter-clockwise
ordering of 3 points
- triangle
strip - composite 2-dimensional cell
- one or
more triangles, (i, i+1, i+2) defines a triangle
- points
need not lie in a plane
- quadrilateral
- 2D cell
- ordered
list of 4 points in a plane,
- counter-clockwise
ordering, convex, edges do not intersect
- pixel* -
2D cell
- special
case of quadrilateral
- ordered
list of 4 points in a plane
- each edge
is parallel to one of the 3 axis
- each edge
perpendicular to its adjacent ones
- points
ordered in direction of increasing axis coordinate
- 4
'traditional' pixels form the corners of this kind of pixel
- polygon -
2D cell
- ordered
list of 3+ points lying in a plane
- counter-clockwise
ordering
- may be
concave, but not intersecting
- tetrahedron
- 3D cell
- 6 edges
and 4 triangular faces defined by 4 non-planar points
- hexahedron
- 3D cell
- 12 edges
and 6 quadrilateral faces defined by 8 vertices, convex
- voxel* -
3D cell
- special
case of hexahedron
- 12 edges
and 6 quadrilateral faces defined by 8 vertices, convex
- each face
is perpendicular to one of the axis
- point
list ordered in direction of increasing coordinate value
- 8
'traditional' voxels form the corners of this kind of voxel
- wedge -
3D cell
- 3
quadrilateral faces and 2 triangular and 9 edges defined by 6 vertices
- must be
convex, faces and edges must not intersect
- ordered
list of 6 vertices
- pyramid -
3D cell
- 1
quadrilateral face and 4 triangular faces and 8 edges defined by 5
vertices
- 4 points
defining base must be convex, apex not coplanar w/ base

Nonlinear
Cells
more
accurate rate interpolation functions
model curved geometry better
linear
easily converted to linear graphics primitives. nonlinear (except maybe
for NURBS) must first be converted (tesselated) into linear form
- quadratic
edge - 3 points - 2 points at endpoints, 1 in middle of edge
- quadratic
triangle - 6 points - 3 at endpoints, 3 in middle of edges
- quadratic
quadrilateral - 8 points - 4 at vertices, 4 in middle of edges
- quadratic
tetrahedron - 10 points - 4 at vertices, 6 in middle of edges
- quadratic
hexahedron - 20 points - 8 at vertices, 12 in middle of edges
Attribute
Data
- scalar -
single value at each location in dataset
- vector -
magnitude and direction
- normal -
direction vector (magnitude = 1)
- texture
coordinate (2D, 3D)
- tensor
(generalization of vector and matrix)
- rank 0 -
scalar
- rank 1 -
vector
- rank 2 -
matrix
- rank 3 -
3D rectangular array
Some
More examples with ParaView
gcanyon.raw
(which can be found at ftp.evl.uic.edu in pub/INcoming/andy) contains a
height map of the grand canyon as a 625x376 greyscale image. ParaView
can load this image by setting the data type to 'unsigned char', the
File Dimensionality to 2, and then setting the extents as 0-624, 0-375.
This will bring up a greyscale image. then you can use the Contour
filter to define a series of contours. As the scalar values in the file
range from 103 to 224 you could set up contours at 125, 150, 175 and
200 for example. These contours would initially all be in the same
plane, but you can also translate them in Z. You may also need to edit
the colour map and reset the range (it should be 103 to 224)
Using
paraview 2.X you can also take the data and extract a surface from it.
Once you have the surface you can warp it onto 3D. With paraview 3 beta
you need to tetrahedralize the data and then apply the warp scalar.


A
dataset that comes with the vtk cdrom in VTKData/Data is ironProt.vtk.
Since it is a .vtk file the header of this file contains the
information that vtk needs to properly load the data in. Like the
visible woman dataset we can use the contour tool to generate contours.
In the image below there is a contour at 50 shown as wireframe, another
contour at 200 shown as a surface, and then a cutting plane.

Some
nice examples:
Nasa
hurricane season animation

airplane
flight patterns across the US - http://youtube.com/watch?v=dPv8psZsvIU

Coming
Next Time
Fundamental
Algorithms (1 of 2)
last
revision 4/27/08