联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> C/C++编程C/C++编程

日期:2022-12-03 12:26

COMP 5821M: Geometric Processing 2022-2023

ASSIGNMENT 2: Mesh Operators & Loop Subdivision Surfaces [30 marks total]

We have seen in class how we can define a limit surface from a mesh by subdividing the polygons in

the mesh. One of the simplest such subdivisions is the Loop subdivision, where each triangle is

broken into four smaller triangles.

Your code should read in a directed edge data structure from a text file and output a new directed

edge data structure in a new text file, as follows:

1. Each vertex vi in the input should have the same index in the output.

2. Each edge e j will have a new vertex in the output, added sequentially at the end of the array

3. Each face f k will be subdivided in 4, with the central face retaining the original index, while

the remaining faces are added sequentially at the end of the array.

There are three basic approaches, which are worth different numbers of marks in order of difficulty:

A. You can generate a new triangle file & rebuild the half-edge data structure at each level. This

will give you a sequence of files which represent the different levels of refinement. [15 marks]

B. You can create a second mesh in memory and add triangles to it one at a time based on the

old mesh, then run the halfedge pairing, &c. to create the final version. [20 marks]

C. You can edit the original mesh in place, applying mesh operations to delete the old triangles

and replace them with new. [25 marks]

Obviously, C is the best solution for general purpose, and is therefore worth the most marks,

although any valid solution properly coded will achieve pass marks. If you adopt solution C, it would

be ideal if you used the same renumbering scheme as me, to ease marking, and we will go over this

scheme in the lab this week.

You will be provided with a modified triangle renderer that reads the directed edge data structure

directly, to allow you to check your results. You will also be provided with an implementation of the

directed edge data structure to use, although you are encouraged to use your own version instead.

Marking will be based on whether your code produces the correct mesh topology, the correct vertex

positions, and has a logical relationship between old and new triangles.

All code should compile on the School's Linux machines without installation of any extra libraries or

applications. You should include a makefile and a readme.txt file with any additional instructions.

Other than this, you should only hand in code files (.cpp/.h).

PENALTIES:

Poorly structured or badly commented code may be penalised by up to 2.5 marks.

Poorly formatted output files may also be penalised by up to a further 2.5 marks.

Code without a readme or makefile may be penalised by up to 1 mark.

Code that does not compile properly will be assigned a mark of 0, but I will usually give the student

one chance to correct this.


DUE DATE: Friday, December 9, 2022, 10:00am


相关文章

版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp