Table rotation program written in C# and csgl