Telechargé par Ghazouani Fethi

Viz7

publicité
Scientific Visualization
Advanced Algorithms
Anders Hast
tisdag 24 september 13
Informationsteknologi
Outline
Dividing Cubes
 Carpet Plots
 Clipping (Marching Triangles)
 Vector Algorithms
 Tensors
 Data Extraction
 Triangle Strips
 Shading
 Edge Decimation
 Delaunay
 Multidimensional Visualizaion (Parallel Axis)

Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Dividing Cubes
 Generates
points (not triangles or lines)
 A large number of points looks like a surface
i.e.
density of points must be euqal to or greater
than screen resolution
 Motivation
Rendering
Points is much faster than rendering
Polygons
 Specialized
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
hardware exists...
Informationsteknologi
Result
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
http://www.csee.umbc.edu/~ebert/693/THu/dividingcubes.html
Informationsteknologi
Algorithm (procedural)

Normals are
computed
from
gradients

No topology
No Scan
Conversion

Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Normals
The Gradient is simply the difference
 Fu=(P1 - P0)
 A normal can always be found using the cross product of
two vectors!
 N = Fu X Fv = (-Fu, -Fv,1)
u
N
N
Fu
Informationsteknologi

Fv
P1
P0
Fu
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
v
Informationsteknologi
The Cross Product
 The
cross product computes a vector orthogonal to
both the vectors involved
N
A
B
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Calculating Normal Vectors
for Triangles
 Use
the Cross product
P0
P1
P2
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Vertex Normals
 Gouraud
But
introduced one simple method
there are many possible approaches
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Recursive Algorithm
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13

Subdivide
until the size
of the
subvoxel is
less than or
euqal to the
screen
resolution

Can
generate far
more points
than the
procedural
method
Informationsteknologi
More Examples (Computer
Graphics)
 Marc Alexa
et al.
 Laser scanners produce
point clouds....
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Splatting
 Old
technique...
 Let each point correspond
to a footprint, which is
projected onto the screen
through Ray casting
 Accumulate footprints in
screen buffer
Phong Splatting
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Carpet Plots
 2D
Data sets with associated scalar data
 Warp in the direction of the surface normal
depending on the scalar
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Clipping (Marching Triangles)
 Clipping
i used in Computer Graphics to clip
parts of triangles that lie outside the view
Frustum
 New Triangles are created in the process
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Eight cases
 Create
new triangles along the cut
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Vector Algorithms
 Streamlines
can be used to depict particle
paths in a vector field
 Others are
Stream
Ribbons
Stream Tubes
 These
can depict other carachteristics of the
data due to their more complex shapes
e.g.
Stream Vorticity
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Stream Vorticity
 Vorticity
is the measure of rotation of the
vector field
 Can be depicted by a ribbon
 The Vorticity is visible in the places where
the ribbon tvist
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Stream Tubes
 Colour
can depict other
variables in Streamlines
i.e.
Not only direction, but one
more variable like speed,
pressure or heat, etc...
 When
using Streamtubes
also thickness/radius can
depict yet another variable
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Tensors
 Nothing
to be afraid of...
 It
is simply a multidimensional array!
 order = dimensions
0
Scalar
1 Vector
2 Matrix
3 Cube
etc
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Data Extraction
 Necessary
when we want to visualize
portions of the data
 Or when it is necessary to reduce the size
of the data
Huge
datasets take time to visualize
Therefore it can be necessary to sample the data
set
 Compare to an image which is downscaled in size
 The smaller image still contains the same ”image”
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Methods
 Subsampling
Extract
every n’th point of data
vtkExtractGrid
vtkExtractVOI
 Thresholding
Extract
points based on data attributes < == <=
>= < >
 Probing
Resampling
The
result is a new data set with the topology an
geometric structure of the probe
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Triangle Strips
 Makes
Rendering Faster
 Methods like Marching Cubes creates
MANY polygons
 However, todays GPU’s are fast... really
fast!
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Shading of Polygons
 The
flat polygons can appear smooth using
some shading algorithm
 The polygon/vertex Normal is used
Phong
Gouraud
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Diffuse Light/ Lambert’s Law
of Cosines
N
L
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
The problem with Normals
 Original
faceted Model
 Will be smoother
when rendered...
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Naive Normal Computation
 Normals
are computed from the mesh
Normal Polygon A
Vertex Normal
Normal Polygon B
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Split-Edge Normals
 The
edge is plit into two vertices sharing the
same position
Polygon A
Vertex Normal for B
Vertex Normal for A
Polygon B
 The
model must
contain information about these edges
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Edge Decimation
 Some
Edges can be
removed in order to obtain
a simpler mesh
 But sharp edges you want
to preserve must not be
altered
 Delete points in flat
neighbourhoods
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Delaunay Triangulation
 Can
be used to
triangulate point clouds
 Find empty Circum
Circles
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Voronoi Diagram
 Connects
centers of circumcircles
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Voronoi Diagram
 Any
point in a cell is
closer to the triangle
vertex inside the cell
than to any other vertex
outside the cell
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Multidimensional
Visualization
 Sometimes
data points contain MANY data
 Example:
How
to choose a car?
 New? Strong? Fast? Large? Beautiful?
 How
to Visualize many parameters?
Use
Parallel Axis Coordinates
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Car Example
 Each
car have 5 parameters (in this case)
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
http://eagereyes.org/techniques/parallel-coordinates
Informationsteknologi
Brushing
 Keep
80-82 only
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Change
 Keep
70-72
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Correlation
 How
to interpret the lines?
 There can be important Correlations!
http://tex.stackexchange.com/questions/73800/tikz-drawing-the-same-data-with-scatter-plots-and-parallel-coordinates
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Informationsteknologi
Conclusion
 There
are many Powerful techniques for
Visualizing data
 Choose the one that fits the purpose of your
visualiation
 Do not show too many data in every point
Use
Parallel Coordinate axis visualization when
you have many variables in each data point
Institutionen för informationsteknologi | www.it.uu.se
tisdag 24 september 13
Téléchargement