%Pyramide créee sur un demi-cercle.
input geometriesyr16;
figure(-10u,-10u,10u,10u);
pair A,B,O,X,M,H,S,N,L,K;
A=u*(1,1);
B=u*(7,1);
O=1/2[A,B];
X=(0,0);
path cc,cd,ce,cf;
cd=cercles(X,3cm);
cc=cd yscaled 0.4;
ce=(subpath(0,0.5*length cc) of cc) shifted O;
label.llft(btex $A$ etex,A);
label.lrt(btex $B$ etex,B);
M=point(0.3*length ce) of ce;
label.urt(btex $M$ etex,M);
draw B--M--A dashed evenly;
draw A--B;
H=projection(M,A,B) shifted (1/10*(A-B));
draw codeperp(M,H,A,5);
draw M--H dashed evenly;
S-M=u*(0,4);
draw A--S--B;
draw S--M dashed evenly;
draw codeperp(S,M,A,5);
label.top(btex $S$ etex,S);
label.bot(btex $H$ etex,H);
N=(S--A) intersectionpoint ce;
L=X shifted (xpart(N-O),0);
K=cd intersectionpoint perpendiculaire(A,B,L);
cf=((subpath(0,(angle(K-X)*(length cd))/360) of cd) yscaled 0.4) shifted O;
draw cf dashed evenly;
draw ((subpath((angle(K-X)*(length cd))/360,(length cd)/2) of cd) yscaled 0.4) shifted O;
fin;
end