CSCI 490图形计算
【CSCI 490图形计算】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
推荐阅读
- ubuntu开机默认进入命令行模式/用户图形界面
- Metal|Metal 案例03(大批量顶点数据的图形渲染)
- Crack|vectordraw图形库,提高了 WebGL 3D 渲染模式的性能
- MATLAB图形界面|基于Matlab的汽车出入库计时计费系统
- 图形学|图形学 光栅化详解(Rasterization)
- 2、OpenGL初探之OpenGL图形API及专有名词
- gui编程|GUI 图形用户界面编程(四)-Button组件
- python基础编程|python编程基础(python 实现GUI(图形用户界面)编程详解)
- java程序|java程序 图形界面_Java中的图形界面编程-GUI
- java图形界面的实验代码_GUI图形用户界面实验报告