Learning a little about T-SQL, and thought an interesting exercise would be to generate a Mandelbrot set with it.
Turns out someone already has (and recently, it appears). I'll let someone else post it as an answer, but I'm curious what optimizations can be made.
Alternately, what would you do to make the code more readable?
I'll select the most readable (yet reasonably compact) version as the accepted answer (too bad we don't have rep bounties yet!) unless someone really comes along with a great optimization.
Bonus points to those answers that teach me a little something about T-SQL.