Initialisation du projet pst-solides3d.git (SVN revision 142)
[pst-solides3d.git] / doc-en / par-projectiontexte-en.tex
1 \section{Text}
2
3 The object \Lkeyword{texte} of the macro \Lcs{psProjection} allows us
4 to \Index{project} character strings onto planes.
5
6 \subsection{The parameters and the options}
7
8 There are three parameters:\Lkeyword{text} which defines the
9 string, \Lkeyword{fontsize}, which gives the dimension of the font
10 in points (remember: 28.45~pts correspond to 1~cm), and finally
11 \Lkeyword{pos}, which defines the position of the \Index{text}. By
12 default, the text is centred at the origin of the plane.
13
14 This last parameter needs some explanation. See the string
15 \texttt{petit texte} represented below.
16 \begin{center}
17 \begin{pspicture}(-5,-2)(5,2)
18 \rput(0,0){\psframebox[linestyle=none,fillstyle=solid,
19 fillcolor=yellow!50,framesep=0pt]{\phantom{\timesnormal petit texte}}}
20 \rput(0,0){\rnode[lb]{A}{\rnode[rb]{B}{\rnode[rt]{C}{%
21 \rnode[lt]{D}{\rnode[l]{E}{\rnode[r]{F}{%
22 \rnode[t]{G}{\rnode[b]{H}{\timesnormal petit texte}}}}}}}}}
23 %\psset{nodesep=5pt}
24 \ncline{A}{B}\ncline{B}{C}\ncline{C}{D}\ncline{D}{A}
25 \pnode({A}){A'}
26 \pnode({B}){B'}
27 \pnode({C}){C'}
28 \pnode({D}){D'}
29 \pnode({E}){E'}
30 \pnode({F}){F'}
31 \pnode({G}){G'}
32 \pnode({H}){H'}
33 \rput(A){\pnode(0,\baselineskip){B1}}
34 \rput(B){\pnode(0,\baselineskip){B2}}
35 \psdots(A')(B')(C')(D')(E')(F')(G')(H')(B1)(B2)(0,0)
36 \psline(B1)(B2)
37 \pnode(! \GetCenter{A} A.x 0.5 sub A.y 0.5 sub){A1}
38 \ncline{->}{A}{A1}
39 \uput[dl](A1){\texttt{dl}}
40 \pnode(! \GetCenter{B1} B1.x 0.5 sub B1.y){B1l}
41 \ncline{->}{B1}{B1l}
42 \uput[l](B1l){\texttt{bl}}
43 \pnode(! \GetCenter{E} E.x 0.5 sub E.y){El}
44 \ncline{->}{E}{El}
45 \uput[l](El){\texttt{cl}}
46 \pnode(! \GetCenter{D} D.x 0.5 sub D.y 0.5 add){Dl}
47 \ncline{->}{D}{Dl}
48 \uput[ul](Dl){\texttt{ul}}
49 \pnode(! \GetCenter{G} G.x G.y 0.5 add){Gu}
50 \ncline{->}{G}{Gu}
51 \uput[u](Gu){\texttt{uc}}
52 \pnode(! \GetCenter{H} H.x H.y 0.5 sub){Hd}
53 \ncline{->}{H}{Hd}
54 \uput[d](Hd){\texttt{dc}}
55 \pnode(! \GetCenter{C} C.x 0.5 add C.y 0.5 add){Cr}
56 \ncline{->}{C}{Cr}
57 \uput[ur](Cr){\texttt{ur}}
58 \pnode(! \GetCenter{B} B.x 0.5 add B.y 0.5 sub){Br}
59 \ncline{->}{B}{Br}
60 \uput[dr](Br){\texttt{dr}}
61 \pnode(! \GetCenter{B2} B2.x 0.5 add B2.y){B2r}
62 \ncline{->}{B2}{B2r}
63 \uput[r](B2r){\texttt{br}}
64 \pnode(! \GetCenter{F} F.x 0.5 add F.y){Fr}
65 \ncline{->}{F}{Fr}
66 \uput[r](Fr){\texttt{cr}}
67 \end{pspicture}
68 \end{center}
69
70 We have $4$~horizontal reference lines: the bottom line
71 \verb+(d)own+, the base line \verb+(b)aseline+, the median line,
72 or centre line \verb+(c)enter+, and the upper line \verb+(u)p+.
73
74 There are as well $4$~vertical reference lines: the left line
75 \verb+(l)eft+, the base line \verb+(b)aseline+, the centre line
76 \verb+(c)enter+ and the right line \verb+(r)ight+. In the case of
77 strings, the two vertical lines \verb+l+ and \verb+b+ might be
78 indistinguishable and easily confounded.
79
80 The intersection of the $4$ horizontal lines with the $4$ vertical
81 lines gives us $16$~positioning point possibilities \verb+dl+,
82 \verb+bl+, \verb+cl+, \verb+ul+, \verb+db+, \verb+bb+, \verb+cb+,
83 \verb+ub+, \verb+dc+, \verb+bc+, \verb+cc+, \verb+uc+, \verb+dr+,
84 \verb+br+, \verb+cr+, \verb+ur+.
85
86 Of these, $4$~are considered as \textit{inner points}: \verb+bb+,
87 \verb+bc+, \verb+cb+ and \verb+cc+.
88
89 When the parameter \Lkeyword{pos} of \Lcs{psProjection} is assigned
90 one of these four inner points, it means that the latter will be
91 situated at the origin of the plane of projection.
92
93 When the parameter \Lkeyword{pos} of \Lcs{psProjection} is assigned
94 one of the twelve remaining points, it indicates the direction in
95 which the text will be positioned relative to the origin of the
96 plane of projection.
97
98 For example, \verb+\psProjection[...,pos=uc](0,0)+ indicates that
99 the text will be centred relative to the point $(0,0)$ and
100 situated above it.
101
102 %% Le plan doit \^{e}tre d\'{e}fini par son origine
103 %% \Cadre{$\mathtt{(x_0ny_0,z_0)}$} et la normale %$
104 %% \Cadre{\texttt{[normal=1 0 0 90]}}. Pour les particularit\'{e}s
105 %% de la d\'{e}finition de la normale, car il y a trois fa\c{c}ons de le faire !
106 %% Tous les d\'{e}tails sont dans la partie \Cadre{\texttt{``Choisir un plan
107 %% par son origine et une normale''}} de la documentation de
108 %% \texttt{doc-psProjection}.
109
110 %% La taille de la fonte doit \^{e}tre fix\'{e}e en points avec l'option
111 %% . .
112
113
114 \subsection{Examples of projecting onto a plane}
115
116 \subsubsection{Example 1: \Index{projection} onto $Oxy$, with the option \texttt{pos=bc}}
117
118 \begin{LTXexample}[width=8cm]
119 \begin{pspicture}(-4,-1.5)(4,1.5)
120 \psset{solidmemory}
121 \psset{lightsrc=10 0 10,
122 viewpoint=50 -90 89.99 rtp2xyz,Decran=50}
123 \psSolid[object=plan,definition=normalpoint,plangrid,
124 base=-4 4 -1 1,args={0 0 0 [0 0 1]},name=monplan,]
125 \psProjection[object=texte,
126 fontsize=20,linecolor=red,
127 pos=bc,plan=monplan,
128 text=j'aimerais tant voir Syracuse,
129 ](0,0)%
130 \axesIIID(0,0,0)(4,2,1)
131 \composeSolid
132 \end{pspicture}
133 \end{LTXexample}
134
135 \subsubsection{Example 2: \Index{projection} onto $Oxy$, centred text}
136
137 \begin{LTXexample}[width=8cm]
138 \begin{pspicture}(-4,-1.5)(4,1.5)
139 \psset{solidmemory}
140 \psset{lightsrc=10 0 10,
141 viewpoint=50 -90 89.99 rtp2xyz,,Decran=50}
142 \psSolid[object=plan,definition=normalpoint,plangrid,
143 base=-4 4 -1 1,args={0 0 0 [0 0 1]},name=monplan,]
144 \psProjection[object=texte,
145 fontsize=20,linecolor=red,
146 text= L'\^{\i}le de P\^{a}ques et Kairouan,
147 plan=monplan]%
148 \axesIIID(0,0,0)(4,2,1)
149 \end{pspicture}
150 \end{LTXexample}
151
152
153 \subsubsection{Example 3: \Index{projection} onto $Oxy$, with different options
154 \texttt{pos=dl, etc.}}
155
156 \begin{center}
157 \psset{unit=.8}
158 \begin{pspicture}(-4,-1.5)(4,1.5)
159 \psset{solidmemory}
160 \psset{lightsrc=10 0 10,viewpoint=50 -90 89.99 rtp2xyz,Decran=50}
161 \psSolid[object=plan,definition=normalpoint,plangrid,
162 base=-10 10 -1 1,args={0 0 0 [0 0 1]},name=monplan,]
163 \psProjection[object=texte,
164 fontsize=20,linecolor=red,
165 text=Et les grands oiseaux qui s'amusent,
166 pos=dl,
167 plan=monplan]%
168 \axesIIID(0,0,0)(8,1,1)
169 \rput(0,-1.5){\Cadre{\texttt{[pos=dl]}}}
170 \end{pspicture}
171 \end{center}
172
173 \begin{center}
174 \psset{unit=.8}
175 \begin{pspicture}(-4,-1.5)(4,1.5)
176 \psset{solidmemory}
177 \psset{lightsrc=10 0 10,viewpoint=50 -90 89.99 rtp2xyz,Decran=50}
178 \psSolid[object=plan,definition=normalpoint,plangrid,
179 base=-10 10 -1 1,args={0 0 0 [0 0 1]},name=monplan,]
180 \psProjection[object=texte,
181 fontsize=20,linecolor=red,
182 text= A glisser l'aile sous le vent.,
183 pos=dr,
184 plan=monplan]%
185 \axesIIID(0,0,0)(8,1,1)
186 \rput(0,-1.5){\Cadre{\texttt{[pos=dr]}}}
187 \end{pspicture}
188 \end{center}
189
190 \begin{center}
191 \psset{unit=.8}
192 \begin{pspicture}(-4,-1.5)(4,1.5)
193 \psset{solidmemory}
194 \psset{lightsrc=10 0 10,viewpoint=50 -90 89.99 rtp2xyz,Decran=50}
195 \psSolid[object=plan,definition=normalpoint,plangrid,
196 base=-10 10 -1 1,args={0 0 0 [0 0 1]},name=monplan,]
197 \psProjection[object=texte,
198 fontsize=20,linecolor=red,
199 text=Avant que ma jeunesse s'use,
200 pos=ur,
201 plan=monplan]%
202 \axesIIID(0,0,0)(8,1,1)
203 \rput(0,-1.5){\Cadre{\texttt{[pos=ur]}}}
204 \end{pspicture}
205 \end{center}
206
207 \begin{center}
208 \psset{unit=.8}
209 \begin{pspicture}(-4,-1.5)(4,1.5)
210 \psset{solidmemory}
211 \psset{lightsrc=10 0 10,viewpoint=50 -90 89.99 rtp2xyz,Decran=50}
212 \psSolid[object=plan,definition=normalpoint,plangrid,
213 base=-10 10 -1 1,args={0 0 0 [0 0 1]},name=monplan,]
214 \psProjection[object=texte,
215 fontsize=20,linecolor=red,
216 text=Et que mes printemps soient partis,
217 pos=ul,
218 plan=monplan]%
219 \axesIIID(0,0,0)(8,1,1)
220 \rput(0,-1.5){\Cadre{\texttt{[pos=ul]}}}
221 \end{pspicture}
222 \end{center}
223
224 \begin{center}
225 \psset{unit=.8}
226 \begin{pspicture}(-4,-1.5)(4,1.5)
227 \psset{solidmemory}
228 \psset{lightsrc=10 0 10,viewpoint=50 -90 89.99 rtp2xyz,Decran=50}
229 \psSolid[object=plan,definition=normalpoint,plangrid,
230 base=-10 10 -1 1,args={0 0 0 [0 0 1]},name=monplan,]
231 \psProjection[object=texte,
232 fontsize=20,linecolor=red,
233 text=J'aimerais tant voir Syracuse,
234 pos=uc,
235 plan=monplan]%
236 \axesIIID(0,0,0)(8,1,1)
237 \rput(0,-1.5){\Cadre{\texttt{[pos=uc]}}}
238 \end{pspicture}
239 \end{center}
240
241 \begin{center}
242 \psset{unit=.8}
243 \begin{pspicture}(-4,-1.5)(4,1.5)
244 \psset{solidmemory}
245 \psset{lightsrc=10 0 10,viewpoint=50 -90 89.99 rtp2xyz,Decran=50}
246 \psSolid[object=plan,definition=normalpoint,plangrid,
247 base=-10 10 -1 1,args={0 0 0 [0 0 1]},name=monplan,]
248 \psProjection[object=texte,
249 fontsize=20,linecolor=red,
250 text=Pour m'en souvenir \`{a} Paris.,
251 pos=dc,
252 plan=monplan]%
253 \axesIIID(0,0,0)(8,1,1)
254 \rput(0,-1.5){\Cadre{\texttt{[pos=dc]}}}
255 \end{pspicture}
256 \end{center}
257
258 \subsubsection{Example 4: \Index{projection} onto $Oxy$ with text rotation}
259
260 \begin{LTXexample}[width=8cm]
261 \begin{pspicture}(-4,-3)(4,3)
262 \psset{solidmemory}
263 \psset{lightsrc=10 0 10,
264 viewpoint=50 -90 89.99 rtp2xyz,Decran=50}
265 \psSolid[object=plan,definition=normalpoint,plangrid,
266 base=-4 4 -3 3,args={0 0 0 [0 0 1]},name=monplan,]
267 \psset{plan=monplan}
268 \psProjection[object=texte,
269 fontsize=28.45,linecolor=gray!50,
270 text=Tournez man\`{e}ges]%
271 \psProjection[object=texte,
272 fontsize=28.45,linecolor=red,
273 text=Tournez man\`{e}ges,
274 phi=60]%
275 \axesIIID(0,0,0)(4,3,1)
276 \end{pspicture}
277 \end{LTXexample}
278 The text rotation is introduced by the parameter \texttt{phi=60}.
279
280 \subsubsection{Example 5: positioning text at a point}
281
282 \begin{LTXexample}[width=8cm]
283 \begin{pspicture}(-4,-3)(4,3)
284 \psset{solidmemory}
285 \psset{viewpoint=50 -90 89.99 rtp2xyz,Decran=50}
286 \psSolid[object=plan,definition=normalpoint,plangrid,
287 base=-4 4 -3 3,args={0 0 0 [0 0 1]},name=monplan,]
288 \psset{fontsize=28.45,plan=monplan}
289 \psProjection[object=texte,
290 linecolor=green,
291 text=ici](-2,-2)
292 \psProjection[object=texte,
293 linecolor=red,
294 text=ou]%
295 \psProjection[object=texte,
296 linecolor=blue,
297 text=l\`{a}](2,2)
298 \psPoint(0,0,0){O}
299 \psPoint(-2,-2,0){O1}
300 \psPoint(2,2,0){O2}
301 \psdots[dotsize=0.2](O)(O1)(O2)
302 \axesIIID(0,0,0)(4,4,1)
303 \end{pspicture}
304 \end{LTXexample}
305
306 \subsection{Examples for \Index{projecting} onto a face of a solid}
307
308 \subsubsection{Method}
309
310 The solid must be memorised with the general option
311 \texttt{$\backslash$psset$\{$solidmemory$\}$}. The first thing to %$
312 do is to find the numbers of the faces of the solid with the
313 option \texttt{\Lkeyword{numfaces}=\Lkeyval{all}}.
314 \begin{LTXexample}[width=8cm]
315 \psset{viewpoint=50 20 30 rtp2xyz,Decran=100}
316 \begin{pspicture}(-4,-4)(4,4)
317 \psSolid[object=cube,a=2,action=draw,
318 linecolor=red,numfaces=all]%
319 \axesIIID(1,1,1)(2,2,2)
320 \end{pspicture}
321 \end{LTXexample}
322
323 Then we define the projection plane as the chosen face, where in
324 this case we put \texttt{A} on the face with the index number 0:
325
326
327 Then we define the projection plane by a chosen face, there we put \texttt{A} on the face with the index number 0:
328 \begin{verbatim}
329 \psSolid[object=plan,definition=solidface,args=A 0,name=P0]
330 \psProjection[object=texte,linecolor=red,text=A,plan=P0]%
331 \end{verbatim}
332
333
334 \begin{LTXexample}[width=8cm]
335 \psset{viewpoint=50 20 30 rtp2xyz,Decran=50}
336 \begin{pspicture}(-4,-4)(4,5)
337 \psset{unit=0.5}
338 \psset{solidmemory}
339 \psSolid[object=cube,a=8,action=draw,name=A,linecolor=red]%
340 \psset{fontsize=100}
341 \psSolid[object=plan,action=none,
342 definition=solidface,args=A 0,name=P0]
343 \psProjection[object=texte,linecolor=red,text=A,plan=P0]%
344 \psSolid[object=plan,action=none,
345 definition=solidface,args=A 1,name=P1]
346 \psProjection[object=texte,linecolor=red,text=B,plan=P1]%
347 \psSolid[object=plan,action=none,
348 definition=solidface,args=A 4,name=P4]
349 \psProjection[object=texte,linecolor=red,text=E,plan=P4]%
350 \axesIIID(4,4,4)(6,6,6)
351 \end{pspicture}
352 \end{LTXexample}
353
354 \subsubsection{Text rotation with the option \texttt{phi}}
355
356 \begin{LTXexample}[width=8cm]
357 \psset{viewpoint=50 20 30 rtp2xyz,Decran=50}
358 \psset{unit=0.4}
359 \begin{pspicture}(-8,-7)(4,9)
360 \psset{solidmemory}
361 \psSolid[object=cube,a=8,action=draw,linecolor=red,name=A]%
362 \psset{fontsize=200}
363 \psSolid[object=plan,action=none,
364 definition=solidface,args=A 0,name=P0]
365 \psProjection[object=texte,linecolor=gray,text=A,plan=P0]%
366 \psset{phi=90}
367 \psProjection[object=texte,linecolor=red,text=A,plan=P0]%
368 \axesIIID(4,4,4)(6,6,6)
369 \end{pspicture}
370 \end{LTXexample}
371
372
373 \subsection{Examples of \Index{projecting} onto different faces of a solid}
374
375 \definecolor{rose}{rgb}{1,0.75,0.74}
376
377 \def\JuangJie{%
378 \begin{pspicture}(-3.5,-2)(3.5,4)
379 \psframe[fillcolor=cyan!50,fillstyle=solid](-3.5,-2)(3.5,4)%
380 \psSolid[object=cylindre,r=8,h=0.2,ngrid=1 36,action=draw**,hue=0.5 0.6]%
381 \psSolid[object=cube,a=8,h=0.2,ngrid=1 36,action=draw**,color1=magenta!50,
382 color2=red!20,color3=yellow!50,color4=green!50,
383 fcol=0 (color1) 1 (color2) 2 (color3) 3 (color4) 4(White)](0,0,4.2)%
384 \psset{solidmemory}%
385 \psSolid[object=cube,a=8,
386 name=A,
387 action=none](0,0,4.2)%
388 %% la face 0
389 \psSolid[object=plan,action=none,definition=solidface,
390 base=-4 4 -4 4,args=A 0,name=P0]%
391 %\psSolid[object=plan,definition=plan,action=none,args=P0,planmarks,action=none,]%
392 \psset{fontsize=30,plan=P0}%
393 \psProjection[object=texte,text=po\`{e}me](0,3)%
394 \psProjection[object=texte,text=de](0,2)%
395 \psset{fontsize=55}
396 \psProjection[object=texte,linecolor=red,text=Juang Jie]
397 %% la face 4
398 \psSolid[object=plan,action=none,definition=solidface,base=-4 4 -4 4,args=A 4,phi=-90,name=P4]%
399 %\psSolid[object=plan,definition=plan,action=none,args=P4,fontsize=10,planmarks,action=none]%
400 \psset{fontsize=28.45,pos=bc,plan=P4}
401 \psProjection[object=texte,text={Dans ma jeunesse,}](0,3)%
402 \psset{fontsize=20}
403 \psProjection[object=texte,text=j'\'{e}coutais le son de la pluie](0,2)%
404 \psProjection[object=texte,text=dans les maisons de plaisir](0,1)%
405 \psProjection[object=texte,text=les tentures frissonnaient]%
406 \psProjection[object=texte,text=sous la lumi\`{e}re rouge](0,-1)%
407 \psProjection[object=texte,text=des cand\'{e}labres](0,-2)%
408 %% la face 1
409 \psSolid[object=plan,action=none,definition=solidface,base=-4 4 -4 4,args=A 1,phi=180,name=P1]%
410 %\psSolid[object=plan,definition=plan,action=none,args=P1,fontsize=10,planmarks,action=none]%
411 \psset{plan=P1}
412 \psProjection[object=texte,fontsize=25,text=Dans mon \^{a}ge m\^{u}r](0,3)%
413 \psProjection[object=texte,text=j'ai \'{e}cout\'{e} le son de la pluie](0,2)%
414 \psProjection[object=texte,fontsize=18,text={en voyage, \`{a} bord d'un bateau}](0,1)%
415 \psProjection[object=texte,text=les nuages pesaient bas]%
416 \psProjection[object=texte,text=sur l'immensit\'{e} du fleuve](0,-1)%
417 \psProjection[object=texte,text=une oie sauvage ](0,-2)%
418 \psProjection[object=texte,text=s\'{e}par\'{e}e de ses soeurs](0,-3)%
419 %% la face 2
420 \psSolid[object=plan,action=none,definition=solidface,base=-4 4 -4 4,args=A 2,phi=180,name=P2]%
421 %\psSolid[object=plan,definition=plan,action=none,args=P2,fontsize=10,planmarks,action=none]%
422 \psset{plan=P2}
423 \psProjection[object=texte,text=appelait dans le vent d'ouest](0,3)%
424 \psProjection[object=texte,text={Aujourd'hui,}](0,2)%
425 \psProjection[object=texte,text=j'\'{e}coute le son de la pluie](0,1)%
426 \psProjection[object=texte,text=sous le charme]%
427 \psProjection[object=texte,text=d'un ermitage monastique](0,-1)%
428 \psProjection[object=texte,text=Ma t\^{e}te est chenue](0,-2)%
429 \psProjection[object=texte,text=chagrins et bonheurs](0,-3)%
430 %% la face 3
431 \psSolid[object=plan,action=none,definition=solidface,args=A 3,phi=180,name=P3]%
432 %\psSolid[object=plan,definition=plan,action=none,args=P3,fontsize=10,planmarks,action=none]%
433 \psset{plan=P3}
434 \psProjection[object=texte,text=s\'{e}parations et retrouvailles](0,3)%
435 \psProjection[object=texte,text=tout est vanit\'{e}](0,2)%
436 \psProjection[object=texte,text={Dehors, sur les marches}](0,1)%
437 \psProjection[object=texte,text=les gouttes tambourinent]%
438 \psProjection[object=texte,text= jusqu'\`{a} l'aube](0,-1)%
439 \psProjection[object=texte,text=Juang Jie ](0,-3)%
440 \composeSolid
441 \end{pspicture}}
442
443 \def\MollyBloom{%
444 %\psset{lightsrc=-15 -9 5}
445 %\psset{viewpoint=20 -150 30 rtp2xyz,Decran=11}
446 \psset{solidmemory,visibility}
447 %% le plan de base
448 \psSolid[object=plan,
449 definition=equation,
450 ngrid=1. 1.,
451 args={[0 0 1 0]},linecolor=red,
452 base=-8 10 -8 8,
453 linecolor=red,
454 name=G]%
455 \psset{fontsize=25,,pos=bc,plan=G}
456 \psProjection[object=texte,
457 phi=-90,
458 text=le monologue de Molly,
459 pos=bc,
460 ](-5,0)
461 \psProjection[object=texte,text=dans Ulysse de James Joyce](1,-5,0)
462 \psset{h=1,fillcolor=yellow!50,incolor=rose,hollow}
463 \psset{fontsize=20,pos=cc}
464 %
465 \psSolid[object=ruban,name=ruban1,base=9 8 9 -8]
466 \psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90]
467 \psProjection[object=texte,plan=R0,
468 text=O cet effrayant torrent tout au fond O et la mer \'{e}carlate]
469 %
470 \psSolid[object=ruban,name=ruban1,base=9 -8 -8 -8]
471 \psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90]
472 \psProjection[object=texte,plan=R0,
473 text=quelquefois comme du feu et les glorieux couchers de soleil et]
474 %
475 \psSolid[object=ruban,name=ruban1,base=-8 7 7 7]
476 \psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90]
477 \psProjection[object=texte,plan=R0,fontsize=18,
478 text=les ruelles bizarres les maisons roses et bleues et jaunes,]
479 %
480 \psSolid[object=ruban,name=ruban1,base=7 7 7 -6]
481 \psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90]
482 \psProjection[object=texte,plan=R0,
483 text=et les roseraies et les jasmins et les g\'{e}raniums,]
484 %
485 \psSolid[object=ruban,name=ruban1,base=7 -6 -6 -6]
486 \psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90]
487 \psProjection[object=texte,plan=R0,
488 text=et les cactus de Gibraltar quand j'\'{e}tais jeune fille,]
489 %
490 \psSolid[object=ruban,name=ruban1,base=-6 5 5 5]
491 \psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90]
492 \psProjection[object=texte,plan=R0,fontsize=18,
493 text=quand j'ai mis la rose dans mes cheveux,]
494 %
495 \psSolid[object=ruban,name=ruban1,base=5 5 5 -4]
496 \psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90]
497 \psProjection[object=texte,plan=R0,
498 text=comme les filles Andalouses,]
499 %
500 \psSolid[object=ruban,name=ruban1,base=5 -4 -3 -4]
501 \psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90]
502 \psProjection[object=texte,plan=R0,
503 text=ou en mettrai-je une rouge oui,]
504 %
505 \psSolid[object=ruban,name=ruban1,base=-3 4 3 4]
506 \psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90]
507 \psProjection[object=texte,plan=R0,fontsize=18,
508 text=sous le mur mauresque,]
509 %
510 \psSolid[object=ruban,name=ruban1,base=3 4 3 -2]
511 \psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90]
512 \psProjection[object=texte,plan=R0,
513 text=je me suis dit apr\`{e}s,]
514 %
515 \psSolid[object=ruban,name=ruban1,base=3 -2 -1.5 -2]
516 \psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90]
517 \psProjection[object=texte,plan=R0,
518 text=tout aussi bien,]
519 %
520 \psSolid[object=ruban,name=ruban1,base=-1.5 3 2 3]
521 \psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90]
522 \psProjection[object=texte,plan=R0,
523 text=et alors je,]
524 \psSolid[object=ruban,name=ruban1,base=-8 -8 -8 7]
525 \psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90]
526 \psProjection[object=texte,plan=R0,
527 text=les figuiers dans les jardins de l'Alameda et toutes,]
528 %
529 \psSolid[object=ruban,name=ruban1,base=-6 -6 -6 5]
530 \psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90]
531 \psProjection[object=texte,plan=R0,
532 text=et une Fleur de la montagne oui,]
533 %
534 \psSolid[object=ruban,name=ruban1,base=-3 -4 -3 4]
535 \psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90]
536 \psProjection[object=texte,plan=R0,
537 text=et comme il m'a embrass\'{e}e,]
538 %
539 \psSolid[object=ruban,name=ruban1,base=-1.5 -2 -1.5 3]
540 \psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90]
541 \psProjection[object=texte,plan=R0,
542 text=lui qu'un autre,]
543 %
544 \composeSolid
545 }
546
547 We project a poem, verse by verse, onto 4 faces of a cube. It is
548 necessary to use the option \texttt{solidmemory} at the beginning
549 \begin{verbatim}
550 \psset{solidmemory}
551 \psSolid[object=cube,a=8,name=A1](0,0,4.2)%
552 \end{verbatim}
553 of the code. We then define the cube, which is memorised with the
554 help of the command \texttt{name=A}:
555
556 \begin{verbatim}
557 \psset{solidmemory}
558 \psProjection[object=texte,text=po\`{e}me,fontsize=30,plan=P0](0,3)%
559 \psSolid[object=cube,a=8,name=A](0,0,4.2)%
560 \end{verbatim}
561
562 The number of each face needs to be known---from a previous run
563 of the code with the option \texttt{\Lkeyword{numfaces}=\Lkeyval{all}}. The following
564 commands:
565
566
567 \begin{verbatim}
568 \psSolid[object=plan,action=none,definition=solidface,args=A 0,name=P0]%
569 \psProjection[object=texte,text=po\`{e}me,fontsize=30,plan=P0](0,3)%
570 \end{verbatim}
571 define the plane $P0$ as the oriented plane of the face with index
572 number 0 of the solid $A$, before the word \texttt{po\`{e}me} is
573 projected onto $P0$, with a font size of 30~pts, to the point with
574 coordinates $(0,3)$ (within the coordinate system of that plane).
575 We could have changed the orientation of the text to
576 \texttt{phi=-90} for example, in the one or other of the commands.
577
578 By default, if the face is not visible, its text stays hidden. By
579 putting \Lkeyword{visibility} in the options, the text is shown when
580 it would otherwise not be, as in the following example.
581
582 You must not forget to write \texttt{$\backslash$composeSolid} at
583 the end of the text-writing commands for all these lines to be
584 taken into account. Any other PStricks command will have
585 the usual effect and \verb+\composeSolid+ will be unnecessary.
586
587
588
589
590 \begin{center}
591 \psset{viewpoint=40 20 30 rtp2xyz,Decran=16}
592 \JuangJie \hfil
593 \psset{viewpoint=40 110 30 rtp2xyz,Decran=16}
594 \JuangJie
595 \end{center}
596 \begin{center}
597 \psset{viewpoint=40 200 30 rtp2xyz,Decran=16}
598 \JuangJie\hfil
599 \psset{viewpoint=40 290 30 rtp2xyz,Decran=16}
600 \JuangJie
601 \end{center}
602
603
604 \begin{center}
605 \begin{pspicture}(-8,-6)(8,3)
606 \psset{lightsrc=-15 -9 5}
607 \psframe(-8,-6)(8,3)
608 \psset{viewpoint=20 -150 30 rtp2xyz,Decran=11}\MollyBloom
609 \end{pspicture}
610 \end{center}
611 \begin{center}
612 \begin{pspicture}(-8,-6)(8,7)
613 \psset{lightsrc=0 0 3}
614 \psframe(-8,-6)(8,7)
615 \psset{viewpoint=6 -150 89.9 rtp2xyz,Decran=2.8}\MollyBloom
616 \end{pspicture}
617 \end{center}
618
619 \endinput

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.