I got bored and recreated donut.c in C# (aka donut.NET)

While waiting on a release to finish, I got thinking about donut.c, then got more bored and made it in C#

Sincerest apologies to Andy Sloane, the formatting is awful and to be honest it's pretty much just his code line-for-line but in c#. I'm not sure if the worst part is my templated memset() or the nl() function (which inserts a new line in the buffer passed to Console.Write()). Hideous. It does manage to generate a passable torus rotating through two axes, however: