Initialisation du projet pst-solides3d.git (SVN revision 142)
[pst-solides3d.git] / doc-en / par-commandestrace-en.tex
1 \section{Commands for drawing}
2
3 The parameter for \Index{drawing} comes with the key value \Lkeyword{action} within the command
4 \Lcs{psSolid}.
5
6 Four values are possible:
7 \begin{compactitem}
8 \item \Lkeyval{none}: nothing is drawn.
9 \item \Lkeyval{draw}: draws the solid as a framework and sets up dashed lines for the hidden edges.
10 \item \Lkeyval{draw*}: draws the solid with dashed lines for the hidden edges and colours the visible faces.
11 \item \Lkeyword{draw**}: draws the solid with a painting algorithm, without the
12 hidden edges and with colouration of the visible faces.
13 \end{compactitem}
14 \encadre{The key values \Lkeyval{draw} and \Lkeyword{draw*} only make sense for convex solids.}
15
16 \begin{center}
17 %%
18
19 \psset{viewpoint=50 -20 30 rtp2xyz}
20 %%
21 \hfil
22 \begin{pspicture}(-2.5,-2.5)(2.5,2.5)
23 \psframe(-2.5,-2.5)(2.5,2.5)
24 \psset{Decran=20}
25 \psSolid[object=cube,action=draw,RotZ=20]%
26 \rput(-1,-2){\texttt{draw}}
27 \end{pspicture}
28 \hfil
29 %%
30 \begin{pspicture}(-2.5,-2.5)(2.5,2.5)
31 \psframe(-2.5,-2.5)(2.5,2.5)
32 \psset{Decran=20}
33 \psSolid[object=cube,action=draw*,fillcolor=magenta!20,RotZ=20]%
34 \rput(-1,-2){\texttt{draw*}}
35 \end{pspicture}
36 \hfil
37 %%
38 \begin{pspicture}(-2.5,-2.5)(2.5,2.5)
39 \psframe(-2.5,-2.5)(2.5,2.5)
40 \psset{Decran=20}
41 \psSolid[object=cube,fillcolor=magenta!20,RotZ=20]%
42 \rput(-1,-2){\texttt{draw**}}
43 \end{pspicture}
44 \hfil
45 %%
46 \end{center}
47
48 \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.