程序代写代做 HOMEWHORMKE3W(ORK 3HOMEWORK 3020)

HOMEWHORMKE3W(ORK 3HOMEWORK 3020)
Problem 1. (2pt) [Texture mapping] Take a picture of your choice and plot it on a brain surface using the flat map coordinates. You can use my code and brain image data available on blackboard or write your own code (1pt). Generate a NvertxNvert vertex adjacency matrix and compute degree of each vertex. Show degree as color-coded value on the surface (1pt).
Problem 2. (5pt) Compute Jacobian of the flat map for the brain surface that is shared. You can do start by giving each triangle a flat 2D coordinates along its tangent plane, with one vertex V1 as origin (0, 0) and second vertex along local x-axis (0,×2). Then you can take cross product of two edge vectors from V1 to get direction vector for local z-axis. Then take cross product of local z and x axis direction vectors. Remember to normalize all the three direction vectors. The (x3,y3) cordinates can then be obtained by taking dot product of edge vector with local x and y direction vectors. (1pt)
Use the formula involving matrix inverse to get linear Jacobian matrix J. (1pt) Compute singular σ1and σ2 values of JT J. (1pt)
Show color coded flat map and the surface by det(JTJ) at appropriate color
scale. (1pt).
Show histogram of det(JT J). (1)
Problem 3. (3pt) Generate a random 10000×10000 Laplacian matrix L for 2D case (you can use the code from Matlab central). Generate a random vector b of dimension 10000×1. Solve the linear system Ax = b using a) Gradient descent b) Conjugate gradient (CG) method. Compare their execution times. You should write your own codes for CG and PCG and not simply use the code provided in MATLAB or Python.
Problem 4. (10 pt) Implement Spring harmonic Map. You can use my code on harmonic maps as reference. Please use following steps (2pt each): (1) Read cortical surface mesh that is shared on blackboard, the readdfs function in matlab and dfsio.py contains code to read it. (2) Identify a list of edges and vertices that are boundary of the surface. (3) parameterize the boundary from 0 to 2π, and map it to circle or square (check my code). (4) Form matrix LV ×E that computes LU =[ui −uj] for each edge ij. (5) Form matrix system that minimizes the spring harmonic energy, and solve it for U and V flat coordinates. (Please check Harmonic Mapping code that is shared on blackboard and feel free to use parts from that code).
1