首页 >
> 详细

Computer Graphics

CSCI 490, CSCI 630

Marching Cubes

Write a program that will implement the marching cubes algorithm.

Program

Your program should read in a 3D array of binary floating point values and

generate a PolySet as output. The coordinate system of the PolySet should

correspond to the index positions of the data, with x in the direction of

increasing columns, y in the direction of increasing rows, and z in the direction

of increasing planes. Your program should take a threshold value from the user

which will be used to generate the appropriate isosurface in the data. Your

program should also ask the user (or take as a command line argument) a flag

to determine if surface normals should be generated for each vertex in the

polyset.

Data File Format

Data files for this project will be in the following format: 3 text integers,

representing the number of columns, rows, and planes in the data set. After the

number of planes, there will be exactly one byte of whitespace. After that come

the data values in plane major, row major order. The data values are binary

values, stored in little-endian order (perfect for a PC), in standard format for a

float.

Implementation Points

It is strongly recommended that you use a table-based approach to drive the

transition from tagged voxel vertices to triangles on voxel edges.

Making a full table is extremely time consuming. For this assignment, you are

only required to handle the 102 cases needed to represent spheres of arbitrary

radii.

A suggested implementation order is

NIU - CSCI 490/630

1 of 2

Read in the data set and store it in memory.

Print out the data as a check of input, and also to give you some

infrastructure for stepping through the array.

Step through the array, computing how the vertices of each voxel compare

with the threshold (+ and -) Pick a pattern of + and - and generate the

polygons necessary for that type of voxel.

As you complete a particular type of voxel, your program should be able to

generate partial solutions. Just add new voxel types one at a time until your

program can generate a full solution

Save normal generation for last.

Below is a list of functions (not required) that may make life easier. Argument

lists are not exclusive. Add other arguments as needed.

A function that takes the data indices of a voxel and returns the gradient at

that data point

A function that takes the data indices of the two endpoints of an edge and

returns the surface normal at the threshold point along the edge

A function that takes 3 integers (the polyset vertices) and adds a triangle

to the growing face list of vertices.

A function that takes the edge number associated with the edge of a voxel,

and the data indices of the base corner of the voxel and returns (or stores)

the x, y, z values of the threshold point along the edge.

A function that takes the data indices of edge endpoints of a voxel and

returns the interpolation parameter where the threshold occurs on that

edge

A function that takes a voxel type or label, and the indices of the base

vertex of the voxel and generates the appropriate triangles (using the

other functions).

Artistic

No artistic component is required for this project.

NIU - CSCI 490/630

联系我们

- QQ：99515681
- 邮箱：99515681@qq.com
- 工作时间：8:00-21:00
- 微信：codinghelp2

- 辅导comp30027帮做python编程 2021-08-02
- 辅导csse2002/7023-Assignment 1辅导留学... 2021-08-02
- 辅导rush2辅导c/C++ 2021-08-02
- 辅导r语言编程|辅导spss|辅导web开发|辅导... 2021-05-10
- Data留学生编程辅导、辅导analysis程序、Sql语言程序调试辅导r语 2021-05-10
- 辅导31748程序语言、辅导programming编程设计、Java，Pyt 2021-05-10
- 辅导cis 657编程、辅导c/C++程序、C++编程调试帮做haskell 2021-05-10
- Com1005程序辅导、辅导java编程语言、辅导java程序辅导留学生pr 2021-05-10
- 辅导sit283程序、辅导c/C++，Python编程设计、Cs，Java程 2021-05-09
- C++程序辅导、辅导c++程序、辅导program编程语言辅导r语言编程|辅 2021-05-09
- 辅导0ccs0cse编程、辅导r，Java，Python程序语言辅导web开 2021-05-09
- Comp124编程语言辅导、Java程序辅导、辅导program语言编程辅导 2021-05-09
- Comp122编程语言辅导、辅导java程序语言、Java程序调试帮做has 2021-05-09
- 辅导ele00041i 调试java Programming 2021-05-08
- 辅导econ 2014-Assignment 1 Managerial... 2021-05-08
- 辅导mast90044-Assignment 1 Thinking An... 2021-05-08
- 辅导cs310-Assignment 2 Hash Tables 2021-05-08
- 辅导5pm 调试java编程、Java编程辅导 2021-05-08
- 辅导cs544 Final Exam Preparation Guide... 2021-05-08
- 辅导infs7450 Social Media Analytics 2021-05-08