首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
program代做、代写C++编程语言
项目预算:
开发周期:
发布时间:
要求地区:
Computer Lab Assignment #3, S1 2024
Date Issued: see Wattle page
Due Date: see Wattle page
Weighting: 12
Instruction:
All homework assignments must be completed individually. We encourage you to discuss the
assignments with other students. However, you should not share any of your codes with anyone
else. Each student is responsible for implementing the assignment on their own. You may assist
other in debugging their codes, but you should not copy and paste. ANU is using TurnItIn to
detect possible duplications. Consulting with previous year students who enrolled in this course
on specific assignment is also not allowed. You may use the internet as a resource for learning the
materials, but you should not borrow any existing codes found online.
The homework assignments involve a significant amount of C++ programming. However, for most
cases, a skeletal code base is provided, and you only need to fill in the missing parts, and/or fix
bugs if any.
You will submit a single ZIP file as your submission, which must contain the following files:
(1) All source codes (ending in .h, or .hpp, or .cpp), and your Makefile, CMakeLists.txt. Please
include all needed source codes for successful compilation. Please also remove all intermediate
files (such as ./vs. ./build. ) that are not needed for the compilation – Failing to do so will
lead to penalty to the marks.
(2) A written CLab3 Lab Report (minimum 10-point font size, single column, in PDF format,
with task statement, methods used, any new features that you have implemented, any known
bugs in your code, answer any questions that have been asked in the task, instruction for
the tutor to use your code, example experiment results. )
Your ZIP file must be named as “COMPX610 2024 HW3 UID.zip”. Replace ‘X’ with 4 or 8.
Replace the UID with your Uxxxxxxxx; Please submit your ZIP file to Wattle before the deadline.
Late submission will lead to penalty as per the ANU policy. Later-than-one-week submission will
1
not be accepted, which may result zero mark, unless a pre-approval for special consideration is
obtained in written before the submission deadline.
In C-Lab-3, you will be practising how to efficiently process 3D meshes. Specifically, there are
two tasks to complete: T1: half-edge data structure, and T2: mesh simplification. We
provide the general code framework for completing these two tasks and it is highly recommended
to use it. However, you’re also welcomed to build up your own pipeline as long as it satisfy all the
requirements.
Task-1: half-edge data structure
In this task, you will build upon your knowledge of C++ and graphics by creating a half-edge
data structure from interlinked pointers, and then compute important geometry and topology
properties, and visualize your mesh using MeshLab or Blender.
Steps to take:
(1) Use the two OBJ meshes provided in ”model” folder (bigguy2.obj, teeth.obj) to conduct the
following experiments and report their results. You are also welcomed to download other
complex 3D meshes in OBJ file format from the internet to test your algorithms. Make sure
that each of the meshes satisfies the following properties:
• The mesh contains a single connected component.
• The mesh must be watertight, i.e., a valid manifold surface that encloses a volume.
(2) Complete the following implementations in task1.cpp:
• Load the mesh in OBJ file format and represent the loaded mesh in the memory
by a half-edge data structure. In this step, you’ll need to implement the function
Mesh::convert obj format to mesh();
• Iterate all half edges that points away from given vertex by implementing the function
Vertex::neighbor half edges();
• Iterate all member vertices of given face by implementing Face::vertices().
• Compute its topology properties (genus number). You’ll have to implement the function
Mesh::compute genus();
• Compute its volume by implementing Mesh::compute volume();
• Compute its surface areas by implementing Mesh::compute surface area()
• Compute the average degree of all the vertices by implementing
Mesh::compute average degree().
(3) Your lab report should contain the following contents:
2
• Put the screenshot of the mesh represented by half-edge data structure
• Brief introduction describing the process of your conversion (a pseudo-code will be best
for clarification)
• Show the geometric properties (e.g. number of vertices, faces, half-edges and edges) of
the mesh as well as your topology computation results with the screenshot from the
terminal output.
Hint:
Half-edge data structure consists of four basic components: Vertex, Face, HalfEdge, and
Edge. The format of the half-edge data structure is outlined below, and basic class member
variables are already provided in include/mesh components.hpp. (Additional member
variables and member functions are used in task2, you can ignore it for now.)
Reference guide:
https://cs418.cs.illinois.edu/website/text/halfedge.html
https://cs184.eecs.berkeley.edu/sp24/docs/half-edge-intro
The Vertex class contains variables for the following information:
• A Vector3 for storing its (x, y, z) position;
• A pointer to one of the HalfEdges that points away from this Vertex;
• A unique integer identifier for the Vertex.
The Face class contains variables for the following information:
• A pointer to one of the HalfEdges that lies on this Face;
• A unique integer identifier for the Face.
The HalfEdge class contains variables for the following information:
• A pointer to the next HalfEdge in the loop of HalfEdges that lie on this HalfEdge’s Face;
• A pointer to the HalfEdge that lies parallel to this HalfEdge and which travels in the
opposite direction and is part of an adjacent Face, i.e., this HalfEdge’s symmetrical
HalfEdge;
• A pointer to the Edge on which this HalfEdge represents;
• A pointer to the Face on which this HalfEdge lies;
• A pointer to the Vertex that this HalfEdge originates from;
• A unique integer identifier for the HalfEdge.
The Edge class contains variables for the following information:
• A pointer to one of the HalfEdges that represents this Edge;
• A unique integer identifier for the Edge.
In your Lab report, you should clearly visualise the mesh, and list key results to demonstrate your
solutions.
3
Task-2: Simplify the mesh using quadratic error metrics
Purpose:
The goal of this task is to load a mesh and to simplify the mesh down to a specified number
of triangles. You will learn about modern mesh simplification algorithms with a half-edge data
structure.
Description:
In this task, we will perform mesh simplification algorithm based on quadric error metric (QEM),
you may read the following paper for reference:
https://www.cs.cmu.edu/˜
./garland/Papers/quadrics.pdf
To perform surface simplification, you should use the half-edge data structure implemented in
task1 to achieve a pair-contraction operator for the mesh. This pair-contraction operation should
preserve the topology of the surface.
To reduce the difficulty of the implementation, we’ll simplify the algorithm in the original paper
introduced as follows:
4
(1) When choosing valid pairs (v1, v2) and perform contraction, we only consider cases where
(v1, v2) form an edge. Without loss of generality, we’ll use the term “pair contraction” and
“edge collapse” interchangeably.
(2) We will not use the point-to-plane distance as discussed in the paper that computes the
distance to adjacent planes to act as error metric, because degenerate cases may make the
problem more difficult to solve. Instead, we will use distance to adjacent vertices with the
derivation below. You should collapse edges in the order dictated by the error function below
and place new vertices at the minimizer of this error function:
• Let E(v) = Pn
i=1(v − vi)
2 be the error function associated with each vertex v of the
mesh, where {vi
, i = 1. . . n} are the neighbours of v. If we expand this quadratic,
we find that E(v) = nvT
v − 2v
T Pn
i=1 vi +
Pn
i=1 v
T
i
vi
, whose minimizer is given by
v =
Pn
i=1 vi/n.
• We can further rewrite E(v) as vector dot product form, which is: E(v) =
n
Pn
i=1 vi
Pn
i=1 v
T
i
vi
T
v
T
v −2v 1
. Therefore, all we need to store to represent
this quadratic is the coefficient q =
n
Pn
i=1 vi
Pn
i=1 v
T
i
vi
, which is a 5-d vector.
• The benefit of this representation is that when creating the combined quadratic for
the union of two vertices, we simply need to sum the two vectors, each containing 5
numbers, together for the two different vertices.
You should perform edge-collapse operations using the error function above until you achieve the
desired number of polygons or there are no more edges that can be collapsed safely. The processing
time must be below one minutes. Your report should display the original and simplified surface
and also report the number of vertices, faces and edges respectively.
You must disallow edge collapses if they create illegal topology. While you should work
independently, it is a good idea to compare your results with other students, to verify code
correctness. You should assure in your input OBJ all the polygons are triangles and
the input surface is closed.
Steps to take:
Perform mesh simplification in task2.cpp. We already provide the code framework for this
function and all you need to do is to complete the missing functions as specified in the code.
However, you’re also welcomed to implement the whole pipeline in your own way as long as it
successfully achieves the simplification functionality and generate the same results. Complete the
following functionalities:
(1) Vertex::compute qem coeff() to compute the coefficient vector q that represent the
quadratic coefficient of this vertex.
(2) Edge::compute contraction() to compute the following results for this edge (v1, v2),
which will be used later to perform edge collapse:
• The optimal contraction target v
∗
;
5
• The quadratic error metrics E(v
∗
) which is the combined quadratic for the union of
v1, v2. Note that the computed results will become the cost of contracting this edge.
(3) Edge::edge contraction() to perform edge-collapse, which we will write as (v1, v2) →
v
∗
. It contains the following steps:
• Moves the vertex v1 to the new position v*, remember to update all corresponding
attributes
• Connects all incident edges of v1 and v2 to v*, and remove the vertex v2
• Any faces, half edges, and edges associated with this collapsed edge will be removed.
(4) Your lab report should contain the following contents:
• Use the two OBJ meshes provided in ”model” folder to demonstrate the results.
• Display the original mesh as well as the simplified mesh with MeshLab or Blender.
• Take the screenshot of the mesh geometric information as well as the verification results
from the terminal output to demonstrate the correctness of your implementation.
More example mesh surfaces can be found here: happy, teddy
Your ZIP file must be named as "COMPX610 2024 HW3 UID.zip".
== END OF CLAB-3 ==
6
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
cis432代做、代写python/java程...
2024-05-04
eeen3007j代写、c++程序设计代...
2024-05-04
代写data程序、代做c/c++, jav...
2024-05-04
comp2006代做、代写c++程序语言
2024-05-04
comp26020代做、java/c++设计编...
2024-05-04
csci251 advanced programming...
2024-05-03
cs 6290: high-performance co...
2024-05-03
assignment 2: executing and ...
2024-05-03
ecse427/comp310 programmin...
2024-05-03
cs 452 (fall 22): operating...
2024-05-03
comp9414 23t2 assignment 2 ...
2024-05-03
dpst1091 23t1 assignment 2 ...
2024-05-03
program代做、代写python设计编...
2024-05-03
热点标签
finm8007
comp2006
comp26020
comp1721
eeen3007j
cis432
csci251
comp5125m
com398sust
32022
mth6158
comp328
finn41615
2024
mec302
mgmt3004
mgt7158
com160
as.640.440
econ3016
finm7405
econ7021
fin600
infs4205/7205
mktg2510-
f27sb
csse2310/csse7231
rv32i
eecs 113
comp1117b
cs 412
comp 315
econ7300
comp2017
ecs 116
fit5046
com6511
comp30024
acs341
econ1020
isys3014
acc408
comp1047
csc 256
cs 6347
finm7008
comp34212
csmde21
estr2520
comp285/comp220
mds5130/iba6205
finc6010
is3s665
busi2194
125.785
iom209
msin0041
econ339
cmt218
mast10007
comp5349
ecx2953/ecx5953
bios706
comp3310
mth6150
comp30027
comp20005
eec286
busi2211
bff2401
fnce90046
visu2001
mang6554
finc6001
125785
data423-24s1
engi 1331
fint2100
(520|600).666
can202
cs 61b
mast20029
info20003
stat512
econ3208
cmpsc311
engg1340
ecmt1010
fit5216
basc0003
ee3121
acct2002
comp5313
busi2131
ise529
elec372/472
csit940/csit440
cenv6141
comp3027/comp3927
ftec5580
comp1433
msci223
mark203
en3098
eden1000
ece6483
econ4410
mats16302
cs 6476
com6521
comp222
comp3211
comp10002
csc1002
chc6186
cs 161
comp27112
comp282
swen20003
comm1190
elec9764
acfi3308
acct7101
fin6035
comp2048
geog0163
comp2013
coen 146
dts101tc
sehh2042
comp30023
comp4880/8880
cs 455
07
stat0045.
fil-30023
celen085
psyc40005
math40082
are271
comp9311
ee5311
imse2113
comp 2322
acct2102
fnd109
int102
is3s664
is6153
data4000
accfin5034
fit5212
cs536-s24
fit5225
ecos3006
mes202tc
finc5001
stat3061
csc171
cs1b
7ssmm712
bu.450.760
cs170
comp3411
swen90004
cpt206
comp5313/comp4313—large
bl5611
kxo206
comp532
elec207
kxo151
cs 2820
cpt108
math2319
dts204tc
qm222
comp2511
ccs599
infs1001
mat2355
eeee4123
25721
ifn647
pols0010
hpm 573
qbus6860
comp9417
csci 1100
stat0023
cse340
comp2003j
cs 2550
cs360
fin 3080
ierg 4080
cs6238
cit 594
finm7406
hw6
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!