cg marching

13
MARCHING CUBES: A High Resolution 3D Surface Construction Algorithm William E. Lorensen Harvey E. Cline (General Electric Company R&D, 1987) Sungsoo Ha

Upload: phongvan381989

Post on 18-Apr-2015

64 views

Category:

Documents


3 download

DESCRIPTION

thuật toán Marching Cubes

TRANSCRIPT

Page 1: Cg Marching

MARCHING CUBES: A High Resolution 3D Surface Construction Algorithm William E. Lorensen

Harvey E. Cline

(General Electric Company R&D, 1987)

Sungsoo Ha

Page 2: Cg Marching

Introduction

• Background

• Increased attention to visualization of 3D medical images

• Lack detail and introduce artifacts

• Marching Cubes

• A new, high-resolution 3D surface construction algorithm

• Creates a polygonal representation

• List

• Information flow for 3D medical applications

• Marching Cubes Algorithm

Page 3: Cg Marching

Information Flow for 3D Medical

<3D Medical Information Flow>

Page 4: Cg Marching

MARCHING CUBES ALGORITHM • Primary tasks

1. Locate the surface

2. Create triangles

3. Calculate the normals to the surface

Page 5: Cg Marching

Marching Cube

Page 6: Cg Marching

Triangulated Cubes(1)

[1 voxel inside] [7 voxel inside]

1. 256 2. Complementary symmetry: 128 3. Rotational symmetry: 14

Page 7: Cg Marching

Triangulated Cubes(1)

Page 8: Cg Marching

Cube Numbering

Page 9: Cg Marching

Compute Normal Vector

𝑔 𝑥, 𝑦, 𝑧 = 𝛻𝑓 (𝑥, 𝑦, 𝑧)

𝐺𝑥 𝑖, 𝑗, 𝑘 =𝐷 𝑖 + 1, 𝑗, 𝑘 − 𝐷(𝑖 − 1, 𝑗, 𝑘)

∆𝑥

𝐺𝑦 𝑖, 𝑗, 𝑘 =𝐷 𝑖, 𝑗 + 1, 𝑘 − 𝐷(𝑖, 𝑗 − 1, 𝑘)

∆𝑦

𝐺𝑧 𝑖, 𝑗, 𝑘 =𝐷 𝑖, 𝑗, 𝑘 + 1 − 𝐷(𝑖 𝑗, 𝑘 − 1)

∆𝑧

Page 10: Cg Marching

Marching Cube Algorithm

1. Read four slices

2. Scan two slices and create a cube

3. Calculate an index

4. Find the list of edges from LUT

5. Find the surface-edge intersection

6. Calculate a unit normal at each cube vertex

7. Output: the triangle vertices, vertex normals.

Page 11: Cg Marching

2D Example

<With Linear Interpolation>

<With High Order Interpolation>

Page 12: Cg Marching

3D Example with GPU

• CUDA SDK

Page 13: Cg Marching

Q&A

•Thank You!