Scalar Field Visualization I

Similar documents
Scalar Field Visualization I

Scalar Field Visualization. Some slices used by Prof. Mike Bailey

CIS 4930/ SCIENTIFICVISUALIZATION

11/1/13. Visualization. Scientific Visualization. Types of Data. Height Field. Contour Curves. Meshes

Visualization. CSCI 420 Computer Graphics Lecture 26

Scientific Visualization Example exam questions with commented answers

Lecture overview. Visualisatie BMT. Fundamental algorithms. Visualization pipeline. Structural classification - 1. Structural classification - 2

Scalar Visualization

Scalar Algorithms: Contouring

4. Basic Mapping Techniques

Scalar Visualization

CS 4620 Midterm, March 21, 2017

Visualization Computer Graphics I Lecture 20

Height Fields and Contours Scalar Fields Volume Rendering Vector Fields [Angel Ch. 12] April 23, 2002 Frank Pfenning Carnegie Mellon University

Assignment #3: 2D Scalar Field Visualization II: Iso-contouring

Topics and things to know about them:

Visualization. Images are used to aid in understanding of data. Height Fields and Contours Scalar Fields Volume Rendering Vector Fields [chapter 26]

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

Visualization Computer Graphics I Lecture 20

CSC Computer Graphics

Review for Mastery Using Graphs and Tables to Solve Linear Systems

Scalar Visualization

Scientific Visualization. CSC 7443: Scientific Information Visualization

Graphics Hardware and Display Devices

Scalar Visualization. In Visualization, we Use the Concept of a Transfer Function to set Color as a Function of Scalar Value.

Last class. A vertex (w x, w y, w z, w) - clipping is in the - windowing and viewport normalized view volume if: - scan conversion/ rasterization

CSE152a Computer Vision Assignment 1 WI14 Instructor: Prof. David Kriegman. Revision 0

How shapes are represented in 3D Graphics. Aims and objectives By the end of the lecture you will be able to describe

Contours & Implicit Modelling 4

CIS 467/602-01: Data Visualization

Terrain rendering (part 1) Due: Monday, March 10, 10pm

Marching Squares Algorithm. Can you summarize the marching squares algorithm based on what we just discussed?

1 Introduction to Graphics

Lecture notes: Object modeling

Previously... contour or image rendering in 2D

Geometric Features for Non-photorealistiic Rendering

Assignment 4: Mesh Parametrization

Graphics Pipeline 2D Geometric Transformations

Input Nodes. Surface Input. Surface Input Nodal Motion Nodal Displacement Instance Generator Light Flocking

Computing Visibility. Backface Culling for General Visibility. One More Trick with Planes. BSP Trees Ray Casting Depth Buffering Quiz

Graded Assignment 2 Maple plots

Computer Graphics Fundamentals. Jon Macey

Terrain Rendering (Part 1) Due: Thursday November 30 at 10pm

CS 559 Computer Graphics Midterm Exam March 22, :30-3:45 pm

Improving perception of intersecting 2D scalar fields. Mark Robinson Advisor: Dr. Kay Robbins

The Traditional Graphics Pipeline

Data Representation in Visualisation

EECE 478. Learning Objectives. Learning Objectives. Rasterization & Scenes. Rasterization. Compositing

CS337 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics. Bin Sheng Representing Shape 9/20/16 1/15

Spring 2009 Prof. Hyesoon Kim

3D Modeling: Surfaces

Graphics Programming

Student Outcomes. Lesson Notes. Classwork. Opening Exercise (3 minutes)

Outline. Visualization Discretization Sampling Quantization Representation Continuous Discrete. Noise

Using ChromaDepth to obtain Inexpensive Single-image Stereovision for Scientific Visualization

CS 464 Review. Review of Computer Graphics for Final Exam

Scalar Data. Visualization Torsten Möller. Weiskopf/Machiraju/Möller

the gamedesigninitiative at cornell university Lecture 17 Color and Textures

The Traditional Graphics Pipeline

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics 1/15

