triangulation of implicit surfacesw3.impa.br/~pabloant/s3d/slides.pdf · modeling: triangulation...
TRANSCRIPT
![Page 1: Triangulation of Implicit Surfacesw3.impa.br/~pabloant/s3d/slides.pdf · Modeling: Triangulation Detailes about the 3D case I We have 256 possible cases. I Discarding the trivial](https://reader036.vdocuments.net/reader036/viewer/2022081404/5f0409b77e708231d40c02b0/html5/thumbnails/1.jpg)
Triangulation of Implicit Surfaces3D Graphics Systems
Pablo J. Antuna
June 26, 2015
![Page 2: Triangulation of Implicit Surfacesw3.impa.br/~pabloant/s3d/slides.pdf · Modeling: Triangulation Detailes about the 3D case I We have 256 possible cases. I Discarding the trivial](https://reader036.vdocuments.net/reader036/viewer/2022081404/5f0409b77e708231d40c02b0/html5/thumbnails/2.jpg)
Parts of the project
I Modeling
I Visualization
I Interface
![Page 3: Triangulation of Implicit Surfacesw3.impa.br/~pabloant/s3d/slides.pdf · Modeling: Triangulation Detailes about the 3D case I We have 256 possible cases. I Discarding the trivial](https://reader036.vdocuments.net/reader036/viewer/2022081404/5f0409b77e708231d40c02b0/html5/thumbnails/3.jpg)
Modeling: Implicit Surfaces
Mathematical implicit surfaces:
f (x , y , z) = 0.
Example:x2 + y2 + z2 − R2 = 0.
![Page 4: Triangulation of Implicit Surfacesw3.impa.br/~pabloant/s3d/slides.pdf · Modeling: Triangulation Detailes about the 3D case I We have 256 possible cases. I Discarding the trivial](https://reader036.vdocuments.net/reader036/viewer/2022081404/5f0409b77e708231d40c02b0/html5/thumbnails/4.jpg)
Modeling: Triangulation
How do we visualize implicit surfaces?Two ideas:
I Ray Tracing
I Triangulation
![Page 5: Triangulation of Implicit Surfacesw3.impa.br/~pabloant/s3d/slides.pdf · Modeling: Triangulation Detailes about the 3D case I We have 256 possible cases. I Discarding the trivial](https://reader036.vdocuments.net/reader036/viewer/2022081404/5f0409b77e708231d40c02b0/html5/thumbnails/5.jpg)
Modeling: Triangulation
Marching cubes algorithm:
I Easy to implement
I It is fast, because it is based on lookup tables
I The result can be rendered easily on the GPU
I Used for the visualization of medical data
![Page 6: Triangulation of Implicit Surfacesw3.impa.br/~pabloant/s3d/slides.pdf · Modeling: Triangulation Detailes about the 3D case I We have 256 possible cases. I Discarding the trivial](https://reader036.vdocuments.net/reader036/viewer/2022081404/5f0409b77e708231d40c02b0/html5/thumbnails/6.jpg)
Modeling: Triangulation
Algorithm:
I Create a uniform grid of cubes
I March through the grid: for each square, calculate the sign ofthe function at the vertices
I Lookup the corresponding intersections from a table
Example: Marching Squares
![Page 7: Triangulation of Implicit Surfacesw3.impa.br/~pabloant/s3d/slides.pdf · Modeling: Triangulation Detailes about the 3D case I We have 256 possible cases. I Discarding the trivial](https://reader036.vdocuments.net/reader036/viewer/2022081404/5f0409b77e708231d40c02b0/html5/thumbnails/7.jpg)
Modeling: Triangulation
Application: Simulation of Fluids
![Page 8: Triangulation of Implicit Surfacesw3.impa.br/~pabloant/s3d/slides.pdf · Modeling: Triangulation Detailes about the 3D case I We have 256 possible cases. I Discarding the trivial](https://reader036.vdocuments.net/reader036/viewer/2022081404/5f0409b77e708231d40c02b0/html5/thumbnails/8.jpg)
Modeling: Triangulation
Detailes about the 3D case
I We have 256 possible cases.
I Discarding the trivial cases, and using symetry, we can reduceit to 15 cases.
I An 8 bit index is formed where each bit corresponds to avertex.
![Page 9: Triangulation of Implicit Surfacesw3.impa.br/~pabloant/s3d/slides.pdf · Modeling: Triangulation Detailes about the 3D case I We have 256 possible cases. I Discarding the trivial](https://reader036.vdocuments.net/reader036/viewer/2022081404/5f0409b77e708231d40c02b0/html5/thumbnails/9.jpg)
Visualization
After the marching cubes algorithms is run, the result is a mesh oftriangles. Then,
I A scene file is created with the mesh as the only object in thescene
I Render the scene using S3D software and OpenGL
![Page 10: Triangulation of Implicit Surfacesw3.impa.br/~pabloant/s3d/slides.pdf · Modeling: Triangulation Detailes about the 3D case I We have 256 possible cases. I Discarding the trivial](https://reader036.vdocuments.net/reader036/viewer/2022081404/5f0409b77e708231d40c02b0/html5/thumbnails/10.jpg)
Interface
Features:
I Input for the mathematical expression
I Resolution input
I Arcball control of camera
I Field of view control (zoom)
![Page 11: Triangulation of Implicit Surfacesw3.impa.br/~pabloant/s3d/slides.pdf · Modeling: Triangulation Detailes about the 3D case I We have 256 possible cases. I Discarding the trivial](https://reader036.vdocuments.net/reader036/viewer/2022081404/5f0409b77e708231d40c02b0/html5/thumbnails/11.jpg)
Interface
![Page 12: Triangulation of Implicit Surfacesw3.impa.br/~pabloant/s3d/slides.pdf · Modeling: Triangulation Detailes about the 3D case I We have 256 possible cases. I Discarding the trivial](https://reader036.vdocuments.net/reader036/viewer/2022081404/5f0409b77e708231d40c02b0/html5/thumbnails/12.jpg)
Interface
Technical details:
I Developed in C/C++, interface designed with Qt Creator
I C++ Math Expression Parser (ExprTK)
![Page 13: Triangulation of Implicit Surfacesw3.impa.br/~pabloant/s3d/slides.pdf · Modeling: Triangulation Detailes about the 3D case I We have 256 possible cases. I Discarding the trivial](https://reader036.vdocuments.net/reader036/viewer/2022081404/5f0409b77e708231d40c02b0/html5/thumbnails/13.jpg)
Some Surfaces
Figure : Decocube, ((x2 + y2 − 0.22)2 + (z2 − 1)2) ∗ ((y2 + z2 − 0.22)2 +(x2 − 1)2) ∗ ((z2 + x2 − 0.22)2 + (y2 − 1)2) − 0.5 = 0.
![Page 14: Triangulation of Implicit Surfacesw3.impa.br/~pabloant/s3d/slides.pdf · Modeling: Triangulation Detailes about the 3D case I We have 256 possible cases. I Discarding the trivial](https://reader036.vdocuments.net/reader036/viewer/2022081404/5f0409b77e708231d40c02b0/html5/thumbnails/14.jpg)
Some Surfaces
Figure : Eight.
![Page 15: Triangulation of Implicit Surfacesw3.impa.br/~pabloant/s3d/slides.pdf · Modeling: Triangulation Detailes about the 3D case I We have 256 possible cases. I Discarding the trivial](https://reader036.vdocuments.net/reader036/viewer/2022081404/5f0409b77e708231d40c02b0/html5/thumbnails/15.jpg)
Some Surfaces
Figure : Chair.
![Page 16: Triangulation of Implicit Surfacesw3.impa.br/~pabloant/s3d/slides.pdf · Modeling: Triangulation Detailes about the 3D case I We have 256 possible cases. I Discarding the trivial](https://reader036.vdocuments.net/reader036/viewer/2022081404/5f0409b77e708231d40c02b0/html5/thumbnails/16.jpg)
Some Surfaces
Figure : Klein Bottle (Immersion), (x2 + y2 + z2 + 2y − 1) ∗ [(x2 + y2 +z2 − 2 ∗ y − 1)2 − 8 ∗ z2] + 16 ∗ x ∗ z ∗ (x2 + y2 + z2 − 2 ∗ y − 1) = 0.
![Page 17: Triangulation of Implicit Surfacesw3.impa.br/~pabloant/s3d/slides.pdf · Modeling: Triangulation Detailes about the 3D case I We have 256 possible cases. I Discarding the trivial](https://reader036.vdocuments.net/reader036/viewer/2022081404/5f0409b77e708231d40c02b0/html5/thumbnails/17.jpg)
Some Surfaces
Figure : Klein Bottle from another angle.
![Page 18: Triangulation of Implicit Surfacesw3.impa.br/~pabloant/s3d/slides.pdf · Modeling: Triangulation Detailes about the 3D case I We have 256 possible cases. I Discarding the trivial](https://reader036.vdocuments.net/reader036/viewer/2022081404/5f0409b77e708231d40c02b0/html5/thumbnails/18.jpg)
Thank you!