% TeXgraph version 1.95-beta-1 % Fenetre Xmin Xmax Ymin Ymax Xscale Yscale 100#-9.7435855#9.7435855#-9.7435855#9.7435855#0.5131581182307#0.5131581182307## % Marges gauche droite haut bas cadre gestion_couleur comptgraph 101#0#0#0#0#0#1#1## % Affectation des Variables theta et phi et type de perspective 18##[theta:=0.6981, phi:=1.0472,OriginalCoord(1),IdMatrix(),IdMatrix3D(), ModelView(ortho)]## % Déclaration des Macros 16#makeF_hole#{ makeF_hole(r) } [$nb:=2, $r:=%1/2, $q:= exp(i*pi/nb/2), $last:=r, F:= [ $z:=last*q, last,0, 0.5,0, (1+i)/2,0, r*(1+i),0, z,0, jump, last:=z, for $k from 1 to nb-2 do z:=last*q, last,0, r*(1+i),0, z,0,jump, last:=z od, r*(1+i),0, (1+i)/2,0, i/2,0, r*i,0, last,0, jump ], F,rot3d(F,[Origin,vecK],pi/2), rot3d(F,[Origin,vecK],pi), rot3d(F,[Origin,vecK],3*pi/2) ]## 16#F_hole#{F_hole( point, U, V, scale_radius)} [ $A:=%1, $U:=%2, $V:=%3, $W:=normalize(Prodvec(U,V)), $scale_radius:=if %4=Nil then 0.5 else %4 fi, $F:=makeF_hole(scale_radius), mtransform3d(F, [A,U,V,W]) ]## 16#bdPlane_hole#{bdPlane_hole( [point, vecteur normal], options) } [ scale:=0.75, bordercolor:= black, border:=0, $aux:=%2, $A:=Copy(%1,1,2), $V:=normalize(Copy(%1,3,2)), $U:=proj3d(Origin, %1), $hole:= F_hole(M(0,0,0),2*vecI,2*vecJ,scale), $plan:=for $I from Ent(Xinf) to Ent(Xsup) step 2 do for $J from Ent(Yinf) to Ent(Ysup) step 2 do shift3d(hole,M(I,J,0)), od od, $x1:=Ent(Xinf)-1, $x2:=Ent(Xsup)+1, $y1:=Ent(Yinf)-1, $y2:=Ent(Ysup)+1, $bord:=[x1+i*y1,0, x2+i*y1,0, x2+i*y2,0, x1+i*y2,0, x1+i*y1,0,jump], $N:=Prodvec(vecK,V), if Norm(N)>1E-10 then $a:=angle(vecK,V), plan:=rot3d(plan, [Origin,N],a), bord:=rot3d(bord, [Origin,N],a) fi, if border then bdLine( shift3d(bord,U), [%2,color:=bordercolor]), sep3D fi, bdFacet( shift3d(plan,U), [twoside:=0,%2]), sep3D ]## 16#xlegend#"x"## 16#ylegend#"y"## 16#zlegend#"z"## 16#text3d1#"x"## 16#text3d2#"y"## 16#text3d3#"z"## % Déclaration des Eléments graphiques % objet1 (Utilisateur) 18##[tMin:=-5,tMax:=5,DotScale:=1+i]## 14#objet1#[ background(full,lightgray), view3D(-6,6,-6,6,-6,6), plan1:= [M(0,0,-2), vecK], plan2:= [M(0,0,0), vecJ], plan3:= [M(0,3,0), M(0,1,1)], Build3D( bdPlane_hole( plan1, [color:=orange, border:=1]), bdPlane_hole( plan2, [color:=steelblue, border:=1]), bdPlane_hole( plan3, [color:=darkseagreen, border:=1]), view3D(-8,8,-8,8,-8,8), bdAxes(Origin, [arrows:=1, color:=red, newxlegend("x"),newylegend("y"),newzlegend("z")]) ), Display3D() ]#-1##