Initialisation du projet pst-solides3d.git (SVN revision 142)
[pst-solides3d.git] / tests / test_02.tex
1 \documentclass{article}
2 \usepackage{pst-solides3d,pst-node,pst-plot,multido,url}
3 \usepackage[latin1]{inputenc}
4 \usepackage[T1]{fontenc}
5 \usepackage{colortbl}
6 \usepackage{array}
7 \usepackage[a4paper,bottom=2.5cm,top=2cm]{geometry}
8 %%\usepackage[frenchle]{babel}
9 \makeatletter
10
11 \title{\texttt{pst-solides3d} :\\
12 Test 1}
13 \date{\today }
14 \begin{document}
15 \maketitle
16
17 %\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz}
18 \psset{viewpoint=50 20 30 rtp2xyz}
19
20 \section {Test affinage avec PSTricks}
21
22 1 seule face, en gardant la face centrale
23 \begin{center}
24 \psset{unit=0.75}
25 \psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=50}
26 \begin{pspicture*}(-5,-4)(6,5)
27 \psframe(-5,-4)(6,5)
28 \psSolid[object=cube,
29 fillcolor=red,
30 affinagerm,
31 fcolor=Yellow,
32 affinage=0]
33 \end{pspicture*}
34 \end{center}
35
36 1 seule face
37 \begin{center}
38 \psset{unit=0.75}
39 \psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=50}
40 \begin{pspicture*}(-5,-4)(6,5)
41 \psframe(-5,-4)(6,5)
42 \psSolid[object=cube,
43 fillcolor=cyan,
44 affinage=0]
45 \end{pspicture*}
46 \end{center}
47
48 toutes les faces
49 \begin{center}
50 \psset{unit=0.75}
51 \psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=50}
52 \begin{pspicture*}(-5,-4)(6,5)
53 \psframe(-5,-4)(6,5)
54 \psSolid[object=cube,
55 fillcolor=cyan,
56 affinagecoeff=.5,
57 affinagerm,
58 fcolor=.5 .setopacityalpha Yellow,
59 hollow,
60 affinage=all]
61 \end{pspicture*}
62 \end{center}
63
64
65 \section {Test affinage avec jps}
66 1 seule face
67
68 \begin{center}
69 \psset{unit=0.75}
70 \psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=50}
71 \begin{pspicture*}(-5,-4)(6,9)
72 \psframe(-5,-4)(6,9)
73 \codejps{
74 5 newcube
75 dup .5 0 solidaffine
76 %%dup [.5 .6] solidputhuecolors %% ne fonctionne pas
77 dup {[.5 .6]} exec solidputhuecolors %% fonctionne
78 drawsolid*
79 }
80 \end{pspicture*}
81 \end{center}
82
83 Toutes les faces
84
85 \begin{center}
86 \psset{unit=0.75}
87 \psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=50}
88 \begin{pspicture*}(-5,-4)(6,9)
89 \psframe(-5,-4)(6,9)
90 \codejps{
91 5 newcube
92 dup .5 solidaffine
93 %%dup [.5 .6] solidputhuecolors %% ne fonctionne pas
94 dup {[.5 .6]} exec solidputhuecolors %% fonctionne
95 drawsolid*
96 }
97 \end{pspicture*}
98 \end{center}
99
100 \section {Test chanfreinage avec PSTricks}
101
102 \begin{center}
103 \psset{unit=0.75}
104 \psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=50}
105 \begin{pspicture*}(-5,-4)(6,5)
106 \psframe(-5,-4)(6,5)
107 \psSolid[object=cube,
108 a=5,
109 fillcolor=red,
110 chanfrein,
111 chanfreincoeff=.2,
112 ]
113 \end{pspicture*}
114 \end{center}
115
116 \end{document}

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.