restart; with(plots):
A := implicitplot3d(x^2*(1-2*z)+y^2*(1-z)-(1-2*z)*(1-z) = 0, x = -1 .. 1, y = -1 .. 1, z = 0 .. 1, axes = boxed, numpoints = 9000, view = [-1 .. 1, -1 .. 1, 0 .. 1]):
F := proc(t)
global pl,eks;
pl := implicitplot3d(z = t, x = -1 .. 1, y = -1 .. 1, z = 0 .. 1, color = blue);
eks := evalf(sqrt(t/(1-t)));
if t<0.5 then
pr1 := spacecurve([sqrt(1-t)*cos(s), sqrt(1-2*t)*sin(s), t+0.005], s = 0 .. 2*Pi, color = red, thickness = 5);
display(pr1, pl, caption = typeset(cat("z= ", sprintf("%2.3f", t)), cat(", e= ", sprintf("%2.3f", eks))),captionfont=[HELVETICA, NORMAL, 20]);
else
pr1 := spacecurve([sqrt(1-t)*cosh(s)+0.01, sqrt(2*t-1)*sinh(s), t], s = -2 .. 2, color = red, thickness = 5);
pr2 := spacecurve([-sqrt(1-t)*cosh(s)+0.05, sqrt(2*t-1)*sinh(s), t], s = -2 .. 2, color = red, thickness = 5);
display(pr1, pr2, pl, caption = typeset(cat("z= ", sprintf("%2.3f", t)), cat(", e= ", sprintf("%2.3f", eks))), captionfont=[HELVETICA, NORMAL, 20]);
end if;
end proc:
animate(F, [theta], theta = 0..0.999, background = A, axes = boxed, frames = 50, title = typeset(x^2*(1-2*z)+y^2*(1-z)-(1-2*z)*(1-z) = 0), titlefont = [HELVETICA, BOLD, 12]);