本帖最后由 hbghlyj 于 2023-7-30 14:40 编辑 Asymptote使用buildcycle
size(5cm);
import patterns;
add("horizontal",hatch(1mm,E));
add("vertical",hatch(1mm,N));
draw(Label("$y$",1.2),.5S--4.5N,Arrow);
draw(Label("$x$",1.2),.5W--4.5E,E,Arrow);
draw((0,0)--(2,2));
draw(arc(2N,2,-90,90));
draw(arc(N,1,-90,90));
draw(arc(2E,2,0,180));
draw(arc(E,1,0,180));
fill(buildcycle(arc(2N,2,-90,0),(2,2)--(1,1),arc(E,1,90,0)), pattern("horizontal"));
fill(buildcycle(arc(2E,2,180,90),(2,2)--(1,1),arc(N,1,0,90)), pattern("vertical")); |