我正在尝试用
path3 arcT=Arc(O, Tl, Tr);
path3 surfT = (O--arcT--cycle);
draw(surfT);
draw(surface(surfT),red);
但该区域仍然空无一人 曲面通常如图所示工作,这是怎么回事?如何为圆弧和原点之间的区域着色?
可编译示例
settings.outformat = "pdf";
settings.prc = false;
//settings.render = 0;
defaultpen(fontsize(10pt));
//label("Hello world!");
settings.inlinetex=true;
deletepreamble();
defaultfilename="Kugelintegral";
if(settings.render < 0) settings.render=4;
settings.outformat="";
settings.inlineimage=true;
settings.embed=true;
settings.toolbar=false;
viewportmargin=(2,2);
import three;
usepackage("bm");
size(8cm,0);
unitsize(1cm);
import solids;
import graph3;
import grid3;
currentprojection=perspective(camera=(-5,0,2),up=Y); // perspective(5,2,3); //orthographic(10,15,3);
pen thickblack = black+0.75;
pen thickgreen = green+0.75;
//Arrow3(TeXHead2, emissive(thickblack)
real axislength = 1;
draw(L=Label("$x$", position=Relative(1.1), align=SW),
O--axislength*X, thickblack, arrow=Arrow3(TeXHead2)); //thickred
draw(L=Label("$y$", position=Relative(1.1), align=E),
O--axislength*Y,thickblack, arrow=Arrow3(TeXHead2)); //thickgreen
draw(L=Label("$z$", position=Relative(1.1), align=N),
O--axislength*Z,thickblack, arrow=Arrow3(TeXHead2)); //thickblue
real r=10; // r=radius;
real q=0.125pi; //theta
real q_H = q/2;
real f=0.125pi; //phi
real f_H = f/2;
real h = cos(q/2)*r;
//real h=9.8481; // h=altitude section
triple rM=(0,0,h);
real q_ASY = sqrt(q_H^2+f_H^2);
triple M = r*expi(0,0);
triple T = r*expi(q_H,pi/2);
triple Tl = r*expi(q_ASY,pi/4);
triple Tr = r*expi(q_ASY,3pi/4);
//limits((0,0,0),1.2*(r,r,r));
dot("$\mathbf{p}_r$",O);
dot("$M$",M);
dot("$T$",T);
dot("$Tl$",Tl);
dot("$Tr$",Tr);
//path3 arcT=Arc(O,r,180,0,ch,0,Y,50);
path3 arcT=Arc(O, Tl, Tr);
path3 surfT = (O--arcT--cycle);
draw(surfT);
draw(surface(surfT),red);
path3 g=(0,0,0)--(1,0,0)--(1,1,0)--(0,1,0)--cycle;
draw(surface(g),green);