Est-ce moi ou je trouve qu'il faut bricoler beaucoup pour faire cette simple figure ? Ne vaut-il pas mieux la faire avec geogebra3D et faire un export de la figure mais en png ?
Merci.
Fabrice
Code : Tout sélectionner
settings.outformat="pdf";
settings.render=16;
import three;
import math;
usepackage("esvect");
void drawrightangle(picture pic=currentpicture,
triple M, triple A, triple B,
real radius=0,
pen p=currentpen,
pen fillpen=nullpen,
projection P=currentprojection)
{
p=linejoin(0)+linecap(0)+p;
if (radius==0) radius=arrowfactor*sqrt(2);
transform3 T=shift(-M);
triple OA=radius/sqrt(2)*unit(T*A),
OB=radius/sqrt(2)*unit(T*B),
OC=OA+OB;
path3 _p=OA--OC--OB;
picture pic_;
draw(pic_, _p, p=p);
if (fillpen!=nullpen) draw(pic_, surface(O--_p--cycle), fillpen);
add(pic,pic_,M);}
size(6cm);
defaultpen(fontsize(9pt));
pen style1 = linetype("4 4");
currentlight=(0,2,1);
currentprojection=
perspective(camera=(23.8564664377769,10.993836313037,6.01853139646905),
up=(-0.0126108240712451,-0.00439587750803313,0.0547485107431846),
target=(3.77148039686514,4.69327250594692,0.886250566385561),
zoom=0.822702474791882,
angle=28.160328258418,
autoadjust=false);
pen p = rgb(255,200,0);
triple u=(8,0,0),v=(0,10,0);
path3 pl1=plane(u,v,O);
triple pA=(3,3,5);
triple pC=(3,3,-5);
triple A=(4,9,0);
triple B=(6,5,0);
transform3 proj=planeproject(pl1);
transform3 t=shift(A-B);
triple pB=proj*pA;
triple pD=proj*pC;
triple C=t*pB;
triple M=interp(C,pB,1.7);
draw (pB--C);
draw (pB--M);
draw(surface(pl1),lightgray+opacity(.4),gray);
drawrightangle(pB,pA,C,3mm,fillpen=darkred+opacity(0.5));
draw(pA--pB);
draw(pC--pD,style1);
draw(A--B);
label("$(d)$",(3,3,4),E);