For the coding portion of this assignment, you will implement the *heat method*, which is an algorithm for computing geodesic distance on curved surfaces. All of the details you need for implementation are described in Section 3 of the paper, up through and including Section 3.2. Note that you need only be concerned with the case of **triangle meshes** (not polygon meshes or point clouds); pay close attention to the paragraph labeled “Choice of Timestep.”

Please implement the following routines in:

`projects/geodesic-distances/heat-method.js`:`constructor``computeVectorField``computeDivergence``compute`

**Notes**

- Refer to sections 3.2 of the paper for discretizations of Algorithm 1 (page 3).
- Recall that our Laplace matrix is
*positive*semidefinite, which might differ from the sign convention the authors use. - The tests for
`computeVectorField`and`computeDivergence`depend on the`A`and`F`matrices you define in your constructor. So if you fail the tests but your functions look correct, check whether you have defined the flow and laplace matrices properly. - Your solution should implement zero neumann boundary conditions (which are the “default behavior” of the cotan Laplacian) but feel free to tryout other Dirichlet and Neumann boundary conditions on your own.

**Submission Instructions**

Please rename your `heat-method.js` file to `heat-method.txt` and put it in a **single zip file** called solution.zip. This file **and** your solution to the written exercises should be submitted together in a **single email** to Geometry.Collective@gmail.com with the subject line **DDG19A4**.