% 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.8254, phi:=1.096,OriginalCoord(1),IdMatrix(),IdMatrix3D(), ModelView(ortho)]## % Déclaration des Macros 16#makeF_hole#{ 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#plane_hole#{plane_hole( point, vecteur normal, hole_scale) } [ $A:=%1, $V:=normalize(%2), $U:=proj3d(Origin, [A,V]), $hole:= F_hole(M(0,0,0),2*vecI,2*vecJ,%3), $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, $N:=Prodvec(vecK,V), if Norm(N)>1E-10 then $a:=angle(vecK,V), plan:=rot3d(plan, [Origin,N],a) fi, shift3d(plan,U) ]## 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), F1:=plane_hole(M(0,0,-2), vecK,0.75), F2:=plane_hole(M(0,0,0), vecJ,0.75), F3:=plane_hole(M(0,3,0), M(0,1,1) ,0.75), Build3D( bdFacet( F1, [color:=orange]), bdFacet( F2, [color:=steelblue]), bdFacet( F3, [color:=darkseagreen]), view3D(-8,8,-8,8,-8,8), bdAxes(Origin, [arrows:=1, color:=red, newxlegend("x"),newylegend("y"),newzlegend("z")]) ), Display3D() ]#-1##