summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-solides3d/doc/par-ligne3D.tex
blob: 22b77a475e4851da3cf02865ec8c48e36ef799bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
\section{Tracer une ligne brisée}

Cette commande est adaptée de la macro \verb+\pstThreeDLine+ du package \texttt{pst-3dplot} de H.Voss\footnote{\url{http://tug.ctan.org/tex-archive/graphics/pstricks/contrib/pst-3dplot}.}

On l'utilise : \psframebox[fillstyle=solid,fillcolor=yellow,linecolor=yellow]{\texttt{$\backslash$psLineIIID[options](x0,y0,z0)(x1,y1,z1)\ldots(xn,yn,zn)}},
avec les options suivantes possibles :
\begin{itemize}
  \item \texttt{linecolor=couleur} ;
  \item \texttt{doubleline=true} ;
  \item \texttt{linearc=valeur}.
\end{itemize}
On ne peut pas flécher les extrémités d'une ligne.

\psset{viewpoint=50 20 30 rtp2xyz,Decran=50}
\begin{LTXexample}[width=6.5cm]
\begin{pspicture}(-3,-4)(4,4)
\psframe(-3,-4)(4,4)
\psSolid[object=cube,a=4,action=draw*,fillcolor=magenta!20]%
\psLineIIID[linecolor=blue,linewidth=0.1,linearc=0.5,doubleline=true](-2,-2,-2)(2,2,2)(2,2,-2)(2,-2,0)
\psPoint(2,-2,0){A}\psPoint(-2,-2,-2){B}
\psPoint(2,2,2){C}\psPoint(2,2,-2){D}
\psdot[dotsize=0.2](A)\psdot[dotsize=0.2](B)
\psdot[dotsize=0.2](C)\psdot[dotsize=0.2](D)
\psLineIIID[linecolor=green](-2,-2,-2)(2,2,2)(2,2,-2)(2,-2,0)
\psPolygonIIID[linecolor=red,fillstyle=vlines,linearc=0.5,linewidth=0.1](-2,-2,2)(-2,2,2)(2,2,2)(2,-2,2)
\axesIIID(2,2,2)(4,4,4)
\end{pspicture}
\end{LTXexample}

%% \section{Tracer une ligne brisée}
%% 
%% Cette commande est adaptée de la macro \verb+\pstThreeDLine+ du package \texttt{pst-3dplot} de H.Voss\footnote{\url{http://tug.ctan.org/tex-archive/graphics/pstricks/contrib/pst-3dplot}.}
%% 
%% On l'utilise : \psframebox[fillstyle=solid,fillcolor=yellow,linecolor=yellow]{\texttt{$\backslash$psLineIIID[options](x0,y0,z0)(x1,y1,z1)\ldots(xn,yn,zn)}},
%% avec les options suivantes possibles :
%% \begin{itemize}
%%   \item \texttt{linecolor=couleur} ;
%%   \item \texttt{doubleline=true} ;
%%   \item \texttt{linearc=valeur}.
%% \end{itemize}
%% On ne peut pas flécher les extrémités d'une ligne.
%% 
%% \psset{viewpoint=50 20 30 rtp2xyz,Decran=50}
%% \begin{LTXexample}[width=6.5cm]
%% \begin{pspicture}(-3,-4)(4,4)
%% \psframe(-3,-4)(4,4)
%% \psSolid[object=cube,a=4,action=draw*,fillcolor=magenta!20]%
%% \psLineIIID[linecolor=blue,linewidth=0.1,linearc=0.5,doubleline=true](-2,-2,-2)(2,2,2)(2,2,-2)(2,-2,0)
%% \psPoint(2,-2,0){A}\psPoint(-2,-2,-2){B}
%% \psPoint(2,2,2){C}\psPoint(2,2,-2){D}
%% \psdot[dotsize=0.2](A)\psdot[dotsize=0.2](B)
%% \psdot[dotsize=0.2](C)\psdot[dotsize=0.2](D)
%% \psLineIIID[linecolor=green](-2,-2,-2)(2,2,2)(2,2,-2)(2,-2,0)
%% \psPolygonIIID[linecolor=red,fillstyle=vlines,linearc=0.5,linewidth=0.1](-2,-2,2)(-2,2,2)(2,2,2)(2,-2,2)
%% \axesIIID(2,2,2)(4,4,4)
%% \end{pspicture}
%% \end{LTXexample}
%% 
%% \section{Tracer un polygone}
%% On utilise : \psframebox[fillstyle=solid,fillcolor=yellow,linecolor=yellow]{\texttt{$\backslash$psPolygonIIID[options](x0,y0,z0)(x1,y1,z1)\ldots(xn,yn,zn)}},
%% avec les options suivantes possibles :
%% \begin{itemize}
%%   \item \texttt{linecolor=couleur} ;
%%   \item \texttt{doubleline=true} ;
%%   \item \texttt{linearc=valeur} ;
%%   \item \texttt{fillstyle=solid} ;
%%   \item \texttt{fillstyle=vlines} ou \texttt{fillstyle=hlines} ou \texttt{fillstyle=crosshatch}.
%% \end{itemize}
%% \newpage
%% 
%% \section{Transformer un point et le mémoriser}
%% Soit un point initial $A(x,y,z)$. On fait subir à ce point des rotations autour des axes $Ox$, $Oy$ et $Oz$ d'angles respectifs :
%% \texttt{[RotX=valeurX,RotX=valeurY,RotX=valeurZ]}, dans cet ordre, puis on opère une translation de vecteur $(v_x,v_y,v_z)$. Le problème a été de récupérer les
%% coordonnées du point final $A'(x',y',z')$.
%% 
%% La commande \psframebox[fillstyle=solid,fillcolor=yellow,linecolor=yellow]{\texttt{$\backslash$psTransformPoint[RotX=valeurX,RotX=valeurY,RotX=valeurZ](x y z)(vx,vy,vz)\{A'\}}}
%%  permet de stocker dans le n\oe{}ud $A'$, les coordonnées du point transformé.
%% 
%% Dans l'exemple suivant $A(2,2,2)$ est l'un des sommets du cube initial, dont le centre est placé à l'origine du repère.
%% {\red
%% \begin{verbatim}
%% \psSolid[object=cube,a=4,action=draw*,linecolor=red]%
%% \end{verbatim}
%% }
%% Ce cube subit différentes transformations :
%% {\red
%% \begin{verbatim}
%% \psSolid[object=cube,a=4,action=draw*,RotX=-30,RotY=60,RotZ=-60](7.5,11.25,10)%
%% \end{verbatim}
%% }
%% Pour obtenir l'image de $A$, on applique la commande suivante :
%% {\red
%% \begin{verbatim}
%% \psTransformPoint[RotX=-30,RotY=60,RotZ=-60](2 2 2)(7.5,11.25,10){A'}
%% \end{verbatim}
%% }
%% Ce qui permet, par exemple, de nommer ces points et de dessiner le vecteur $\overrightarrow{AA'}$.
%% \begin{center}
%% \begin{pspicture}(-2,-4)(6,6)
%% \psframe(-2,-4)(6,6)
%% \psset{unit=0.5}
%% %\psSolid[object=cube,a=4,action=draw,linecolor=red,fontsize=40,numfaces=all]%
%% \psSolid[object=cube,a=4,action=draw*,linecolor=red]%
%% \psPoint(2,2,2){A}\psdot(A)
%% %\psSolid[object=cube,a=4,action=draw,RotX=-30,RotY=60,RotZ=-60,fontsize=40,numfaces=all](7.5,11.25,10)%
%% \psSolid[object=cube,a=4,action=draw*,RotX=-30,RotY=60,RotZ=-60](7.5,11.25,10)%
%% \psTransformPoint[RotX=-30,RotY=60,RotZ=-60](2 2 2)(7.5,11.25,10){A'}
%% \psdot(A')\psline[linecolor=blue,arrowsize=0.3]{{o-v}}(A)(A')
%% \uput[u](A'){$A'$}\uput[u](A){$A$}
%% \psset{solidmemory}
%% \psSolid[object=cube,a=4,
%%    name=A1,
%%    action=none](0,0,0)
%% \psset{fontsize=100,
%%    phi=90,
%%    no=0,
%%    solidname=A1}
%% \psProjection[object=texte,linecolor=red,text=A]%
%% \psset{fontsize=100,
%%    phi=180,
%%    no=1,
%%    solidname=A1}
%% \psProjection[object=texte,linecolor=red,text=B]%
%% \psset{fontsize=100,
%%    phi=90,
%%    no=4,
%%    solidname=A1}
%% \psProjection[object=texte,linecolor=red,text=E]%
%% %
%% \psset{solidmemory}
%% \psSolid[object=cube,a=4,RotX=-30,RotY=60,RotZ=-60,
%%    name=A2,
%%    action=none](7.5,11.25,10)
%% \psset{fontsize=100,
%%    phi=20,
%%    no=0,
%%    solidname=A2}
%% \psProjection[object=texte,text=A]%
%% \psset{fontsize=100,
%%    phi=160,
%%    no=2,
%%    solidname=A2}
%% \psProjection[object=texte,text=B]%
%% \psset{fontsize=100,
%%    phi=160,
%%    no=1,
%%    solidname=A2}
%% \psProjection[object=texte,text=C]%
%% \axesIIID(2,2,2)(10,10,8)
%% \end{pspicture}
%% \end{center}