Initialisation du projet pst-solides3d.git (SVN revision 142)
[pst-solides3d.git] / doc-en / .svn / text-base / par-chanfrein-en.tex.svn-base
1 \section{\Index{Chamfering} a solid}
2
3 \psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=50}
4 \begin{LTXexample}[width=6cm]
5 \psset{unit=0.5}
6 \begin{pspicture*}(-4,-4)(4,4)
7 \psSolid[object=cube,
8    a=5,
9    fillcolor=red]
10 \end{pspicture*}
11 \end{LTXexample}
12
13
14 \begin{LTXexample}[width=6cm]
15 \psset{unit=0.5}
16 \begin{pspicture*}(-4,-4)(4,4)
17 \psSolid[object=cube,
18    a=5,
19    fillcolor=red,
20    chanfrein,
21    chanfreincoeff=.6]
22 \end{pspicture*}
23 \end{LTXexample}
24
25 The option \Lkeyword{chanfrein} allows us to \Index{chamfer} a solid. This option
26 uses the key \Lkeyword{chanfreincoeff} (value $0.8$ by default) which indicates the
27 ratio $k$ with ($0<k<1$). This ratio is the one of a centre dilation with
28 the centre in the middle of the chosen face.
29
30 \psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=30}
31 \begin{LTXexample}[width=6cm]
32 \psset{unit=0.5}
33 \begin{pspicture*}(-4,-4)(4,4)
34 \psSolid[object=dodecahedron,
35    a=5,
36    fillcolor=cyan]
37 \end{pspicture*}
38 \end{LTXexample}
39
40 \psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=30}
41 \begin{LTXexample}[width=6cm]
42 \psset{unit=0.5}
43 \begin{pspicture*}(-4,-4)(4,4)
44 \psSolid[object=dodecahedron,
45    a=5,
46    fillcolor=cyan,
47    chanfrein,
48    chanfreincoeff=.8]
49 \end{pspicture*}
50 \end{LTXexample}
51 %\newpage
52
53 \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.