what is an iso contour
play

What is an iso-contour? Points in a scalar field (pressure, - PowerPoint PPT Presentation

Isocontours Marching Cubes Han-Wei Shen The Ohio State University What is an iso-contour? Points in a scalar field (pressure, temperature, etc.) that have a constant value 2D: isoline 3D: isosurface It is also called a level


  1. Isocontours Marching Cubes Han-Wei Shen The Ohio State University

  2. What is an iso-contour? • Points in a scalar field (pressure, temperature, etc.) that have a constant value – 2D: isoline – 3D: isosurface • It is also called a level set L f ( c ) = { x | f ( x ) = c } isolines Isosurfaces

  3. 2D Isocontour • Given a 2D scalar field, compuLng a 2D isocontour can be achieved cell by cell Contour Value = C : Value > C : Value < C

  4. Isocontouring • Isocontouring in a cell is an inverse problem of value interpolaLon InterpolaLon Isocontouring p2 p3 p2 p3 P =? ? P p5 p4 f( P ) = C p1 p0 p1 p0

  5. Isocontouring by Linear InterpolaLon • We can compute isocontour within a cell based on linear interpolaLon (1) IdenLfy edges that are ‘zero crossing’ - Values at the two end points are greater P2 (+) P3 (+) (+) and smaller (-) than the contour value (2) Calculate the posiLons of P in those edges P1 (-) P0 (-) (3) Connect the points with lines

  6. Step 1: IdenLfy Edges • Edges that have values greater (+) and less (-) than the contour values must contain a point P that has f(p) = c – This is based on the assumpLon that values vary linearly and conLnuously across the edge v1 f(p1) = v1 f(p2) =v2 C v2 p1 p2

  7. Step 2: Compute IntersecLon • The intersecLon point f(p) = c on the edge can be computed by linear interpolaLon d1/d2 = (v1-C) / (C-v2) ( p – p 1)/( p 2- p 1) = (v1-C) / (v1-v2) p = (v1-C)/(v1-v2) * ( p 2- p 1) + p 1 v1 p f(p1) = v1 f(p2) =v2 C d1 d2 v2 p1 p2

  8. Step 3: Connect the Dots • Based on the principle of linear interpolaLon, all points along the line p 4 p 5 have values equal to C P2 (+) P3 (+) P1 (-) P0 (-) Repeat Step1 – Step 3 for all cells

  9. Isocontour Cases • How many way can an isocontour intersect a linear rectangular cell? 1: > C P4 P3 P2 P1 0: < C P3 P2 0000 0001 0010 0011 P1 P0 0100 0101 0110 0111 • The value at each vertex can be either greater or less 1000 1001 1010 1011 than the contour value • So there are 2 x 2 x 2 x 2 = 16 cases 1100 1101 1110 1111

  10. Unique Topological Cases • There are only four unique topological cases (2) Intersect with two adjacent edges (1) No intersecLon (4) Two contours pass through the cell (3) Intersect with two opposite cases What are the possible bit strings for each of the cases here?

  11. Put It All Together • 2D Isocontouring algorithm: 1. Process one cell at a Lme 2. Compare the values at 4 verLces with the contour value C and idenLfy intersected edges 3. Linear interpolate along the intersected edges 4. Connects the interpolated points together

  12. 3D Isocontour (Isosurface)

  13. Isosurface ExtracLon • Extend the 2D algorithm presented above to three dimensions – 3D cells – Linear interpolaLon along edges in acLve cells • AcLve cells: cells that intersect with the isosurface – Compute surface patches within each cell • Depend on which edges are intersected by the isosurface

  14. Tetrahedral Cells • AcLve cells: min < C < Max • Mark cell verLces that are greater than the contour value as “+”, and smaller than the contour value as “-” • Each cell has four verLces – Each cell can have a value greater (+) or smaller (-) than the contour value – A total of 2 x 2 x 2 x 2 = 16 combinaLons, but there are only three unique topological cases

  15. Case 1: No IntersecLon (all outside or inside) • Values at all cell verLces are greater or smaller than the contour values – If we call cell values greater than the contour value as ‘outside’ and smaller as ‘inside’, then all cell verLces are either completely inside or outside of the isosurface All VerLces Outside All VerLces Inside

  16. Case 2: One Outside (or Inside) • Only one of the verLces are outside or inside of the isosurface One Outside One Inside • Isosurface only intersects with edges that have ‘+’ and ‘–’ verLces at two ends

  17. Case 2: One Outside (or Inside) • Only one of the verLces are outside or inside of the isosurface One Outside One Inside • Isosurface only intersects with edges that have ‘+’ and ‘–’ verLces at two ends

  18. Case 2: One Outside (or Inside) • Only one of the verLces are outside or inside of the isosurface One Outside One Inside • Isosurface only intersects with edges that have ‘+’ and ‘–’ verLces at two ends

  19. Case 2: TriangulaLon • Compute the intersecLon points on the acLve edges One Outside One Inside

  20. Case 2: TriangulaLon • Compute the intersecLon points on the acLve edges One Outside One Inside • Connect the intersecLon points into a single triangle

  21. Case 3: Two Outside (or Inside) • Two of the verLces are outside or inside of the isosurface Two outside Two Inside • Isosurface only intersects with edges that have ‘+’ and ‘–’ verLces at two ends

  22. Case 3: Two Outside (or Inside) • Two of the verLces are outside or inside of the isosurface Two outside Two inside • Isosurface only intersects with edges that have ‘+’ and ‘–’ verLces at two ends

  23. Case 3: Two Outside (or Inside) • Two of the verLces are outside or inside of the isosurface Two outside Two inside • Isosurface only intersects with edges that have ‘+’ and ‘–’ verLces at two ends

  24. Case 3: Two Outside (or Inside) • Two of the verLces are outside or inside of the isosurface TWO Outside Two Inside • Isosurface only intersects with edges that have ‘+’ and ‘–’ verLces at two ends

  25. Put It All Together 1. Iterate through all tetrahedral cells a) Compare the values at the four corners of each cell b) Determine the edges that intersect with the isosurface if any c) Compute the surface-edge intersecLon points using linear interpolaLon d) Triangulate the intersecLon points based on the cases discussed above

  26. Rectangular Cells With 8 verLces in a cell, each having a value greater or smaller than the contour value, there can be 2 8 = 256 possible cases But the total number of unique topological cases is much smaller than 256

  27. Example of Case ReducLon Value Symmetry _ _ + + _ + _ + _ + _ + _ _ + +

  28. Example of Case ReducLon RotaLon Symmetry _ _ _ _ _ + _ + _ _ _ _ _ _ + + By inspecLon, we can reduce the number of cases from 256 to 15

  29. Isosurface Cases

  30. The Marching Cubes Algorithm • By Lorensen and Cline in 1987 Vi is ‘1’ or ‘0’ (one bit) v8 v7 1: > C; 0: <C (C= sovalue) v4 v3 Each cell has an index mapped to a v6 value ranged [0,255] v5 v2 v1 Index = v8 v7 v6 v5 v4 v3 v2 v1

  31. Marching Cubes Table Lookup • Based on the values at the verLces, map the cell to one of the 15 cases • Perform a table lookup to see what edges have intersecLons Index intersecLon edges 0 e1, e3, e5 e7 … 1 e11 e8 e12 e6 2 e3 e5 3 e2 e4 e9 e10 e1 14

  32. Compute IntersecLons • Perform linear interpolaLon to compute the intersecLon points at the edges • Connect the points by looking up the marching cubes table _ + _ + _ + _ +

  33. Marching the Cubes • SequenLally scan through the cells – row by row, layer by layer • You can re-use the intersecLon points for neighboring cells

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend