我使用 Asymptote 制作图形。我有一条定义为表面轮廓的曲线。我想用颜色填充曲线内的区域。问题是轮廓在 Asymptote 中返回引导结构,而 buildcycle 命令不接受它。有人能告诉我如何解决这个问题吗?谢谢。这是我使用的代码,它生成了曲线:
import graph3;
import contour;
size(6cm,0);
real f(real x, real y) { return (1+x+x^2/2-y^2/2)^2 + (y+y*x)^2-1; }
guide[][] thegraphs = contour(f, a=(-2,-2), b=(2,2), new real[] {0});
/* The next line draws the first (and
only) entry in thegraphs. This entry
is itself an array, since it
represents a disconnected path. */
draw(thegraphs,linewidth(2.0));
xaxis("$x$",BottomTop,LeftTicks,above=true);
yaxis("$y$",LeftRight,RightTicks,above=true);