C# source code for generating contours from TIN