Initialisation du projet pst-solides3d.git (SVN revision 142)
[pst-solides3d.git] / doc / par-courbeR3.tex
1 \section {Courbes de fonctions de $R$ vers $R^3$}
2
3 %% \section{Fonctions R --> R\textsuperscript{3}}
4
5 Le tracé de la fonction ainsi définie fait appel à l'objet
6 \Cadre{courbe} et à l'option \Cadre{function}.
7
8 On pourra réaliser le tracé de l'hélice :
9
10 %% \[
11 %% \left\{
12 %% \begin{array}{lcl}
13 %% x&=&3\cos(4t)\\
14 %% y&=&3\sin(4t)\\
15 %% z&=&t
16 %% \end{array}
17 %% \right.
18 %% \]
19 en notation algébrique avec la fonction :
20
21 %%\begin{boxedverbatim}
22 \begin{verbatim}
23 \defFunction[algebraic]{helice}(t){3*cos(4*t)}{3*sin(4*t)}{t}
24 \end{verbatim}
25 %%\end{boxedverbatim}
26
27 %\defFunction[algebraic]{f}(t){t}{(t^2)/10-1}{}
28 \begin{minipage}{0.4\linewidth}
29 \psset{unit=0.5}
30 \psset{lightsrc=10 -20 50,viewpoint=50 -20 20 rtp2xyz,Decran=50}
31 \begin{pspicture}(-6,-3)(6,8)
32 \psframe*[linecolor=blue!50](-6,-3)(6,8)
33 \psSolid[object=grille,base=-4 4 -4 4,linecolor=red,linewidth=0.5\pslinewidth]%
34 \axesIIID(0,0,0)(4,4,7)
35 \defFunction[algebraic]{helice}(t){3*cos(4*t)}{3*sin(4*t)}{t}
36 \psSolid[object=courbe,
37 r=0,
38 range=0 6,
39 linecolor=blue,linewidth=0.1,
40 resolution=360,
41 function=helice]%
42 \end{pspicture}
43 \end{minipage}
44 \hfill
45 \begin{minipage}{0.55\linewidth}
46 %%\begin{boxedverbatim}
47 \begin{verbatim}
48 \defFunction[algebraic]%
49 {helice}(t){cos(3*t)}{sin(3*t)}{t}
50 \psSolid[object=courbe,
51 range=0 6,
52 r=0,
53 linecolor=blue,
54 resolution=360,
55 function=helice]%
56 \end{verbatim}
57 %%\end{boxedverbatim}
58 \end{minipage}
59
60 \begin{minipage}{0.4\linewidth}
61 \psset{unit=0.5}
62 \begin{pspicture}(-6,-3)(6,8)
63 \psframe*[linecolor=blue!50](-6,-3)(6,8)
64 \psset{lightsrc=10 -20 50,viewpoint=50 -20 30 rtp2xyz,Decran=50}
65 \psSolid[object=grille,base=-4 4 -4 4,linecolor=red,linewidth=0.5\pslinewidth]%
66 \axesIIID(0,0,0)(4,4,7)
67 \psset{range=-4 4}
68 \defFunction{CosRad}(t){t 2 mul Cos 4 mul}{t}{0}
69 \psSolid[object=courbe,linewidth=0.1,
70 r=0,
71 linecolor=red,
72 resolution=360,
73 function=CosRad]%
74 \psSolid[object=grille,base=-4 4 -4 4,linecolor=blue,linewidth=0.5\pslinewidth](0,0,3)
75 \psPoint(0,0,3){O1}\psPoint(0,0,7){Z1}\psline(O1)(Z1)\psline[linestyle=dashed](O1)(O)
76 \pstVerb{/tmin -4 def /tmax 4 def}%
77 \defFunction{sinRad}(t){t}{t Sin 3 mul}{3}
78 \psSolid[object=courbe,linewidth=0.1,
79 r=0,
80 linecolor=blue,
81 resolution=30,
82 function=sinRad]%
83 \end{pspicture}
84 \end{minipage}
85 \hfill
86 \begin{minipage}{0.55\linewidth}
87 %%\begin{boxedverbatim}
88 \begin{verbatim}
89 \psset{range=-4 4}
90 \psSolid[object=grille,base=-4 4 -4 4]%
91 \defFunction{CosRad}(t){t 2 mul Cos 4 mul}{t}{0}
92 \psSolid[object=courbe,linewidth=0.1,
93 r=0,
94 linecolor=red,
95 resolution=360,
96 function=CosRad]%
97 \defFunction{sinRad}(t){t}{t Sin 3 mul}{3}
98 \psSolid[object=grille,base=-4 4 -4 4](0,0,3)
99 \psSolid[object=courbe,
100 r=0,
101 linecolor=blue,
102 resolution=360,
103 function=sinRad]
104 \end{verbatim}
105 %%\end{boxedverbatim}
106 \end{minipage}
107
108 \begin{minipage}{0.4\linewidth}
109 \psset{unit=0.5}
110 \begin{pspicture}(-5,0)(7,9)
111 \psset{lightsrc=10 -20 50,viewpoint=50 -20 20 rtp2xyz,Decran=50}
112 \psSolid[object=grille,base=-4 4 -4 4,linecolor=lightgray,linewidth=0.5\pslinewidth]%
113 \psSolid[object=grille,base=-4 4 0 8,linecolor=lightgray,RotX=90,linewidth=0.5\pslinewidth](0,4,0)
114 \psSolid[object=grille,base=-4 4 -4 4,linecolor=lightgray,RotY=90,linewidth=0.5\pslinewidth](-4,0,4)
115 \defFunction[algebraic]{helice}%
116 (t){1.3*(1-cos(2.5*t))*cos(6*t)}{1.3*(1-cos(2.5*t))*sin(6*t)}{t}
117 \defFunction[algebraic]{helice_xy}(t){1.3*(1-cos(2.5*t))*cos(6*t)}{1.3*(1-cos(2.5*t))*sin(6*t)}{0}
118 \defFunction[algebraic]{helice_xz}(t){1.3*(1-cos(2.5*t))*cos(6*t)}{4}{t}
119 \defFunction[algebraic]{helice_yz}(t){-4}{1.3*(1-cos(2.5*t))*sin(6*t)}{t}
120 \psset{range=0 8}
121 \psSolid[object=courbe,
122 r=0,
123 linecolor=blue,
124 linewidth=0.05,
125 resolution=360,
126 normal=0 0 1,
127 function=helice_xy]%
128 \psSolid[object=courbe,
129 r=0,
130 linecolor=green,
131 linewidth=0.05,
132 resolution=360,
133 normal=0 0 1,
134 function=helice_xz]%
135 \psSolid[object=courbe,
136 r=0,
137 linewidth=0.05,
138 resolution=360,
139 normal=0 0 1,
140 function=helice_yz]%
141 \psSolid[object=courbe,
142 r=0,
143 linecolor=red,
144 linewidth=0.1,
145 resolution=360,
146 function=helice]%
147 \end{pspicture}
148 \end{minipage}
149 \hfill
150 \begin{minipage}{0.55\linewidth}
151 \footnotesize
152 %%\begin{boxedverbatim}
153 \begin{verbatim}
154 \psSolid[object=grille,base=-4 4 -4 4]%
155 \psSolid[object=grille,base=-4 4 0 8](0,4,0)
156 \psSolid[object=grille,base=-4 4 -4 4](-4,0,4)
157 \defFunction[algebraic]{helice}%
158 (t){1.3*(1-cos(2.5*t))*cos(6*t)}
159 {1.3*(1-cos(2.5*t))*sin(6*t)}{t}
160 \defFunction[algebraic]{helice_xy}%
161 (t){1.3*(1-cos(2.5*t))*cos(6*t)}
162 {1.3*(1-cos(2.5*t))*sin(6*t)}{0}
163 \defFunction[algebraic]{helice_xz}%
164 (t){1.3*(1-cos(2.5*t))*cos(6*t)}{4}{t}
165 \defFunction[algebraic]{helice_yz}%
166 (t){-4}{1.3*(1-cos(2.5*t))*sin(6*t)}{t}
167 \psset{range=0 8}
168 \psSolid[object=courbe,
169 r=0,
170 linecolor=blue,
171 linewidth=0.05,
172 resolution=360,
173 normal=0 0 1,
174 function=helice_xy]%
175 \psSolid[object=courbe,
176 r=0,
177 linecolor=green,
178 linewidth=0.05,
179 resolution=360,
180 normal=0 0 1,
181 function=helice_xz]%
182 \psSolid[object=courbe,
183 r=0,
184 linewidth=0.05,
185 resolution=360,
186 normal=0 0 1,
187 function=helice_yz]%
188 \psSolid[object=courbe,
189 r=0,
190 linecolor=red,
191 linewidth=0.1,
192 resolution=360,
193 function=helice]%
194 \end{verbatim}
195 %%\end{boxedverbatim}
196 \end{minipage}
197
198 Ces dernières courbes se trouvent sous forme d'animations sur la page :
199
200 \centerline{\url{http://melusine.eu.org/syracuse/pstricks/pst-solides3d/animations/}}
201
202

Licence Creative Commons Les fichiers de Syracuse sont mis à disposition (sauf mention contraire) selon les termes de la
Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 4.0 International.