Marching Cubes Robert Hunt CS 525. Introduction

This is called the vertex form of the quadratic equation. To graph the equation

GPU Programming EE Midterm Examination

CS451Real-time Rendering Pipeline

Contouring and Isosurfaces. Ronald Peikert SciVis Contouring 2-1

Texture Mapping. Texture (images) lecture 16. Texture mapping Aliasing (and anti-aliasing) Adding texture improves realism.

Face Morphing. Introduction. Related Work. Alex (Yu) Li CS284: Professor Séquin December 11, 2009

3D Graphics and OpenGl. First Steps

Data Visualization (DSC 530/CIS )

Chapter IV Fragment Processing and Output Merging. 3D Graphics for Game Programming

Scalar Algorithms -- surfaces

Contours & Implicit Modelling 1

Data Visualization (DSC 530/CIS )

EXAMINATIONS 2016 TRIMESTER 2

The Traditional Graphics Pipeline

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

Draw the basic Geometry Objects. Hanyang University

Lab - Introduction to Finite Element Methods and MATLAB s PDEtoolbox

CS4620/5620: Lecture 14 Pipeline

Homework #2. Shading, Ray Tracing, and Texture Mapping

CPSC GLOBAL ILLUMINATION

Graphics. Texture Mapping 고려대학교컴퓨터그래픽스연구실.

CHAPTER 1 Graphics Systems and Models 3

8.2 Graph and Write Equations of Parabolas

Animation & Rendering

Medical Image Processing using MATLAB

TcpMDT. Digital Terrain Model Version 7.5. TcpMDT

CS2401 COMPUTER GRAPHICS ANNA UNIV QUESTION BANK

CS 354R: Computer Game Technology

form are graphed in Cartesian coordinates, and are graphed in Cartesian coordinates.

6.837 Introduction to Computer Graphics Final Exam Tuesday, December 20, :05-12pm Two hand-written sheet of notes (4 pages) allowed 1 SSD [ /17]

3 CHAPTER. Coordinate Geometry

Chapter 7 - Light, Materials, Appearance

Adaptive Point Cloud Rendering

Spring 2011 Prof. Hyesoon Kim

Triangle Rasterization

Open Game Engine Exchange Specification

Image Analysis. 1. A First Look at Image Classification

AMCS / CS 247 Scientific Visualization Lecture 4: Data Representation, Pt. 1. Markus Hadwiger, KAUST

Transcription:

Scalar Field Visualization I

What is a Scalar Field? The approximation of certain scalar function in space f(x,y,z). Image source: blimpyb.com f

What is a Scalar Field? The approximation of certain scalar function in space f(x,y,z). Most of time, they come in as some scalar values defined on some sample points. Image source: blimpyb.com Image source: code google.com

What is a Scalar Field? The approximation of certain scalar function in space f(x,y,z). Most of time, they come in as some scalar values defined on some sample points. Image source: blimpyb.com Visualization primitives: Geometry: iso contours (2D), iso surfaces (3D), Attributes: colors, transparency, 3D textures.

Generate 2D color plots

Generate 2D color plots 1. Color transfer function 2. Color interpolation

To create a color plot, we need to define a proper Transfer Function to set Color as a function of Scalar Value. The following shows a simple transfer function. Scalar values >[0,1] > Colors In OpenGL, the mapping of 1D texture

To create a color plot, we need to define a proper Transfer Function to set Color as a function of Scalar Value. The following shows a simple transfer function. Scalar values >[0,1]

To create a color plot, we need to define a proper Transfer Function to set Color as a function of Scalar Value. The following shows a simple transfer function. [0,1] > Colors 0 > blue (hue=240) t > 240. 240. 1 > red (hue=0)

To create a color plot, we need to define a proper Transfer Function to set Color as a function of Scalar Value. The following shows a simple transfer function. Scalar values >[0,1] > Colors 240. 240. In OpenGL, the mapping of 1D texture

Use the Right Transfer Function Color Scale to Represent a Range of Scalar Values

