advanced visualization. scientificscientific visualization

12
Scientific Visualization, Lecture 8 November 20 & 27, 2009 Ingela Nyström 1 Department of Information Technology - Scientific Computing Scientific Scientific Visualization Visualization, 5hp , 5hp Fall 2009 Fall 2009 Ch 9: Ch 9: Advanced Algorithms Ingela Nyström [email protected] Department of Information Technology - Scientific Computing …is about mapping data to visual form Advanced visualization…. It requires understanding of the nature of the data to be visualized. Department of Information Technology - Scientific Computing 3D Glyphs on a 3D Grid Visual properties used here: Position Size Color Shape Department of Information Technology - Scientific Computing How can data be characterized? How can data be characterized? Attributes (properties, variables) Type Dimensionality Represented over a certain Domain Dimensionality Type Regularity Department of Information Technology - Scientific Computing Taxonomy Taxonomy Attribute - Dimensionality Scalar (one component) e.g. bone density, temperature V t ( t) Vector (m components) e.g. velocity Tensor (e.g. 2 nd order 3x3 matrix in 3D space) e.g . momentum Department of Information Technology - Scientific Computing Taxonomy Taxonomy Dimensionality of domain 1D: e.g. stock value over time 2D: e.g. light intensity across an area-sensor 3D: e.g. bone density in an anatomic specimen 4D: e g temporal change of a 3D temperature distribution 4D: e.g. temporal change of a 3D temperature distribution Domain types Spatial, Temporal, Frequency Domain regularity Curvature (rectilinear, curvilinear grid over a surface) Continuous, discrete

Upload: others

Post on 03-Feb-2022

15 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Advanced visualization. ScientificScientific Visualization

Scientific Visualization, Lecture 8 November 20 & 27, 2009

Ingela Nyström 1

Department of Information Technology

- Scientific Computing

ScientificScientific VisualizationVisualization, 5hp, 5hpFall 2009Fall 2009

Ch 9: Ch 9: Advanced Algorithms

Ingela Nyströ[email protected]

Department of Information Technology

- Scientific Computing

…is about mapping data to visual

form

Advanced visualization….

It requires understanding of the

nature of the data to be visualized.

Department of Information Technology

- Scientific Computing

3D Glyphs on a 3D Grid

Visual properties used here:

Position

Size

Color

Shape

Department of Information Technology

- Scientific Computing

How can data be characterized?How can data be characterized?

Attributes (properties, variables)

Type

Dimensionalityy

Represented over a certain Domain

Dimensionality

Type

Regularity

Department of Information Technology

- Scientific Computing

TaxonomyTaxonomy

Attribute - Dimensionality

Scalar (one component)e.g. bone density, temperature

V t ( t ) Vector (m components)e.g. velocity

Tensor (e.g. 2nd order 3x3 matrix in 3D space)

e.g . momentum

Department of Information Technology

- Scientific Computing

TaxonomyTaxonomyDimensionality of domain

1D: e.g. stock value over time

2D: e.g. light intensity across an area-sensor

3D: e.g. bone density in an anatomic specimen

4D: e g temporal change of a 3D temperature distribution 4D: e.g. temporal change of a 3D temperature distribution

Domain types Spatial, Temporal, Frequency

Domain regularity Curvature (rectilinear, curvilinear grid over a surface)

Continuous, discrete

Page 2: Advanced visualization. ScientificScientific Visualization

Scientific Visualization, Lecture 8 November 20 & 27, 2009

Ingela Nyström 2

Department of Information Technology

- Scientific Computing

TaxonomyTaxonomy

Attribute - Types

Nominal (label names, qualities)

Ordinal (rank, position)

Numerical

Cardinal (can be counted)

Discrete quantities/intervals (integer)

Continuous quantities/intervals (rational numbers)

Department of Information Technology

- Scientific Computing

9.1 9.1 ScalarScalar algorithmsalgorithms

• Dividing cubes

• Carpet plots

• Clipping with scalar fields

[email protected]

Department of Information Technology

- Scientific Computing

Dividing Cubes

Working principleDepartment of

Information Technology

- Scientific Computing

