isosurfaces
play

Isosurfaces Lecture 7 February 6, 2020 CS530 / Spring 2020 : - PowerPoint PPT Presentation

CS53000 - Spring 2020 Introduction to Scientific Visualization Isosurfaces Lecture 7 February 6, 2020 CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 2 Isosurfaces In Scientific Visualization


  1. CS53000 - Spring 2020 Introduction to Scientific Visualization Isosurfaces Lecture 7 February 6, 2020

  2. CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 2

  3. Isosurfaces In Scientific Visualization CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 3

  4. Isosurfaces In Scientific Visualization CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 4

  5. Properties of Isocontours Pre-image of scalar value Applicable in any dimension Manifolds of codimension 1 Closed (except at boundaries) Nested : different values do not cross Can consider the zero-set case: f ( x, y ) = k ⇔ f ( x, y ) − k = 0 Normals given by gradient vector of f ( ) r f CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 5

  6. Contours in 2D Assign geometric primitives (line segments) to individual cells (process one cell at a time) CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 6

  7. Contours in 2D Assign geometric primitives (line segments) to individual cells (process one cell at a time) Consider sign of the values at vertices CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 7

  8. Contours in 2D Assign geometric primitives (line segments) to individual cells (process one cell at a time) Consider sign of the values at vertices Intersections occur on edges with sign change CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 8

  9. Contours in 2D Assign geometric primitives (line segments) to individual cells (process one cell at a time) Consider sign of the values at vertices Intersections occur on edges with sign change Determine exact position of intersection CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 9

  10. Contours in 2D Assign geometric primitives (line segments) to individual cells (process one cell at a time) Consider sign of the values at vertices Intersections occur on edges with sign change Determine exact position of intersection Interpolate along grid edges CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 10

  11. Contours in 2D Idea: primitives must cross every grid line connecting two grid points of opposite sign Identify grid Find crossings Get cell lines w/cross x Interpolate along grid lines x Primitives naturally chain together + - CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 11

  12. Questions How many grid lines with crossings can there be? What are the different configurations (adjacencies) of +/- grid points? CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 12

  13. Cases Case Polarity Rotation Total No crossing x2 2 Singlet x2 x4 8 Double x2 x2 4 adjacent Double x2 x1 2 opposite 16 = 2 4 CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 13

  14. Ambiguities How to form the lines? x x x x CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 14

  15. Ambiguities Right or wrong? x x x x x x x x x x x x CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 15

  16. Isosurfacing Goal: given a big 3D block of numbers (“scalars”), create a picture Slicing shows data, but not its 3D shape Solution: Isosurfacing CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 16

  17. A Little Math... R 3 ! I Scalar volume: : D ⇢ I f R ( x, y, z ) 7! f ( x, y, z ) Want to find S v = { ( x, y, z ) | f ( x, y, z ) = v } f = “ All the locations where the value of is ” v S v : isosurface of at f v In 2D: isocontours (some path) In 3D: isosurface Why are isosurfaces useful? CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 17

  18. Notations vertex f 111 f 011 f 001 f 101 Volume of data voxel Each voxel transformed f 010 f 110 to unit cube f 000 f 100 CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 18

  19. Trilinear Interpolation ������������������� In a cuboid (axis parallel) general formula φ ( x, y, z ) = axyz + bxy + cxz + dyz + ex + fy + gz + h with local coordinates P 8 P 7 P = P 1 P 5 P 6 + u ( P 2 − P 1 ) P + v ( P 4 − P 1 ) + w ( P 5 − P 1 ) P 4 P 3 + uv ( P 1 − P 2 + P 3 − P 4 ) + uw ( P 1 − P 2 + P 6 − P 5 ) P 1 P 2 + vw ( P 1 − P 4 + P 8 − P 5 ) + uvw ( P 1 − P 2 + P 3 − P 4 + P 5 − P 6 + P 7 − P 8 ) CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 19

  20. Isosurfacing CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 20

  21. Increasing the Threshold CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 21

  22. Isosurface Construction For simplicity, we shall work with zero level isosurface, and denote positive vertices as There are 8 vertices, each can be positive or negative - so there are 2 8 = 256 different cases CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 22

  23. ����������� Straightforward Cases There is no portion of the isosurface inside the cube! CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 23

  24. Isosurface Construction One Positive Vertex x x x Intersections with edges found by inverse linear interpolation (as in contouring) CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 24

  25. Inverse Linear Interpolation The linear interpolation formula gives value of f at specified point t: f2 f* f1 f ∗ = (1 − t ) f 1 + tf 2 x1 t x2 Inverse linear interpolation gives value of t at which f takes a specified value f* • f2 f* f1 t = f ∗ − f 1 f 2 − f 1 x1 t x2 CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 25

  26. Isosurface Construction One Positive Vertex (continued) Joining edge intersections across faces forms a triangle as part of the isosurface CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 26

  27. Isosurface Construction Two Positive Vertices at Opposite Vertices CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 27

  28. Isosurface Construction One can work through all 256 cases in this way - although it quickly becomes apparent that many cases are similar. For example: 2 cases where all are positive, or all negative, give no isosurface 16 cases where one vertex has opposite sign from all the rest In fact, there are only 15 topologically distinct configurations CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 28

  29. Canonical Cases CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 29

  30. Canonical Cases The 256 possible configurations can be grouped into these 15 canonical cases on the basis of complementarity (swapping positive and negative) and rotational symmetry. The advantage of doing this is for ease of implementation - we just need to code 15 cases not 256 CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 30

  31. Isosurface Construction In some configurations, just one triangle forms the isosurface In other configurations ... ...there can be several triangles …or a polygon with 4, 5 or 6 points which can be triangulated A software implementation will have separate code for each configuration CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 31

  32. Marching Cubes Algorithm Step 1: Classify the eight vertices relative to the isosurface value 8-bit index ; 1 ; 0 - + V8 V7 V5 V6 V4 1 1 0 0 0 0 0 1 V3 V1 V2 Code identifies edges intersected: V1V4; V1V5; V2V3; V2V6; V5V8; V7V8; V4V8 CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 32

  33. �������������������� Marching Cubes Algorithm Step 2: Look up table which identifies the canonical configuration For example: 00000000 Configuration 0 10000000 Configuration 1 01000000 Configuration 1 … 11000001 Configuration 6 … 11111111 Configuration 0 CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 33

  34. Marching Cubes Algorithm Step 3: Inverse linear interpolation along the identified edges will locate the intersection points Step 4: The canonical configuration will determine how the pieces of the isosurface are created (0, 1, 2, 3 or 4 triangles) Step 5: Pass triangles to renderer for display Algorithm marches from cube to cube between slices, and then from slice to slice to produce a smoothly triangulated surface CS530 / Spring 2020 : Introduction to Scientific Visualization. Feb 6, 2020 7. Isosurfaces 34

Recommend


More recommend