I am failing to display a paraboloid with tikz \addplot3 command. I read a thourough manual that I found online as well as tried to adapt this example, but I don't really understand how to translate my function into polar coordinates, as it seems.
The level curves of my paraboloid, with the function equation:
My code for the 3d-plot:
\begin{tikzpicture}
\begin{axis}[
title={Sammansatta nivåkuror, botten på $(0,0,1)$},
axis lines=center,
axis on top,
colormap/cool,
xlabel={$x$}, ylabel={$y$}, zlabel={$z$},
]
\addplot3[
surf,
samples=50,
domain=0:360,
y domain=0:3,
restrict z to domain=0:10,
data cs=polar
] (x, y, {sqrt(x^2+2*y^2)+1});
\end{axis}
\end{tikzpicture}
What it outputs:
What the 3d-plot should look like (but the function is off):
I obtained the latter by modifying the following:
\addplot3[
...
] (x, y, y^2)
Also, the last 3d-plot displays up to different values of z depending on my screenwidth, which I do not really understand. I am using Overleaf.