RecursiveRecursive dividingdividing cubescubes

Subresolution for contour

[email protected]

Department of Information Technology

- Scientific Computing

Issues in regard to 3D techniques

Computer screen is 2D display surface-> 3D representation must be projected

to eliminate z

Problems:• Occlusion• Ambiguities (front or back?)• Distortion (if perspective projection is used)

Department of Information Technology

- Scientific Computing

One simple solution

• Show a “2D subset” of the data in context

Depending on how the ”2D subset” is defineddifferent names are used for this technique:

”Slicing””Cutting””Probing”

Page 3: Advanced visualization. ScientificScientific Visualization

Scientific Visualization, Lecture 8 November 20 & 27, 2009

Ingela Nyström 3

Department of Information Technology

- Scientific Computing

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/slice.shtmlMATLAB

Slicing – 2D base plane in original domain

Department of Information Technology

- Scientific Computing

http://mathworld.wolfram.com/ContourPlot.htmlMathematica

Contour Plot of 2D scalar field

Department of Information Technology

- Scientific Computing

Carpet Plot of 2D scalar data

http://www.phoenix-int.com/

Department of Information Technology

- Scientific Computing

HeightHeight--FieldField PlotPlot ((multivariatemultivariate 2D 2D scalarscalar fieldfield))

Elevation model. Hue indicates type of vegetationhttp://www.siggraph.org/education/materials/HyperVis/vised/VisTech/Techniques/sndaheightfield.html

Department of Information Technology

- Scientific Computing

CarpetCarpet plotplot

vtkWarpScalar

vtkWarpVector

[email protected]

Department of Information Technology

- Scientific Computing

Clipping Height-Fields or Carpet Plots

Clipping a triangular height-field mesh at a given threshold height value.

Si l h Di d ll t i l ith Simple approach: Discard all triangles with at least one vertex below threshold.

Disadvantage: Irregularly shaped borderline.

Page 4: Advanced visualization. ScientificScientific Visualization

Scientific Visualization, Lecture 8 November 20 & 27, 2009

Ingela Nyström 4

Department of Information Technology

- Scientific Computing

Clipping Height-Fields or Carpet Plots

Solution: Subdivide and re-tessellate triangle

• 8 cases for contour to intersect and dividea triangleA j i i l• Accept or reject entire triangle

• Otherwise, calculate intersection distancesalong edges

• Subdivide triangle• Keep remaining triangle or quadrilateral• If quadrilateral, subdivide into triangles

Department of Information Technology

- Scientific Computing

Clipping Height-Fields or Carpet Plots

Solution: Subdivide and re-tessellate triangle

Department of Information Technology

- Scientific Computing

Clipping and capping

Department of Information Technology

- Scientific Computing

9.2 9.2 VectorVector algorithmsalgorithms

• Streamribbons

• Streamsurfaces

• Stream polygon

• (Vector field topology)

[email protected]

Department of Information Technology

- Scientific Computing

A vector field: F(U) = V

U: field domain (x,y) in 2D (x,y,z) in 3D V t ( ) ( )

Vector Field VisualizationVector Field Visualization

V: vector (u,v) or (u,v,w)

Like scalar fields, vectors are defined at discrete points

Department of Information Technology

- Scientific Computing

Vector Vector Field ApplicationsField Applications

Computational Fluid Dynamics Weather modeling

Page 5: Advanced visualization. ScientificScientific Visualization

Scientific Visualization, Lecture 8 November 20 & 27, 2009

Ingela Nyström 5

Department of Information Technology

- Scientific Computing

Streamribbons• For streamlines and streaklines only the direction of flow of the field becomes evident• Rotations of the flow field around the flow axis and divergence and convergence of the field are not visible• By connecting the traces of two adjacent y g jstreamlines, a ribbon band composed of polygons stretching between the two streamlines is visualized• The orientation of the ribbon surface mediates rotational and contraction towards the direction of flow• The twist of the ribbon is an indicator for the streamwise vorticity of the field

Department of Information Technology

- Scientific Computing

Streamribbons

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/streamribbon.htmlMATLAB

Department of Information Technology

- Scientific Computing

