Si cela peut rendre service...
Voici des figures que je donne aux élèves pour mieux voir les éléments de volume en coordonnées sphériques
- Code: Tout sélectionner
[ view(-5,5,-2,5),
size(20,1),
Arrows:=1, LabelSize:=LARGE,
Axes3D(0,0,0,0,0,0),
A:=Msph(3*sqrt(2),1.2*pi/4,pi/4), A1:=Msph(3.5*sqrt(2),1.2*pi/4,pi/4),
A2:=Msph(3*sqrt(2),1.2*pi/3.4,pi/4), A3:=Msph(3.5*sqrt(2),1.2*pi/3.4,pi/4),
A4:=Msph(3*sqrt(2),1.2*pi/4,pi/3.5), A6:=Msph(3.5*sqrt(2),1.2*pi/4,pi/3.5),
A5:=Msph(3*sqrt(2),1.2*pi/3.4,pi/3.5), A8:=Msph(3.5*sqrt(2),1.2*pi/3.4,pi/3.5),
Ap:=Msph(3*sqrt(2),1.2*pi/4,pi/3.7),
Width:=15,
Ligne3D([Origin,A,jump,Origin,A4],0),
Color:=red, Arc3D(pxy(Ap),Origin, pxy(A5),2,1),
Arrows:=0,
Ligne3D([A,A1,jump,A6,A4],0),
Arc3D(A,Origin,A4,3*sqrt(2),1), Arc3D(A1,Origin,A6,3.5*sqrt(2),1),
Arc3D(A3,Origin,A8,3.5*sqrt(2),1),
Arc3D(A1,Origin,A3,3.5*sqrt(2),1),
Arc3D(A6,Origin,A8,3.5*sqrt(2),1),
Ligne3D([A5,A8],0),
Arc3D(A4,Origin,A5,3*sqrt(2),1),
LineStyle:=dashed, Width:=8,
Arc3D(A2,Origin,A5,3*sqrt(2),1),
Ligne3D([A2,A3],0),
Arc3D(A,Origin,A2,3*sqrt(2),1),
Ligne3D([pxy(Ap),pxy(A6),jump,pxy(A5),pxy(A8)],0),
Arc3D(pxy(Ap),Origin,pxy(A5),3*sqrt(2)*sin(pi/3.7),1),
Arc3D(pxy(A6),Origin,pxy(A8),3.5*sqrt(2)*sin(pi/3.5),1),
Arrows:=1, LineStyle:=solid, Width:=12,
Arc3D(A,Origin,A4,2*sqrt(2),1),
Label(1+1.6*i,"$d\theta$"), Label(1.13-0.65*i,"$d\varphi$"),
Label(1.2+2.6*i, "$dr$"),
Color:=black, Arrows:=0, LineStyle:=dashed, Width:=8,
Ligne3D([A,Ap,pxy(Ap),Origin],0),
Ligne3D([A5,pxy(A5),Origin,jump,A8,pxy(A8)],0),
Ligne3D([A6,pxy(A6)],0),
Ligne3D([A,pz(A)],0),Cercle3D(pz(A),3*sqrt(2)*sin(1.0*pi/4),vecK),
Cercle3D(pz(A4),3*sqrt(2)*sin(1.0*pi/3.5),vecK),
Label(-0.2+3*i, "$z$"), { Label(3.64-0.76*i, "$y$"),}
Arrows:=1, LineStyle:=solid, Width:=8,
Arc3D(vecK,Origin, A,2*sqrt(2),1), Arc3D(vecI,Origin, pxy(A),2,1),
Arrows:=0,Color:=blue,Width:=12, Dsphere(Origin,3*sqrt(2),0) ,
Label(0.3+1.9*i,"$\theta$"), Label(0.3-0.8*i,"$\varphi$"),
Label(0.9+1.95*i, "$r$"),
LabelDot3D(A,"$M$","O")
]
en en coordonnées cylindriques
- Code: Tout sélectionner
[ view(-4.5,5,-2,7), size(20,1),
Arrows:=1, LabelSize:=Large, Axes3D(0,0,0,0,0,0),
A:=Mcyl(3*sqrt(2),pi/4,4), A1:=Mcyl(3.5*sqrt(2),pi/4,4),
A2:=Mcyl(3*sqrt(2),pi/3.4,4), A3:=Mcyl(3.5*sqrt(2),pi/3.4,4),
A4:=Mcyl(3*sqrt(2),pi/4,4.5), A6:=Mcyl(3.5*sqrt(2),pi/4,4.5),
A5:=Mcyl(3*sqrt(2),pi/3.4,4.5), A8:=Mcyl(3.5*sqrt(2),pi/3.4,4.5),
Width:=15, Color:=red,Arrows:=0,
Ligne3D([A4,A,A1,A6,A4,jump,A3,A8,A5],0),
Arc3D(A4,pz(A4),A5,3*sqrt(2),1), Arc3D(A1,pz(A),A3,3.5*sqrt(2),1),
Arc3D(A6,pz(A4),A8,3.5*sqrt(2),1),
LineStyle:=dashed, Width:=8,
Ligne3D([A5,A2,A3],0),Arc3D(A,pz(A),A2,3*sqrt(2),1),
Arc3D(pxy(A),Origin,pxy(A2),3*sqrt(2),1),
Arc3D(pxy(A1),Origin,pxy(A3),3.5*sqrt(2),1),
Ligne3D([pxy(A),pxy(A1),jump,pxy(A2),pxy(A3)],0),
Arrows:=1, LineStyle:=solid, Width:=12,
Arc3D(pxy(A),Origin,pxy(A2),3,1),
Label(1.6-1*i,"$d\theta$"), Label(-0.25+4*i, "$dz$"),
Label(1.8-1.5*i, "$d\rho$"),
LabelSize:=Large, Color:=black, Arrows:=0, LineStyle:=dashed, Width:=8,
Cercle3D(pz(A),3*sqrt(2),vecK), Cercle3D(pz(A5),3*sqrt(2),vecK),
Ligne3D([pz(A4),A4,jump,Origin,pxy(A),A,pz(A)],0),
Ligne3D([pz(A5),A5,jump,pz(A2),A2,jump,Origin,pxy(A2)],0),
Ligne3D([A1,pxy(A1)],0), Ligne3D([A3,pxy(A3),jump,pxy(A2),A2],0),
LabelDot3D(A, "$M$","SO"),
Arrows:=1, LineStyle:=solid, Width:=8,
Arc3D(vecI,Origin, pxy(A),3,1),
Arrows:=0, Width:=12,
Color:=blue, Label(0.3-1.2*i,"$\theta$"),
Label(-0.4+3.4*i, "$z$"), Label(1.2-0.5*i, "$\rho$"),
Label(4.4+2.4*i, "$H$"),
Dcylindre(Origin,5*vecK,3*sqrt(2),2)
]
Le snapshot donne des images bizarres (cela m'est déjà arrivé) mais le code marche bien, même s'il est un peu compliqué et qu'il y aurait sûrement moyen de le simplifier en déclarant des macros par exemple (mais ce n'est pas mon fort, désolée... )
D'ailleurs, ces codes font appel à 2 macros que Patrick m'avait gentiment données et rappelées ci-dessous
- Code: Tout sélectionner
{Mcyl(rho, theta, z)}
[%1*exp(i*%2), %3]
- Code: Tout sélectionner
{Msph(rho, phi,theta )}
%1*[exp(i*%2)*sin(%3), cos(%3)]