我的函数$4x^2+4y^2-z^2=1$我想要像这张照片一样我使用geogebra!Geogebra 3D]1
import graph3; currentprojection=orthographic(1,1,1);
size(10cm);
real sign(real x){if (x<0) {return -1;} else {return 1;}} triple f(pair t){return (sinh(t.y)*cos(t.x)/2,sinh(t.y)*sin(t.x)/2,sign(t.y)* cosh(t.y));}
surface s=surface(f,(0,-2) ,(2*pi,2),Spline);
draw(s,cyan+opacity(0.9),blue+0.6bp,render(merge=true));
xaxis3(Label("$x$"),Arrow3);
yaxis3(Label("$y$"),Arrow3);
zaxis3(Label("$z$"),Arrow3);
答案1
我的评论中出现了一个符号错误,所以造成了cosh
混淆sinh
,抱歉!
\documentclass[varwidth,border=3mm]{standalone}
\usepackage{asymptote}
\begin{document}
\begin{asy}
import graph3;
currentprojection=orthographic(5,4,4);
size3(100);
triple f(pair t){return (cosh(t.y)*cos(t.x)/2,cosh(t.y)*sin(t.x)/2, sinh(t.y));}
surface s=surface(f,(0,-2) ,(2*pi,2),nu=40,nv=40,Spline);
draw(s,green+opacity(0.9),render(merge=true));
xaxis3(Label("$x$"),p=blue ,Arrow3);
yaxis3(Label("$y$"),p=blue ,Arrow3);
zaxis3(Label("$z$"),p=blue ,Arrow3);
\end{asy}
\end{document}