Code : Tout sélectionner
import solids ;
import math ;
size(8cm,0) ;
currentprojection=obliqueX;
real h=1,angle=90;
transform3 tT=shift((0,0,2*h));
transform3 tR=rotate(angle,Z);
triple A=(h,-h,-h) ,
B=tR*A,
C=tR*B,
D=tR*C;
dot(Label("$A$",align=S),A);
dot(Label("$B$",align=S),B);
dot(Label("$C$",align=E),C);
dot(Label("$D$",align=W),D);
triple E=tT*A,
F=tR*E,
G=tR*F,
H=tR*G;
triple R=(2*G+F)/3 ;
triple P=(2*E+F)/3 ;
triple Q= (B+F)/2 ;
// Intersection de la droite (PA) avec le plan normal à (FBC)
// passant par F
triple s=interp(P,A,intersect(P,A,normal(new triple[]{F,B,C}),F)) ;
// Intersection du plan (PRQ) avec le plan (ABC)
triple U = interp(P,Q,intersect(P,Q,normal(new triple[]{A,B,C}),A)) ;
triple V = interp(R,Q,intersect(R,Q,normal(new triple[]{A,B,C}),A)) ;
// les arêtes
// C'est ici le problème
draw(surface(P--R--C--A--cycle),grey+opacity(0.5));
//
draw(A--B--F--E--cycle) ;
draw(E--F--G--H--cycle) ;
draw(B--F--G--C--cycle) ;
draw(A--D--H,dashed);
draw(D--C,dashed);
draw(A--s--F) ;
draw(C--s) ;
draw(P--U) ;
draw(R--V) ;
draw(U--V) ;
// Les labels
dot(Label("$R$",align=SE),R);
dot(Label("$P$",align=N),P);
dot(Label("$E$",align=W),E);
dot(Label("$F$",align=NW),F);
dot(Label("$G$",align=N),G);
dot(Label("$H$",align=N),H);
dot(Label("$S$",align=N),s);
dot(Label("$Q$",align=SE),Q);
dot(Label("$U$",align=S),U);
dot(Label("$V$",align=S),V);