Can you comment the following code? What are the vertices used for? Can you explain the interpolation algorithm or give a refernce?