\documentclass{article} \usepackage[a4paper,margin=2cm]{geometry} \usepackage{pst-solides3d} \def\RotVecteur{ %%%%% ### rotV3d ### %% rotation autour d'un vecteur u %% defini par (ux,uy,uz) %% d'un angle theta % ux uy uz theta rotV3d /rotV3d { 15 dict begin /theta exch def /uz exch def /uy exch def /ux exch def /z exch def /y exch def /x exch def /N2uvw ux dup mul uy dup mul add uz dup mul add def /N2uv ux dup mul uy dup mul add def /N2vw uz dup mul uy dup mul add def /N2uw uz dup mul ux dup mul add def /uxvywz ux x mul uy y mul add uz z mul add def /uxvy ux x mul uy y mul add def /uxwz ux x mul uz z mul add def /vywz uy y mul uz z mul add def /_wyvz uz y mul neg uy z mul add def /wx_uz uz x mul ux z mul sub def /_vxuy uy x mul neg ux y mul add def ux uxvywz mul x N2vw mul ux vywz mul sub theta cos mul add N2uvw sqrt _wyvz mul theta sin mul add N2uvw div uy uxvywz mul y N2uw mul uy uxwz mul sub theta cos mul add N2uvw sqrt wx_uz mul theta sin mul add N2uvw div uz uxvywz mul z N2uv mul uz uxvy mul sub theta cos mul add N2uvw sqrt _vxuy mul theta sin mul add N2uvw div end } def } \def\PSI{35 } \def\THETA{40 } \def\PHI{45 } \parindent=0pt \begin{document} \begin{center} \psset{showOrigin=false} \psset{viewpoint=100 20 20 rtp2xyz,Decran=80,fontsize=10} \begin{pspicture}(-4,-4)(4,5) \psframe(-4,-4)(4,5) \codejps{ /tablecone [0.2 0.6 4] def /couleurs {dup (1 0.5 0.2 setrgbcolor) outputcolors} def % Vx Vy Vz [r h mode] newvecteur /triedre0 4 0 0 tablecone newvecteur % Ox % drawsolid** 0 4 0 tablecone newvecteur solidfuz % drawsolid** 0 0 4 tablecone newvecteur solidfuz def triedre0 couleurs drawsolid** } \defFunction[algebraic]{CercleEquatorial}(t){4*cos(t)}{4*sin(t)}{0} \psSolid[object=courbe,r=0.001, linecolor=blue, range=0 6.28, function=CercleEquatorial]% \defFunction[algebraic]{CercleMeridien}(t){4*sin(t)}{4*cos(t)}{} \psSolid[object=plan, definition=normalpoint, args={0 0 0 [\PSI cos \PSI sin 0]}, name=monplan,action=none] \psset{plan=monplan} \psProjection[object=courbeR2, range=0 6.28, linecolor=red, function=CercleMeridien] \axesIIID(4,4,4)(5,5,5) \end{pspicture} \hfill \begin{pspicture}(-4,-4)(4,5) \psframe(-4,-4)(4,5) \defFunction[algebraic]{Cercle}(t){4*cos(t)}{4*sin(t)}{0} \psSolid[object=courbe,r=0.001, linecolor=blue, range=0 6.28, function=Cercle]% \codejps{ /tablecone [0.2 0.6 4] def /couleurs {dup (1 0.5 0.2 setrgbcolor) outputcolors} def % Vx Vy Vz [r h mode] newvecteur /triedre0 4 0 0 tablecone newvecteur % Ox % drawsolid** 0 4 0 tablecone newvecteur solidfuz % drawsolid** 0 0 4 tablecone newvecteur solidfuz def triedre0 couleurs drawsolid** /triedre1 triedre0 {0 0 \PSI rotateOpoint3d} solidtransform def triedre1 dup (0 0.5 0.2 setrgbcolor) outputcolors drawsolid** } \axesIIID(4,4,4)(5,5,5) \end{pspicture} \begin{pspicture}(-4,-4)(4,5) \psframe(-4,-4)(4,5) \defFunction[algebraic]{Cercle}(t){4*cos(t)}{4*sin(t)}{0} \psSolid[object=courbe,r=0.001, linecolor=blue, range=0 6.28, function=Cercle]% \codejps{ \RotVecteur /tablecone [0.2 0.6 4] def /couleurs {dup (1 0.5 0.2 setrgbcolor) outputcolors} def % Vx Vy Vz [r h mode] newvecteur /triedre0 4 0 0 tablecone newvecteur % Ox % drawsolid** 0 4 0 tablecone newvecteur solidfuz % drawsolid** 0 0 4 tablecone newvecteur solidfuz def triedre0 couleurs drawsolid** /triedre1 triedre0 {0 0 \PSI rotateOpoint3d} solidtransform def %% pour récupérer u1, v1, w1 1 0 0 0 0 \PSI rotateOpoint3d /u1 defpoint3d 0 1 0 0 0 \PSI rotateOpoint3d /v1 defpoint3d 0 0 1 0 0 \PSI rotateOpoint3d /w1 defpoint3d %triedre1 % dup (0 0.5 0.2 setrgbcolor) outputcolors % drawsolid** /triedre2 triedre1 {u1 \THETA rotV3d} solidtransform def % pour récupérer u2,v2 et w2 u1 u1 \THETA rotV3d /u2 defpoint3d v1 u1 \THETA rotV3d /v2 defpoint3d w1 u1 \THETA rotV3d /w2 defpoint3d triedre2 dup (1 0 0.2 setrgbcolor) outputcolors drawsolid** % /triedre3 triedre2 {w2 \PHI rotV3d} solidtransform def % triedre3 % dup (0 0 1 setrgbcolor) outputcolors % drawsolid** } \axesIIID(4,4,4)(5,5,5) \end{pspicture} \hfill \begin{pspicture}(-4,-4)(4,5) \psframe(-4,-4)(4,5) \defFunction[algebraic]{Cercle}(t){4*cos(t)}{4*sin(t)}{0} \psSolid[object=courbe,r=0.001, linecolor=blue, range=0 6.28, function=Cercle]% \codejps{ \RotVecteur /tablecone [0.2 0.6 4] def /couleurs {dup (1 0.5 0.2 setrgbcolor) outputcolors} def % Vx Vy Vz [r h mode] newvecteur /triedre0 4 0 0 tablecone newvecteur % Ox % drawsolid** 0 4 0 tablecone newvecteur solidfuz % drawsolid** 0 0 4 tablecone newvecteur solidfuz def triedre0 couleurs drawsolid** /triedre1 triedre0 {0 0 \PSI rotateOpoint3d} solidtransform def %% pour récupérer Ox1 %% pour récupérer u1, v1, w1 1 0 0 0 0 \PSI rotateOpoint3d /u1 defpoint3d 0 1 0 0 0 \PSI rotateOpoint3d /v1 defpoint3d 0 0 1 0 0 \PSI rotateOpoint3d /w1 defpoint3d %triedre1 % dup (0 0.5 0.2 setrgbcolor) outputcolors % drawsolid** /triedre2 triedre1 {u1 \THETA rotV3d} solidtransform def % pour récupérer u2,v2 et w2 u1 u1 \THETA rotV3d /u2 defpoint3d v1 u1 \THETA rotV3d /v2 defpoint3d w1 u1 \THETA rotV3d /w2 defpoint3d %triedre2 % dup (1 0 0.2 setrgbcolor) outputcolors % drawsolid** /triedre3 triedre2 {w2 \PHI rotV3d} solidtransform def triedre3 dup (0 0 1 setrgbcolor) outputcolors drawsolid** } \axesIIID(4,4,4)(5,5,5) \end{pspicture} \end{center} \begin{center} \begin{pspicture}(-5,-5)(5,6) \psset{viewpoint=100 20 20 rtp2xyz,Decran=80,fontsize=10} \psframe(-5,-5)(5,6) \defFunction[algebraic]{Cercle}(t){4*cos(t)}{4*sin(t)}{0} \psSolid[object=courbe,r=0.001, linecolor=blue, range=0 6.28, function=Cercle]% \codejps{ \RotVecteur /tablecone [0.2 0.6 4] def /couleurs {dup (1 0.5 0.2 setrgbcolor) outputcolors} def % Vx Vy Vz [r h mode] newvecteur /triedre0 4 0 0 tablecone newvecteur % Ox % drawsolid** 0 4 0 tablecone newvecteur solidfuz % drawsolid** 0 0 4 tablecone newvecteur solidfuz def triedre0 couleurs drawsolid** /triedre1 triedre0 {0 0 \PSI rotateOpoint3d} solidtransform def %% pour récupérer u1, v1, w1 1 0 0 0 0 \PSI rotateOpoint3d /u1 defpoint3d 0 1 0 0 0 \PSI rotateOpoint3d /v1 defpoint3d 0 0 1 0 0 \PSI rotateOpoint3d /w1 defpoint3d triedre1 dup (0 0.5 0.2 setrgbcolor) outputcolors drawsolid** /triedre2 triedre1 {u1 \THETA rotV3d} solidtransform def % pour récupérer u2,v2 et w2 u1 u1 \THETA rotV3d /u2 defpoint3d v1 u1 \THETA rotV3d /v2 defpoint3d w1 u1 \THETA rotV3d /w2 defpoint3d triedre2 dup (1 0 0.2 setrgbcolor) outputcolors drawsolid** /triedre3 triedre2 {w2 \PHI rotV3d} solidtransform def triedre3 dup (0 0 1 setrgbcolor) outputcolors drawsolid** } \axesIIID(4,4,4)(5,5,5) \end{pspicture} \end{center} \end{document}