plot Piecewise[{{d+d-d*d, d < 1}, {1 - (d-1)*(d-1), d >= 1}}] where d = sqrt(x*x+y*y)