Rainbow Scale 240. 240.

Gray Scale

Intensity and Saturation Color Scales

Two Color Interpolation

Heated Object Color Scale

Add One Component at a time an extension from the heated object color scale

Blue White Red Color Scale

(Discrete) Color Scale Contour Source: http://glscene.sourceforge.net

Generate 2D color plots 1. Color transfer function 2. Color interpolation

2D Interpolated Color Plots How can we turn the discrete samples into a continuous color plot? Here s the input: we have a 2D grid of data points. At each node, we have an X, Y, Z, and a scalar value S. We know Smin, Smax, and a Transfer Function. 2D parameterization of the original domain Even though this is a 2D technique, we keep around the X, Y, and Z coordinates so that the grid doesn t have to lie in any particular plane.

2D Interpolated Color Plots Let us look at one square (or quad) of the mesh at a time For each scalar value at a vertex float hsv[3], rgb[3]; hsv 0 240. 240. HsvRgb (hsv, rgb); ; Convert hsv color to rgb color

2D Interpolated Color Plots We let OpenGL deal with the color interpolation // compute color at V0 glcolor3fv (rgb0); glvertex3f (x0, y0, z0); // compute color at V1 glcolor3fv (rgb1); glvertex3f (x1, y1, z1); // compute color at V3 glcolor3fv (rgb3); glvertex3f (x3, y3, z3); // compute color at V2 glcolor3fv (rgb2); glvertex3f (x2, y2, z2);

What if the data is defined on a triangle mesh?

// compute color at V0 glcolor3fv (rgb0); glvertex3f (x0, y0, z0); V2 // compute color at V1 glcolor3fv (rgb1); glvertex3f (x1, y1, z1); // compute color at V3 glcolor3fv (rgb3); glvertex3f (x3, y3, z3); V0 V1

Recall: A Gallery of Color Scales Many more can be found at http://www.physics.ox.ac.uk/users/msshin/science/code/matplotlib_cm/

Geometric Based Scalar Field Visualization Iso Contouring and Iso Surfacing

Contour (iso value) line(s) 2D Contour Lines Sub sets of the original data that correlate all the points with the same scalar values. If the 2D scalar field is considered as a height field (2D surface), the contours are the intersections of a moving horizontal plane with this height field. Image source: www.princeton.edu Image source: www.mathworks.com

2D Contour Lines Here s the situation: we have a 2D grid of data points. At each node, we have an X, Y, Z, and a scalar value S. We know the Transfer Function. We also have a particular scalar value, S*, at which we want to draw the contour (iso value) line(s).

2D Contour Lines: Marching Squares Instead of dealing with the entire grid, we once again look at one square at a time, then march through them all in order. For this reason, this method is called the Marching Squares.

Marching Squares What s really going to happen is that we are not creating contours by connecting points into a complete curve. We are creating contours by drawing a collection of 2 point line segments, safe in the knowledge that those line segments will align across square boundaries.

Marching Squares Does S* cross any edges of this square? We have a particular scalar value, S*, at which we want to draw the contour (iso value) line(s). Linearly interpolating any scalar value from node0 to node1 gives: 1 where 0. 1. Setting this interpolated S equal to S* and solving for t gives:

Marching Squares (x*, y*) If 0. t* 1., then S* crosses this edge. You can compute where S* crosses the edge by using the same linear interpolation equation you used to compute S*. You will need that for later visualization. 1 1

Marching Squares Do this for all 4 edges when you are done, there are 5 possible ways this could have turned out # of intersections = 0 # of intersections = 2 # of intersections = 1 # of intersections = 3

Marching Squares Do this for all 4 edges when you are done, there are 5 possible ways this could have turned out # of intersections = 0 Do nothing # of intersections = 2 Draw a line connecting them # of intersections = 1 # of intersections = 3 Error: this means that the contour got into the square and never got out If one intersection is not on a vertex >Error: this means that the contour got into the square and never got out

Marching Squares Special cases What if S1 == S0 (i.e. t*= ) because There are two possibilities.