Triangulation of Implicit Surfacesw3.impa.br/~pabloant/s3d/slides.pdf · Modeling: Triangulation...

Preview:

Citation preview

Triangulation of Implicit Surfaces3D Graphics Systems

Pablo J. Antuna

June 26, 2015

Parts of the project

I Modeling

I Visualization

I Interface

Modeling: Implicit Surfaces

Mathematical implicit surfaces:

f (x , y , z) = 0.

Example:x2 + y2 + z2 − R2 = 0.

Modeling: Triangulation

How do we visualize implicit surfaces?Two ideas:

I Ray Tracing

I Triangulation

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

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

Modeling: Triangulation

Application: Simulation of Fluids

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.

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

Interface

Features:

I Input for the mathematical expression

I Resolution input

I Arcball control of camera

I Field of view control (zoom)

Interface

Interface

Technical details:

I Developed in C/C++, interface designed with Qt Creator

I C++ Math Expression Parser (ExprTK)

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.

Some Surfaces

Figure : Eight.

Some Surfaces

Figure : Chair.

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.

Some Surfaces

Figure : Klein Bottle from another angle.

Thank you!

Recommended