Marching Squares Ed Angel

Slides:



Advertisements
Similar presentations
Advanced Iso-Surfacing Algorithms Jian Huang, CS594, Spring 2002 This set of slides are developed and used by Prof. Han-Wei Shen at Ohio State University.
Advertisements

Yingcai Xiao Chapter 6 Fundamental Algorithms. Types of Visualization Transformation Types 1.Data (Attribute Transformation) 2.Topology (Topological Transformation)
CLASS 9 ADVANCE RENDERING RAY TRACING RADIOSITY LIGHT FIELD CS770/870.
Isocontour/surface Extractions 2D Isocontour 3D Isosurface.
CSE554ContouringSlide 1 CSE 554 Lecture 4: Contouring Fall 2013.
Implementation III Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Geometry Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and.
Designing Parametric Cubic Curves Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Introduction to Computer Graphics Ed Angel Professor of Computer Science, Electrical and.
Bezier and Spline Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Sampling and Aliasing Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Marching Cubes A High Resolution 3D Surface Construction Algorithm.
Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Angel: Interactive.
Segmentation & Modeling ImagesSegmented Images Models.
Rendering Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Angel:
CHAPTER 5 CONTOURING. 5.3 CONTOURING Fig 5.7. Relationship between color banding and contouring Contour line (isoline): the same scalar value, or isovalue.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Marching Squares Ed Angel Professor Emeritus of Computer Science University.
Lecture 9 From Vertices to Fragments. Objectives Introduce basic implementation strategies Clipping Rasterization hidden-surface removal.
Hank Childs, University of Oregon
Sampling and Aliasing Ed Angel
University of New Mexico
Introduction to Computer Graphics with WebGL
Programmable Pipelines
CIS 410/510: Isosurfacing (pt 2)
Sampling and Aliasing Ed Angel Professor Emeritus of Computer Science
University of New Mexico
Two-Dimensional Plots
CSc4730/6730 Scientific Visualization
Scientific Visualization
Shading II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Angel: Interactive Computer.
Implementation I Ed Angel
Classical Viewing Ed Angel
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Models and Architectures
University of New Mexico
University of New Mexico
Introduction to Computer Graphics with WebGL
Building Models Ed Angel
Rendering Curves and Surfaces
Designing Parametric Cubic Curves
Curves and Surfaces Ed Angel
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Lecture 3 : Isosurface Extraction
Volume Graphics (lecture 4 : Isosurface Extraction)
Introduction to Computer Graphics
Introduction to Computer Graphics
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
The quadratic formula.
Transformations Ed Angel
Introduction to Computer Graphics with WebGL
Image Formation Ed Angel
Introduction to Computer Graphics with WebGL
University of New Mexico
University of New Mexico
University of New Mexico
Copyright © 2010 Pearson Education, Inc
Introduction to Computer Graphics with WebGL
Implementation III Ed Angel Professor Emeritus of Computer Science
Angel: Interactive Computer Graphics5E © Addison-Wesley 2009
Plotting Implicit Functions
Presentation transcript:

Marching Squares Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005

Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Objectives Nontrivial two-dimensional application Important method for Contour plots Implicit function visualization Extends to important method for volume visualization This lecture is optional Material not needed to continue to Chapter 3 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005

Displaying Implicit Functions Consider the implicit function g(x,y)=0 Given an x, we cannot in general find a corresponding y Given an x and a y, we can test if they are on the curve Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005

Height Fields and Contours In many applications, we have the heights given by a function of the form z=f(x,y) To find all the points that have a given height c, we have to solve the implicit equation g(x,y)=f(x,y)-c=0 Such a function determines the isosurfaces or contours of f for the isosurface value c Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005

Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Marching Squares Displays isocurves or contours for functions f(x,y) = t Sample f(x,y) on a regular grid yielding samples {fij(x,y)} These samples can be greater than, less than, or equal to t Consider four samples fij(x,y), fi+1,j(x,y), fi+1,j+1(x,y), fi,j+1(x,y) These samples correspond to the corners of a cell Color the corners by whether than exceed or are less than the contour value t Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005

Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Cells and Coloring Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005

Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Occum’s Razor Contour must intersect edge between a black and white vertex an odd number of times Pick simplest interpretation: one crossing Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005

Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 16 Cases Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005

Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Unique Cases Taking out rotational and color swapping symmetries leaves four unique cases First three have a simple interpretation Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005

Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Ambiguity Problem Diagonally opposite cases have two equally simple possible interpretations Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005

Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Ambiguity Example Two different possibilities below More possibilities on next slide Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005

Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Ambiguity Problem Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005

Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Is Problem Resolvable? Problem is a sampling problem Not enough samples to know the local detail No solution in a mathematical sense without extra information More of a problem with volume extension (marching cubes) where selecting “wrong” interpretation can leave a hole in a surface Multiple methods in literature to give better appearance Supersampling Look at larger area before deciding Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005

Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Interpolating Edges We can compute where contour intersects edge in multiple ways Halfway between vertics Interpolated based on difference between contour value and value at vertices Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005

Example: Oval of Cassini f(x,y)=(x2+y2+a2)2-4a2x2-b4 Depending on a and b we can have 0, 1, or 2 curves midpoint intersections interpolating intersections Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005

Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Contour Map Diamond Head, Oahu Hawaii Shows contours for many contour values Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005

Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Marching Cubes Isosurface: solution of g(x,y,z)=c Same argument to derive method but use cubic cell (8 vertices, 256 colorings) Standard method of volume visualization Suggested by Lorensen and Kline before marching squares Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005