程序代写案例-CSC317

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
CSC317 Winter 2021: Term Test2: Family Name:_______________________________
Apr. 5, 2021, 3PM (due 7th midnight) First Name: _______________________________
Student ID: _______________________________

Instructions:
Attempt all 4 questions; the total mark is 35.
Please answer questions legibly in the space provide (preferably type) and submit electronically on MarkUs
under Test1.

1: /10
2: /10
3: /10
4: /5
----
Total: /35






1. [10 marks] Transformation and Animation
Consider the trajectory of a spherical spaceship with smiley astronaut Ziggy shown below. The cross marking the
center of mass of the spaceship, ⃑ , is shown as function of time t. Ziggy is shown at a distance of 0.8 and rotating
around the center of mass at angle T=900, 00 , -900 at time t= 0, 0.5 and 1 respectively.






a. [2 marks] Assume that the velocity immediately before impact is ⃑ = [

] and the velocity
immediately after is ⃑ = [

]. Given these constraints what is the minimum number of
polynomials you need to animate the spaceship’s trajectory x, and why? What is the degree of the
polynomials?








b. [2 marks] Write the linear system required to fit a polynomial to the spaceship’s pre-impact
trajectory. You do not need to solve the system, but you must write the solution for x as the
inverse/multiplication/sum of appropriate matrices.








c. [2 marks] Write the linear system required to fit a polynomial to the spaceship’s pre-impact
trajectory if the spaceship is at rest at t=0. You do not need to solve the system, but you must
write the solution for x as the inverse/multiplication/sum of appropriate matrices.







d. [2 marks] What is the polynomial that can describe the rotation angle T of Ziggy for the entire
trajectory, assuming (like in part c) that the spaceship is at rest at t=0.






e. [2 marks] Show how to compute the 3x3 matrix T(x, T), parameterized by x and T, that transforms
Ziggy into world space.








2. [10 marks] Meshes

a. [2 marks] One way to find local concavities in 3D meshes is to measure the angle between adjacent faces of
the mesh. Imagine adjacent mesh faces as the front and back cover of a book. The angle is 00 when the
book is closed, increasing to 1800, when the book is open flat, increasing to 3600, as the book is turned
inside-out to where the front and back cover face each other. Angles between 1800-3600 capture local
concavities on the mesh. Provide a formulation for this angle in terms of the oriented normal vectors n1 and
n2, and shared edge vector e, for two adjacent mesh faces.














b. [3 marks] Protruding parts of an object, like the handle, spout, or lid of the teapot below, are often
characterized by a boundary of edges that define a mesh concavity. Design an efficient algorithm that
partitions the faces of a given mesh M into a set of parts separated by concave boundaries [Your algorithm
may assume having access to a solution to part a]. What is the time complexity of the algorithm in terms of
the number of faces of the mesh?















c. [2 marks] Starting out with a mesh of V0 vertices, E0 edges and F0 faces, what is the vertex, edge and face
counts V, E, F of its Catmull-Clark subdivision surface after the first iteration in terms of V0, E0 and F0.
What is the face count Fk in term of F after a further k iterations.





on
Leta bethe angle
a cog1
n
Int Int
After thefirst iteration there will be
f Vot Eo tFo
E 4Eo Fk 4F
F No
d. [3 marks] You are given two open curves P, Q represented as 3D poly-lines P =p1..pn and Q= q1..qm.
A mesh surface S between P and Q can be created as a sequence of triangles S=T1..T(m+n-2). For example,
one such triangulation is Ti= , where 1≤i≤m-1, followed by T(m-1+j)=, where
1≤j≤n-1. A better choice of triangle sequence, could be one that minimizes the sum of edge lengths in S
between points in P and Q. i.e. find S that minimizes ∑ ||pi-qj||, where edge belongs to a triangle in
S. Develop an efficient algorithm to create S, and mention its time complexity.
















3. [10 marks] Short Answer

a. [2 marks] Are the centroid (average of the three points) and ortho-center (intersection point of the altitudes)
of a triangle preserved under an Affine projection? If so prove it, else provide a counterexample.




b. [3 marks] Let p and q, be two endpoints of a 3D line segment, defined in viewer or camera coordinates. Let
m = 0.5*(p+q) be the midpoint of the line segment. Defining perspective projection with the optical axis
along the z-axis, let p', q' and m' be the perspective projections of p, q and m respectively. Determine
whether m' = 0.5 * (p' + q') in general. If it is not true for all p and q, characterize the conditions under
which it would be true.















Curr P
connect Pi to91 andPntoGm
while Carr fPu and CarrE9h
If carr in P
Find i in 9 such that i is connectedbut I m is not
Find closest point from carr to anypoints in 9 9in
connect them
else
Vise versa
the timecomplexity wors case n'cm2 BC 1
Yesthey arepreservedunderAffineprojection
since affinepreserve collinearity and parallelism
it preserseves the ratio ofthe lengths ofthe lines
hencethecentroid is preserved hence the altitude is alsopreserved
It is not true if the Z values ofpcud g are thesame
c. [2 marks] Suppose the rest length of all springs in a given mass-spring system is zero. How does this
assumption impact the local-global mass-spring solver studied in the course and assignment 8.










d. [3 marks] The surface of a torus is parametrized as:
p(u,v)=[(100+20cos(Sv))cos(Su), 20sin(Sv), (100+20cos(Sv))sin(Su)], with u,v in [0,1]. A bump
wave is defined as a function b(u,v)= sin(Su). Write the orthonomal basis of vectors formed by Gp/Gu,
Gp/Gv and the normal vector n. The perturbed normal vector for the bump map is n’ = n - Gb/Gu(Gp/Gu) -
Gb/Gv(Gp/Gv). What is the perturbed normal n’(u,v).






















4. [5 marks] Kinematics A two bone skeleton in 2D is defined by lengths l1, l2, (l1 > l2) and joint
angles ϴ1, ϴ2.











a. [2 marks] Write the position of the end-effector p as a product of 3x3 matrices.














b. [3 marks] Provide an analytic solution to the inverse kinematic problem, i.e. provide a
solution to ϴ1, ϴ2, for a given p, including a characterization of the existence and
number of solutions.


l1
l2
ϴ1
ϴ2
p
LixCOSO Lysin6 O by O O
Exosinoiuycoosis h
Oo

欢迎咨询51作业君
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468