重现椭圆双曲面

重现椭圆双曲面

我想要重现椭圆双曲面,如下所示 在此处输入图片描述

如何旋转双曲线以便可以绘制未绘制的双曲线。我的图快完成了。请帮帮我。

\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);

    \addplot [domain=-\dom:\dom] ({\a*cosh(\x)},{\b*sinh(\x)});
    \addplot [domain=-\dom:\dom] ({-\a*cosh(\x)},{\b*sinh(\x)});

\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}

编辑

在此处输入图片描述

答案1

首先:1 表面双曲面的 Asymptote 代码(另见这里这里)可以嵌入到 LaTeX 文档中,参见此链接

在此处输入图片描述

// 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));

相关内容