Code to triangulate using Triangle (library)
Draw triangles on the client.