首页 新闻 聚焦 科技 财经 创业 综合 图片 视频

IT界

旗下栏目: 行业 生态 IT界 创新

辅导CSCI 490课程编程、辅导C/C++,Java编程

来源:互联网 发布时间:2021-10-12
辅导CSCI 490课程编程、辅导C/C++,Java编程
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
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   WX:codehelp
  免责声明:珠穆朗玛网对于有关本网站的任何内容、信息或广告,不声明或保证其正确性或可靠性,用户自行承担使用网站信息发布内容的真假风险。
责任编辑:珠穆朗玛网