Download - Lecture 2 : Visualization Basics
![Page 1: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/1.jpg)
Lecture 2 : Visualization Basics
Bong-Soo Sohn
School of Computer Science and Engineering
Chung-Ang University
![Page 2: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/2.jpg)
Surface Graphics
• Objects are explicitely defined by a surface or boundary representation (explicit inside vs outside)
• This boundary representation can be given by:– a mesh of polygons :
– a mesh of spline patches
![Page 3: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/3.jpg)
Surface Graphics : Pros and Cons
• Pros : – fast rendering algorithms are available– acceleration in special hardware is relatively easy and cheap (many $200
game boards)– use OpenGL to specify rendering parameters– surface realism can be added via texture mapping
• Cons :– discards the interior of the object and just maintains the object’s shell– does not facilitate real-world operations such cutting, slicing, disection– does not enable artificial viewing modes such as semi-transparencies, X-
ray– surface-less phenomena such as clouds, fog, gas are hard to model and
represent
![Page 4: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/4.jpg)
Volume Graphics
• Maintains a 3D image representation that is close to the underlying fully-3D object (but discrete)
![Page 5: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/5.jpg)
Volume Graphics : Pros and Cons
• Pros : – can achieve a level of realism (and ‘hyper-realism’) that is
unmatched by surface graphics– allows easy and natural exploration of volumetric datasets
• Cons :– has high rendering complexity
Rendering of the inside of a human colon
surface rendered volume rendered
![Page 6: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/6.jpg)
Volumetric Image (3D image, volume)
• it is a 3D array of point samples, called voxels (volume elements)• the point samples are located at the grid points• the process of generating a 2D image from the 3D volume is called
volume rendering
![Page 7: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/7.jpg)
Basics on Differentiation (of Scalar and Vector Function)
• Refer to Prof. Han-Wei Shen’s Notes.
• Useful for understanding images and gradients
![Page 8: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/8.jpg)
Data Acquisition
• Scanned/Sampled Data– CT/MRI/Ultrasound– Electron Microscopy
• Computed/Simulated Data
• Modeled/Synthetic Data
![Page 9: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/9.jpg)
Time-Varying Data•
• Time-Varying Data from Scanning
![Page 10: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/10.jpg)
Evolutionary Morphing
![Page 11: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/11.jpg)
Imaging Scanners
• Scanners can yield both domains and functions on domains– Scanners yielding domains
• Point Cloud Scanners: 300μ-800μ• CT, MRI: 10μ-200μ• Light microscopy: 5μ-10μ• Electron microscopy: < 1μ• Ultra microscopy like Cyro EM 50Å-100Å
![Page 12: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/12.jpg)
Imaging Techniques
• Computed Tomography (CT)– Measures spacially varying X-ray attenuation coefficient
– Each slice 1-10mm thick
– High resolution , low noise
– Good for high density solids
• Magnetic Resonance Imaging (MRI)– Measures distribution of mobile hydrogen nuclei by quantifying relaxation
times
– Moderate noise
– Works well with soft tissue
• Ultrasound– Handheld probe
– Inexpensive, fast, and real-time
– High noise with moderate resolution
![Page 13: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/13.jpg)
Various Data Characteristics
• Static • Scalar• Meshed• Dense
• Time varying data• Vector , Tensor• Meshless• Sparse
![Page 14: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/14.jpg)
Data Format
• Mesh (Grid) Type– Regular– Rectilinear– Unstructured– Meshless
• Mesh type conversion– Meshless to meshed
![Page 15: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/15.jpg)
Mesh Types
• Mesh taxonomy– Regular static meshes:
• There is an indexing scheme, say i,j,k, with the actual positions being determined as i*dx, j*dy, k*dz.
• If dx=dy=dz, then,– In 2-D, we get a pixel, and in 3-D, a voxel.
dy
dx
A 2-D regular rectilinear grid
![Page 16: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/16.jpg)
Mesh Types
– Irregular static meshes:• Rectilinear:
– Individual cells are not identical but are rectangular, and connectivity is related to a rectangular grid
dx, dy are not constant in grid,but connectivity is similar in topologyto regular grids.
A 2-D regular rectilinear grid
![Page 17: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/17.jpg)
Mesh types (contd)
• Curvilinear:– Sometimes called structured grids as the cells are
irregular cubes – a regular grid subjected to a non-linear transformation so as to fill a volume or surround an object.
A 2-D curvilinear grid
![Page 18: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/18.jpg)
Mesh Types (contd) • Unstructured:
– Cells are of any shape (tetrahedral), hexahedra, etc with no implicit connectivity
• Hybrid:– Combination of curvilinear and unstructured grids.
– Dynamic (Time-varying) meshes
![Page 19: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/19.jpg)
Triangulations (Delaunay) & Dual Diagrams (Voronoi)
Union of ballsTriangulation & DualNerve sub-complex
Meshless Data Meshed Data
![Page 20: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/20.jpg)
Particle Data to Meshes
Weighted point P = ( p, wp ) where
Power distance from
with is the Euclidean distance
A
pd wp ,
ppd wxpxpx 2||||)( to
2|||| xp
x p|||| xp
)(xp
pw
pw
![Page 21: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/21.jpg)
Power Diagram ( PD ) of a weighted point set
Tiling of space into convex regions where ith region ( tile ) are the set of points in nearest to pi in the power distance metric.
Regular Triangulation ( RT ) Dual of Power Diagram ( PD ) with an edge of RT for each Bisector Plane of PD
Bisector Plane which matches power distance.
l
l1 l2
p1 p21pw
2pw
21 2
221
21 pppp wlwl
d
![Page 22: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/22.jpg)
Particle Data to Meshes
Atomic Centers CPK CPK Alpha-Shape
Solvent Accessible Surface (SAS) Power Diagram of SAS Solvent Excluded Surface (SES)
![Page 23: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/23.jpg)
Molecular Surfaces(Solvent Excluded Surface)
SES = spherical patches + toroidal patches +concave patches
![Page 24: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/24.jpg)
Field Data
• Scalartemperature, pressure, density, energy, change, resistance,
capacitance, refractive index, wavelength, frequency & fluid content.
• Vector velocity, acceleration, angular velocity, force, momentum, magnetic
field, electric field, gravitational field, current, surface normal
• Tensorstress, strain, conductivity, moment of inertia and electromagnetic field
• Multivariate Time Series
![Page 25: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/25.jpg)
Interpolation
• Interpolation/Approximation are often used to approximate the data on the domain
• In other words, it constructs a continuous function on the domain
![Page 26: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/26.jpg)
Linear Interpolation on a line segment
p0 p p1
The Barycentric coordinates α = (α0 α1) for any point p
on line segment <p0 p1>, are given by
)),(
),(,
),(
),((
10
0
10
1
ppdist
ppdist
ppdist
ppdist
which yields p = α0 p0 + α1 p1
and fp = α0 f0 + α1 f1
ff1f0fp
![Page 27: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/27.jpg)
Linear interpolation over a triangle
p0
p1 p p2
For a triangle p0,p1,p2, the Barycentric coordinates
α = (α0 α1 α2) for point p, )
),,(
),,(,
),,(
),,(,
),,(
),,((
210
10
210
20
210
21
ppparea
ppparea
ppparea
ppparea
ppparea
ppparea
2
0ii pp
2
0ii fpfp
![Page 28: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/28.jpg)
Linear interpolant over a tetrahedron
Linear Interpolation within a • Tetrahedron (p0,p1,p2,p3)
α = αi are the barycentric coordinates of p
p3
p
p0 p2
p1
3
0ii pp
fp0
fp1
fp3
fp2
3
0ii fpfp
fp
![Page 29: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/29.jpg)
Other 3D Interpolation
• Unit Prism (p1,p2,p3,p4,p5,p6)
p1
p2 p3
p p4
p5 p6
))(1()(6
43
3
1 iiii ptptp
Note: nonlinear
![Page 30: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/30.jpg)
Other 3D Interpolation
• Unit Pyramid (p0,p1,p2,p3,p4)
p0
p1 p2 p p3
p4
)))1()(1())1(()(1( 43210 pssptpssptuupp
Note: nonlinear
![Page 31: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/31.jpg)
Trilinear Interpolation• Unit Cube (p1,p2,p3,p4,p5,p6,p7,p8)
– Tensor in all 3 dimensions
p1 p2
p3 p4
p
p5 p6
p7 p8
)))1()(1())1(()(1(
)))1()(1())1(((
8765
4321
pssptpssptu
pssptpssptup
Trilinear
interpolant
![Page 32: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/32.jpg)
Comparison
• Bicubic vs Bilinear vs nearest point
![Page 33: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/33.jpg)
Resampling
• Used in image resize or data type conversion
– Rectilinear to rectilinear
– Unstructured to rectilinear
![Page 34: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/34.jpg)
Rendering
• Isocontouring (Surface Rendering)– Builds a display list of isovalued lines/surfaces
• Volume Rendering– 3D volume primitives are transformed into 2D discrete pixel space
![Page 35: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/35.jpg)
Volume Rover Demo
![Page 36: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/36.jpg)
Isosurface Visualization
• Isosurface (i.e. Level Set ) : – C(w) = { x | F(x) - w = 0 }( w : isovalue , F(x) : real-valued function )
< ocean temperature function > < two isosurfaces (blue,yellow) >
isosurfacing <medical>
<bio-molecular>• Surface Topology :– Property that is invariant to continuous deformation
(without cutting or gluing), e.g. donut & cup
![Page 37: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/37.jpg)
Isocontouring
2. Isocontouring [Lorensen and Cline87,…]
• Popular Visualization Techniques for Scalar Fields
• Definition of isosurface C(w) of a scalar field F(x)
C(w)={x|F(x)-w=0} , ( w is isovalue and x is domain R3 )
( Isocontour in 2D function: isovalue=0.5 )
• Marching Cubes for Isosurface Extraction
1. Dividing the volume into a set of cubes
2. For each cubes, triangulate it based on the 2^8(reduced to 15) cases
0.7 0.6 0.75 0.4
0.40.80.40.6
0.4 0.3 0.35 0.25
1.0 0.8 0.4 0.3
0.7 0.6 0.75 0.4
0.40.80.40.6
0.4 0.3 0.35 0.25
1.0 0.8 0.4 0.3
0.7 0.6 0.75 0.4
0.40.80.40.6
0.4 0.3 0.35 0.25
1.0 0.8 0.4 0.3
![Page 38: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/38.jpg)
Cube Polygonization Template
![Page 39: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/39.jpg)
Volume Rendering
1. Volume Rendering [Drebin88,…]
• Popular Visualization Techniques for Scalar Fields
• Hardware Acceleration ( 3D Texturing ) [Westermann98]
C , C II’
I’= C C + (1- C)I
C : colorC: opacity
Light traversal from back to front
1. Slicing along the viewing direction
2. Put 3D textures on the slice
3. Interactive color table manipulation
<emission> <incoming light>
<produced by CCV vistool>
![Page 40: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/40.jpg)
Transfer Function
• Mapping from density to (color, opacity)
![Page 41: Lecture 2 : Visualization Basics](https://reader036.vdocument.in/reader036/viewer/2022081505/56813d0d550346895da6c322/html5/thumbnails/41.jpg)
Medical applications