24 Visualization
24 Visualization
SCI, Utah
Scientific Visualization
• Visualize large datasets in scientific and medical applications
• Generally do not start with a 3D model
• Volume Rendering
Blood flow in
• Vector Fields human carotid artery
2D Scalar Field
• z = f(x,y)
1− x2 − y2 , if x 2 + y 2 < 1
f ( x, y ) = 0
1− x − y ,
2 2
if x + y < 1
2 2
f ( x, y ) = 0
Contours
1− x − y ,
2 2
if x + y < 1
2 2
f ( x, y ) = 0
Density plot
Density is proportional to the value of the function
2D Scalar Field
• z = f(x,y)
1− x − y ,
2 2
if x + y < 1
2 2
f ( x, y ) = 0
1− x − y ,
2 2
if x + y < 1
2 2
f ( x, y ) = 0
Height plot
Shows shape of the function
Height Field
• Visualizing an explicit function
z = f(x,y)
f(x,y) = c
Meshes
• Function is sampled (given) at xi, yi, 0 i, j n
• Assume equally spaced
f>c
Marching Squares
• Sample function f at every grid point xi, yj
• For every point fi j = f(xi, yj) either fi j c or fi j > c
Ambiguities of Labelings
Ambiguous labels
Different resulting
contours
Resolution by subdivision
(where possible)
Cases for Vertex Labels
16 cases for vertex labels
• Analogous calculation
xi xi+1
for y direction x
fi j = a < c c < b = fi+1 j
Marching Squares Examples
Marching Squares Examples
Adaptive Subdivision
Outline
• 2D Scalar Fields
• 3D Scalar Fields
• Volume Rendering
• Vector Fields
3D Scalar Fields
• Volumetric data sets
• Example: tissue density
• Assume again regularly sampled
• Represent as voxels
28 = 256
Marching Cubes
• 14 cube labelings (after elimination symmetries)
Marching Cube Tessellations
• Generalize marching squares, just more cases
• Interpolate as in 2D
• Ambiguities similar to 2D
Marching Squares Examples
Marching Squares Examples
Example (Utah)
Outline
• 2D Scalar Fields
• 3D Scalar Fields
• Volume Rendering
• Vector Fields
Volume Rendering
• Some data is more naturally modeled as a volume, not a surface
• Use all voxels and transparency (a-values)
Mantle Convection
G. Kindlmann
Volume Rendering Pipeline
• Use opacity for emphasis
Trilinear
interpolation
Trilinear Interpolation
Bilinear interpolation
Trilinear interpolation
Splatting
• Alternative to ray tracing
• Assign shape to each voxel (e.g., sphere or Gaussian)
• Project onto image plane (splat)
• Draw voxels back-to-front
• Composite (a-blend)
3D Textures
• Alternative to ray tracing, splatting
• Build a 3D texture (including opacity)
• Draw a stack of polygons, back-to-front
• Efficient if supported in graphics hardware
• Few polygons, much texture memory
3D RGBA texture
Viewpoint
not
and
head or
Acceleration of Volume Rendering
• Basic problem: Huge data sets
• Octrees
• Use error measures to stop iteration
• Exploit parallelism
Outline
• Height Fields and Contours
• Scalar Fields
• Volume Rendering
• Vector Fields
Vector Fields
• Visualize vector at each (x,y,z) point
– Example: velocity field
• Hedgehogs
– Use 3D directed line segments (sample field)
– Orientation and magnitude determined by vector
• Glyph
– Use other geometric primitives
– Cones
Blood flow in
human carotid artery
Vector Fields (Utah) Tornado
Glyphs for air flow
Magnetic field
Plasma disruption
More Flow Examples
http://www.sci.utah.edu/
Summary
• Height Fields and Contours
• Scalar Fields
– Isosurfaces
– Marching cubes
• Volume Rendering
– Volume ray tracing
– Splatting
– 3D Textures
• Vector Fields
– Hedgehogs
– Glyph
Announcements