I would like to show the graph of $f(x,y)=4-x^{2}-y^{2}$ for $x^{2}+y^{2}\leq1,y\geq0$.

I want to draw it using spherical coordinates in Tikz. However I've not found any simple answer for this. Could someone help me?


Something like that?

\begin{tikzpicture}[declare function={f(\x,\y)=4-\x^2-\y^2;}]
  \addplot3[surf,shader=interp,domain=0:1,domain y=0:180]

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.