1 \section {Transformer un point et le mémoriser
}
3 Soit un point initial $A(x,y,z)$. On fait subir à ce point des
4 rotations autour des axes $Ox$, $Oy$ et $Oz$ d'angles respectifs :
5 \texttt{[RotX=valeurX,RotX=valeurY,RotX=valeurZ
]}, dans cet ordre,
6 puis on opère une translation de vecteur $(v_x,v_y,v_z)$. Le problème
7 a été de récupérer les coordonnées du point final $A'(x',y',z')$.
10 \psframebox[fillstyle=solid,fillcolor=yellow,linecolor=yellow
]%
11 {\texttt{$
\backslash$psTransformPoint
[RotX=valeurX,RotX=valeurY,
12 RotX=valeurZ
](x y z)(vx,vy,vz)\
{A'\
}}}\\
13 permet de stocker dans le n
\oe{}ud $A'$, les coordonnées du point
16 Dans l'exemple suivant $A(
2,
2,
2)$ est l'un des sommets du cube
17 initial, dont le centre est placé à l'origine du repère.
20 \psSolid[object=cube,a=
4,action=draw*,linecolor=red
]%
23 Ce cube subit différentes transformations :
26 \psSolid[object=cube,a=
4,action=draw*,RotX=-
30,RotY=
60,RotZ=-
60](
7.5,
11.25,
10)
%
29 Pour obtenir l'image de $A$, on applique la commande suivante :
32 \psTransformPoint[RotX=-
30,RotY=
60,RotZ=-
60](
2 2 2)(
7.5,
11.25,
10)
{A'
}
35 Ce qui permet, par exemple, de nommer ces points et de dessiner le vecteur
36 $
\overrightarrow{AA'
}$.
38 \begin{pspicture
}(-
2,-
4)(
6,
6)
40 \psset{unit=
0.5,viewpoint=
40 20 40,Decran=
40}
41 \psSolid[object=cube,a=
4,action=draw*,linecolor=red
]%
42 \psPoint(
2,
2,
2)
{A
}\psdot(A)
43 \psSolid[object=cube,a=
4,action=draw*,RotX=-
30,RotY=
60,RotZ=-
60](
7.5,
11.25,
10)
%
44 \psTransformPoint[RotX=-
30,RotY=
60,RotZ=-
60](
2 2 2)(
7.5,
11.25,
10)
{A'
}
45 \psdot(A')
\psline[linecolor=blue,arrowsize=
0.3]{{o-v
}}(A)(A')
46 \uput[u
](A')
{$A'$
}\uput[u
](A)
{$A$
}
47 \psset{solidmemory,action=none
}
48 \psSolid[object=cube,a=
4,
50 \psSolid[object=plan,definition=solidface,args=A1
0,name=P0
]
51 \psSolid[object=plan,definition=solidface,args=A1
1,name=P1
]
52 \psSolid[object=plan,definition=solidface,args=A1
4,name=P4
]
54 \psProjection[object=texte,linecolor=red,text=A,plan=P0
]%
55 \psProjection[object=texte,linecolor=red,text=B,plan=P1
]%
56 \psProjection[object=texte,linecolor=red,text=E,plan=P4
]%
57 \psSolid[object=cube,a=
4,RotX=-
30,RotY=
60,RotZ=-
60,
58 name=A2,
](
7.5,
11.25,
10)
59 \psSolid[object=plan,definition=solidface,args=A2
0,name=P'
0]
60 \psSolid[object=plan,definition=solidface,args=A2
1,name=P'
1]
61 \psSolid[object=plan,definition=solidface,args=A2
2,name=P'
2]
62 \psProjection[object=texte,text=A,plan=P'
0]%
63 \psProjection[object=texte,text=B,plan=P'
1]%
64 \psProjection[object=texte,text=C,plan=P'
2]%
65 \axesIIID(
2,
2,
2)(
10,
10,
8)