# Practical Homework 01

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.

1. Curves ( 10pts. ) 1. Parametrize the trefoil knot.
2. 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.
3. Compute the turning number of this 3D curve. What happens when you flatten the curve into a 2D plane?
4. Read and understand how the frame was oriented inside Houdini using quaternions.
2. 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}$$ My beautiful illustration of the angles around a point $i$.

1. Compute the area of each triangle and color the triangles according to their area.
2. Compute the angle defect (discrete Gaussian curvature) and color the points according to its value.
3. 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.