At the moment when you try to do the sqrt on a negative number it returns NaN.
You can use polar coordinates though
You can use polar coordinates though