答案1
使用以下方式编译渐近线或者http://asymptote.ualberta.ca/
import contour;
import graph;
size(300);
typedef real newreal(real,real);
newreal f(real a){
return new real(real x, real y){
return y^2-x^2-a;
};
}
/*
real F0(real x, real y){return y^2-x^2;}
real F1(real x, real y){return y^2-x^2-1;}
real F1_(real x, real y){return y^2-x^2+1;}
real F2(real x, real y){return y^2-x^2-2;}
real F2_(real x, real y){return y^2-x^2+2;}
*/
xaxis(xmin=-7,xmax=7,RightTicks(Step=2),Arrow);
yaxis(ymin=-7,ymax=7,LeftTicks(Step=2,modify=NoZero),Arrow);
real[] c=new real[]{0};
draw(contour(f(0),(-6,-6),(6,6),c),red+1bp);
draw(contour(f(1),(-6,-6),(6,6),c,111),green+1bp);
draw(contour(f(-1),(-6,-6),(6,6),c,123),blue+1bp);
draw(contour(f(2),(-6,-6),(6,6),c,134),orange+1bp);
draw(contour(f(-2),(-6,-6),(6,6),c,145),magenta+1bp);