I am trying to illustrate limits in R^2 to my students. In doing so I created the following figure in Geogebra
Where the idea is that when you approach origo along the black and purple lines you reach 0. However riding along the ridge we instead reach some height above 0. As such the red domain is not continuous.
I tried to recreate the figure above using pgfplots however the result where somewhat appalling.
I do not think that it matters but the red figure is the function
f(x,y) = x y^3 /( 3y^2 + x^6)
restricted to the unit circle. Some of the problems is that it looks like the white line in the pgfplots image goes above the ridge and breaks the illusion. Any better way of illustrating the function above than my attempt?
\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{width=7cm,compat=1.8}
\begin{document}
\begin{tikzpicture}
\begin{axis}[view = {-35}{35}]
\addplot3[
surf,
colormap/cool,
samples=50,
domain=0:1,
y domain=0:2*pi,
z buffer=sort
]
( {x*cos(deg(y))},
{x*sin(deg(y))},
{x*sin(deg(y))*(x*cos(deg(y)))^3/(3*(x*sin(deg(y)))^2 + (x*cos(deg(y)))^6}
);
\addplot3[variable=u,color=green,mesh,domain=-1:1] (u,u^3, 1/4);
\addplot3[variable=u,color=black,domain=-1:1] (u,0, 0);
\addplot3[variable=u,color=pink,domain=-1:1] (0,u, 0);
\end{axis}
\end{tikzpicture}
\end{document}