Streamsurfaces

• An extension or generalization of streamribbonsare streamsurfaces• Streamsurfaces are an infinite number of streamlines passing through a base curve or rake• In practice, a number of n seed points define p , pthe rake (user defined)• N streamlines are bridged with polygons and form a more complex surface• Problems can occur with self-intersections and with separation (bifurcations)

Department of Information Technology

- Scientific Computing

Streamsurfaces -Properties & Interpretation

• Stream surfaces reveal additional information on the structure of the vector field• Stream surfaces are tangential to the velocity vector

H if t fi ld d fi fl id fl • Hence, if e.g. a vector field defines fluid flow, there is no transport of fluid through the stream surface• A circular rake will result in a so called streamtube• Since there is no flux through the tube, the streamtube represents constant mass flux

Department of Information Technology

- Scientific Computing

Streamtube - Example

Department of Information Technology

- Scientific Computing

StreamtubesStreamtubes

The flow of fluid (LOx) around a tube is described using streamtubes.

F VTKFrom VTK:

vtkStreamLine

vtkTubeFilter

[email protected]

Page 6: Advanced visualization. ScientificScientific Visualization

Scientific Visualization, Lecture 8 November 20 & 27, 2009

Ingela Nyström 6

Department of Information Technology

- Scientific Computing

Stream Polygon

• Used to reveal other local properties of vector fields/tensor fields

• If a vector field describes flow of material this is due to local strain and rigid body motion

• Strain (normal strain and shear strain), rotation -> deformation

• Formally described as a strain matrix and rotation matrix i.e. 3x3 tensors

Department of Information Technology

- Scientific Computing

Stream Polygon

Effects of strains and rotations upon stream polygon

Department of Information Technology

- Scientific Computing

Stream Polygon

Department of Information Technology

- Scientific Computing

9.3 9.3 TensorTensor algorithmsalgorithms

