Update tetrahedron method implementing in C