r=(1,Piecewise[{{0.9604*cos(theta)+0.3978*sin(theta), 0 <= theta <= pi/4}, {0.9604*sin(theta)+0.3978*cos(theta), pi/4 <= theta <= pi/2}}])