TransWikia.com

Hyperboloid plot using Asymptote

TeX - LaTeX Asked on June 8, 2021

My function $4x^2+4y^2-z^2=1$
I want like this photo that I use 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);

enter image description here

One Answer

I made a sign error in my comments, so got cosh and sinh mixed up, sorry!

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}

enter image description here

Correct answer by user230864 on June 8, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP