clc; clear all; close all;
%%%%%%%%%%%
单叶双曲面%%%%%%%%%%%
xa=-2:0.2:2;
ya=xa;
[x,y]=meshgrid(xa,ya);
a=1;b=1;c=1;% 假设a=1;b=1;c=1
z1=sqrt(c.^2*(x.^2/(a.^2)+y.^2/(b.^2)-1));
z2=-sqrt(c.^2*(x.^2/(a.^2)+y.^2/(b.^2)-1));
surf(x,y,real(z1))
hold on;
surf(x,y,real(z2))
shading interp
box on;
grid off
colormap hsv