首页
网站开发
桌面应用
管理软件
微信开发
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
热点项目
更多
代做ceng0013 design of a pro...
2024-11-13
代做mech4880 refrigeration a...
2024-11-13
代做mcd1350: media studies a...
2024-11-13
代写fint b338f (autumn 2024)...
2024-11-13
代做engd3000 design of tunab...
2024-11-13
代做n1611 financial economet...
2024-11-13
代做econ 2331: economic and ...
2024-11-13
代做cs770/870 assignment 8代...
2024-11-13
代写amath 481/581 autumn qua...
2024-11-13
代做ccc8013 the process of s...
2024-11-13
代写csit040 – modern comput...
2024-11-13
代写econ 2070: introduc2on t...
2024-11-13
代写cct260, project 2 person...
2024-11-13
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!