Due **Friday, November 22**.

**Practical Implementation in Houdini**

Download the Houdini files of this Homework and go through the Exercises written inside the .hip file.

*Curves**( 10pts. )*- Parametrize the trefoil knot.
- Compute tangent vectors on edges, then on points using the average. Then compute the curvature normal and the binormal. Also, compute the angle between adjacent tangent vectors. If all is done correctly, you should see the correct frame as in the picture above.
- Compute the turning number of this 3D curve. What happens when you flatten the curve into a 2D plane?
- Read and understand how the frame was oriented inside Houdini using quaternions.

**Surfaces***( 10pts. )*One way to work with discrete gauss curvature is to work with the

*point angle defect*. Let $i$ be a point and $j\in J_i$ a triangle in the set of neighboring triangles. Let $\theta_{ij}$ be the angle of the triangle $j$ at point $i$, then the angle defect is defined as:$$ K_i :=2\pi – \sum_{j\in J_i} \theta_{ij} $$

- Compute the area of each triangle and color the triangles according to their area.
- Compute the angle defect (discrete Gaussian curvature) and color the points according to its value.
- Verify if the discrete version of the Gauss-Bonnet theorem holds.

*Hints:* functions you might need: atan2( , ), acos(), length(), normalize(), vertex( , , ), attribute promote node,

Total: 20 pts.