• Useful for , e.g., fMRI data(diffusion tensor imaging, seehttp://lmi.bwh.harvard.edu/research/)

• Hot research topicHot research topic

• Hyper-streamlines, etc.

[email protected]

Department of Information Technology

- Scientific Computing

Hyperstreamlines

Department of Information Technology

- Scientific Computing

9.4 9.4 ModellingModelling algorithmsalgorithms

• Visualizing geometry

• Data extraction

• Probing

• Traingle strip generation

• Connectivity

• Polygon normal generation

• Decimation

• Mesh smoothing

• Swept volumes and surfaces

• Visualizing unstructured points

• (Multi-dimensional visualization)

• (Texture algorithms)

[email protected]

Page 7: Advanced visualization. ScientificScientific Visualization

Scientific Visualization, Lecture 8 November 20 & 27, 2009

Ingela Nyström 7

Department of Information Technology

- Scientific Computing- Reduce size of the data

- Reduce visual clutter

- Select spatial regions of interest

Select str ct res of interest

Data extractionData extraction

- Select structures of interest

- Increase interactivity

Department of Information Technology

- Scientific Computing - Suppose data is represented explicitly

as geometric cells (points, lines, polygons)

Geometry extractionGeometry extraction

- ID based extraction (semantics?)

- Spatial extraction (e.g. Euclidean

distance)

- Sub-sampling

- Masking

Department of Information Technology

- Scientific Computing

ID based extraction- Extract intervals of cells based on ID

- Result depends on original labelling

(spatial, temporal, semantic)

Geometry extractionGeometry extraction

3

1

4

2

5 6

7 8

9 10

11 12

13

14

15

16

1718

19

20

21

22

2324

25

2627

2829

3031

3233

34 35

36 37

3839

40

41

4243

4445

4647

48

49

”Extract [8..20]”

8

9 10

11 12

13

14

15

16

1718

19

20

Department of Information Technology

- Scientific Computing - Spatial extraction (e.g. Euclidean distance)

Geometry extractionGeometry extraction

- Select only cells within a certain

given radius around some reference point

Department of Information Technology

- Scientific Computing

GeometryGeometry extractionextraction exampleexample::CuttingCutting –– CurvedCurved surfacesurface, , cubecube surfacesurface

http://www.vis.uni-stuttgart.de/eng/research/fields/current/volclipping/

Department of Information Technology

- Scientific Computing

- regularly structured data

- every nth data-point

- create new cells

- subsampling causes “holes”

- creation of new cells

change of e isting topolog

Geometry Geometry extraction extraction -- subsamplingsubsampling

- change of existing topology

- still, regular topology

A

B

Page 8: Advanced visualization. ScientificScientific Visualization

Scientific Visualization, Lecture 8 November 20 & 27, 2009

Ingela Nyström 8

Department of Information Technology

- Scientific Computing

Geometry Geometry extraction extraction -- subsamplingsubsampling

- unstructured data

- “hole” filling more complex

- new triangulation/tessellation

- untypical for unstructured data

Department of Information Technology

- Scientific Computing

Data masking- Select any nth cell (here triangle)

- Can lead to unstructured meshes

- Used to allow for interactivity

- Preserves contextual appearance

Geometry extractionGeometry extraction

22

25

28Preserves contextual appearance

3

1

4

2

5 6

7 8

9 10

11 12

13

14

15

16

1718

19

20

21

22

2324

25

2627

2829

3031

3233

34 35

36 37

3839

40

41

4243

4445

4647

48

49

1

4

7

13

34

37

16

19

10

31

40

43

4649

select every 3rd cell

Department of Information Technology

- Scientific Computing

- Reduce size of the data to be visualized

- Reduce visual clutter

- Extraction is not based on topological

Thresholding

Extraction is not based on topological

or spatial features

- Selection is done on attribute values

Department of Information Technology

- Scientific Computing

ProbingProbing

• Sampling one dataset with a set of points• Most general• Arbitrary probe shapes and topologies• Resampling -> aliasing/filtering• Resampling > aliasing/filtering• Display of probe data depends on probetopology and attribute types

Department of Information Technology

- Scientific Computing

ProbingProbing

Department of Information Technology

- Scientific Computing

ProbingProbing resultresult

Since the data is scalar, the representation of the probe data is chosen to be a contour plot

Page 9: Advanced visualization. ScientificScientific Visualization

Scientific Visualization, Lecture 8 November 20 & 27, 2009

Ingela Nyström 9

Department of Information Technology

- Scientific Computing

Cutting, slicing, probingCutting, slicing, probing

When probing scalar fields, the representation of the re-sampled data depends on the attributes of the original domain

Vector data on a surface probe can be used toVector data on a surface probe can be used toe.g. warp the surface -> carpet plot

Ambiguity problem:It can be difficult to interpret if the probe surface is curved!Is 3D shape due to vector-warp or due to curved probe?

Department of Information Technology

- Scientific Computing

TriangleTriangle stripstrip generation generation

Memory savings and rendering speed improvement

Example: - 8 separate triangles require 24 points

t i f 8 t i l i 10 i t- strip of 8 triangles require max 10 points

vtkStripper

Fig. 9-21

Department of Information Technology

- Scientific Computing

Triangle stripsTriangle strips

- Good performance gain

even for small strips

- Particularly efficient

for structured data

(long strips)

- Strips optimize without

altering geometry

- Strips not useful when specific

vertex attributes must be

maintained per face http://geo.inf.ufpr.br/~oliver/strip/

Department of Information Technology

- Scientific Computing

Department of Information Technology

- Scientific ComputingCells are topologically connected if they share

boundary features

Types of connectivity:

ConnectivityConnectivity

Vertex-connected Edge-connected Face-connected

Department of Information Technology

- Scientific Computing

Connectivity information can be used to:

* Identify and select boundary structures

* Remove “noise” in automatically reconstructed

surface models:

ConnectivityConnectivity

Establish connected surfaces (generalized)

Recursive cell visit and labelling

Eliminate connected surfaces depending on size

Page 10: Advanced visualization. ScientificScientific Visualization

Scientific Visualization, Lecture 8 November 20 & 27, 2009

Ingela Nyström 10

Department of Information Technology

- Scientific Computing

Problem:

- Surface normal information needed for lighting &

shading

- Surface reconstruction methods do not always

generate this information

Polygon Normal GenerationPolygon Normal Generation

Normal calculation:

- Based on vertex information for each triangle

- Vector product between two triangle span-vector

yields surface normal

- At given vertex, adjacent face normal vectors are

“blended”

Department of Information Technology

- Scientific Computing

Requirements:

1. Consistent vertex order per triangle ->

otherwise back-face vectors

2. Relatively low local curvature, otherwise

asho t effects

Polygon Normal GenerationPolygon Normal Generation

washout effects

Desired smoothing of continuously curved surface

Undesired washout of local feature (edge)

Incorrect face normal due to inconsistent vertex order->affects final normal vector At shared vertex

Department of Information Technology

- Scientific Computing

n4

n1 n2

n3 n4

Flat-Shading:

One surface normalvector per face/polygon.

Shading per polygon vsshading per vertex

fn1 fn2

fn3 fn4

n1 n2

Example : n1 = (fn1 +fn2 +fn3 +fn4)/4

n1n2

Gouraud-Shading:

Surface normal vectorsper vertex.Usually calculated fromsurrounding polygonnormal vectors.

Department of Information Technology

- Scientific Computing

Polygon Normal GenerationPolygon Normal Generation

Department of Information Technology

- Scientific Computing

Surface DecimationSurface Decimation

Use a smaller number of triangles to represent the same surface -> preserve the topology

Bunny: Removing vertices and contracting edges

Department of Information Technology

- Scientific Computing

Objective:

- Reduce geometric complexity of a visualization

Surface DecimationSurface Decimation

- At the cost of fidelity to original data

- Unlike sampling, decimation operates on

polygonal mesh (not on original data)

- Most common: reduction of triangle meshes

Page 11: Advanced visualization. ScientificScientific Visualization

Scientific Visualization, Lecture 8 November 20 & 27, 2009

Ingela Nyström 11

Department of Information Technology

- Scientific Computing

Triangle Mesh DecimationTriangle Mesh Decimation1. Evaluate local geometry based on decimation

criterion:

Point based (eliminate)

Edge based (collapse edge, merge edges)

Triangle based (collapse triangle)Triangle based (collapse triangle)

2. Classify vertex/vertices:

Preserve important features

Preserve topology

3. Reduce mesh:

Remove point/edge/triangle

Re-triangulation to fix holes

Department of Information Technology

- Scientific Computing

Vertex classificationVertex classification

CornerInterior Edge

BoundaryComplex

Simple

Department of Information Technology

- Scientific Computing

Decimation Decimation ––Visibility CullingVisibility Culling

Do not display polygons that are not visible to the viewer

188,000 triangles1 million triangles

Department of Information Technology

- Scientific Computing

Mesh Mesh smoothingsmoothing

Enhance visual appearance of meshes

Remove high spatial frequencies, noise or

artefacts

Mesh smoothing does not affect topology

Vertices are moved towards their connected

neighbours

Department of Information Technology

- Scientific Computing

Mesh Mesh smoothingsmoothing

Department of Information Technology

- Scientific Computing

Swept Swept volume volume

Modelling technique

- Modelling the volume that a moving object

passes through

- Constructive Solid Geometry Modelling

(intersection, unions of geometric objects)

- Uses implicit models for modelling

(implicit model and workspace volume)

- Employs iso-surface reconstruction to extract

surface

Page 12: Advanced visualization. ScientificScientific Visualization

Scientific Visualization, Lecture 8 November 20 & 27, 2009

Ingela Nyström 12

Department of Information Technology

- Scientific Computing

Swept Swept volume volume

Department of Information Technology

- Scientific Computing

Swept Swept volume volume

To reduce avoid artifacts, the workspace volume is transformed into the implicit model volume whensampling is performed

Department of Information Technology

- Scientific Computing

Swept Swept volume volume

Department of Information Technology

- Scientific Computing

VisualizingVisualizing unstructuredunstructured pointspoints

Example of triangulation technique:

Delaunay triangulation

vtkDelaunay2D

[email protected]

Department of Information Technology

- Scientific Computing

Stefan Seipel is acknowledged for t ib ti t t i lcontributing to my material

[email protected]