# reproduce the elliptic hyperboloid

I want to reproduce the elliptic hyperboloid as shown below

How to rotate the hyperbola so that the non-drawn hyperbolas could be plotted. My Fig is almost done. Please help me.

\documentclass[border=9,tikz]{standalone}

\usepackage[fleqn]{amsmath}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.13}

\definecolor{whitesmokedark}{RGB}{235,235,235}
\definecolor{gainsboro}{RGB}{220,220,220}

\begin{document}

\begin{tikzpicture}
\def\xm{5}
\def\ym{10}
\def\df{3}
\def\dom{2}

%\def\ecc{1.44022}
\def\ecc{2.3}
\def\a{1}
\def\b{(\a*sqrt((\ecc)^2-1)}

\begin{axis}[scale=.8,
hide axis,
xmin=-\xm,xmax=\xm,
ymin=-\ym,ymax=\ym]

\draw[fill=gray,fill opacity=0.2] (0,0) ellipse (.55cm and .2cm);
\draw[fill=gray,fill opacity=0.2] (0,7.6) ellipse (2.08cm and .3cm);
\draw[fill=gray,fill opacity=0.2] (0,-7.6) ellipse (2.08cm and .3cm);

\end{axis}

\def\xax{2.7}
\draw[dotted] (\xax,\xax - 0.4) -- (\xax,\xax + 1);
\draw[solid, ->] (\xax,\xax + 1) -- (\xax,\xax + 1.9);
\draw[solid, ->] (\xax,\xax - 0.4) -- (1.5,2);
\draw[solid, ->] (\xax,\xax - 0.4) -- (4.5,2);

\node (x) at ( \xax,\xax + 1.8) [label=above:$z$] {};
\node (y) at (1.6,2) [label=left:$x$] {};
\node (z) at (4.5,2) [label=right:$y$] {};

\end{tikzpicture}

\end{document}


Edit

• Can you please add a screenshot of your current codes result? Thank you Commented Oct 20, 2023 at 13:36
• Please check ... Commented Oct 20, 2023 at 15:00

For a start: an Asymptote code for the 1-surface hyperboloid (also see here and here). It can be imbbed into LaTeX document, see this overleaf link.

// http://asymptote.ualberta.ca/
import graph3;
size(200,0);
currentprojection=orthographic(3,2,1,zoom=.9);
/////////////////////////////////////
// PART 1: the 1-surface hyperboloid
// x^2/a^2 + y^2/b^2 - z^2/c^2 = 1
real a=1.5, b=1, c=1.2;
triple f(real u,real v) {
real x=a*cosh(v)*cos(u);
real y=b*cosh(v)*sin(u);
real z=c*sinh(v);
return (x,y,z);}
// more flexibe usage: f(u,v) for f((u,v))
triple f(pair P) {return f(P.x,P.y);}

// when v = constant
typedef triple fvertical(real);
fvertical fv(real u) {
return new triple(real v) {
return f(u,v);
};}
// when u = constant
typedef triple fhorizontal(real);
fhorizontal fh(real v) {
return new triple(real u) {
return f(u,v);
};}

surface f2hyp=surface(f,(0,0),(2pi,2),12,8,Spline);
pen spen=yellow+opacity(.5);
draw(f2hyp,spen,meshpen=gray+.05pt);
transform3 t=zscale3(-1);
draw(t*f2hyp,spen,meshpen=gray+.05pt);

dot(O,red);
xaxis3("$x$",Arrow3);
yaxis3("$y$",Arrow3);
zaxis3("$z$",zmin=-4,zmax=7,Arrow3);

path3 gfv=graph(fv(u=1),-2,2,Spline);
draw(gfv^^t*gfv,red+1.5pt);

path3 gfh=graph(fh(v=1.6),0,2pi,Spline);
path3 gfh=gfh..cycle;   // important! need to be cyclic
draw(gfh^^t*gfh,blue+1.5pt);
surface s1=surface(gfh);
draw(s1,blue+opacity(.3));