1 \section {Solide ruban
}
3 Le ruban est un paravent posé sur le sol horizontal. La base du paravent
4 est définie sur le plan $Oxy$ par les coordonnées des sommets placés dans
5 le sens trigonométrique par le paramètre
\texttt{base
} :
7 \psSolid[object=ruban,h=
3,base=x1 y1 x2 y2 x3 y3 ...xn yn,ngrid=n
](
0,
0,
0)
%
10 \subsection{Un simple paravent
}
11 \begin{minipage
}{0.6\linewidth}
12 \psset{lightsrc=
10 0 10,viewpoint=
50 -
20 30 rtp2xyz,Decran=
50,unit=
0.75}
13 \begin{pspicture
}(-
5.5,-
4.5)(
7,
5)
14 \psframe(-
5.5,-
4.5)(
7,
5)
15 \psSolid[object=grille,base=-
4 6 -
4 4,action=draw,linecolor=gray
](
0,
0,
0)
16 \psSolid[object=ruban,h=
3,fillcolor=red!
50,
22 \axesIIID(
0,
2,
0)(
6,
6,
4.5)
26 \begin{minipage
}{0.49\linewidth}
28 \begin{pspicture
}(-
5,-
4)(
6,
7)
31 object=grille,base=-
4 6 -
4 4,
41 \axesIIID(
0,
2,
0)(
6,
6,
6)
47 \subsection{Un paravent sinusoïdal
}
51 \psset{lightsrc=
10 30 10,viewpoint=
50 50 20 rtp2xyz,Decran=
50}
52 \begin{pspicture
}(-
10,-
6)(
12,
8)
53 \psframe(-
10,-
6)(
12,
7)
54 \defFunction{funcF
}(t)
{2 t
4 mul cos mul
}{t
20 div
}{}
55 \psSolid[object=grille,base=-
6 6 -
10 10,action=draw,linecolor=gray
](
0,
0,
0)
56 \psSolid[object=ruban,h=
2,fillcolor=red!
50,
58 base=-
200 200 {funcF
} CourbeR2+,
%% -200 5 200 {/Angle ED 2 Angle 4 mul cos mul Angle 20 div } for,
60 \axesIIID(
5,
10,
0)(
7,
11,
6)
66 \psset{lightsrc=
10 30 10,viewpoint=
50 50 20 rtp2xyz,Decran=
50}
67 \begin{pspicture
}(-
10,-
5)(
12,
7)
68 \psframe(-
10,-
5)(
12,
7)
69 \defFunction{funcF
}(t)
{2 t
4 mul cos mul
}{t
20 div
}{}
70 \psSolid[object=grille,base=-
6 6 -
10 10,action=draw,linecolor=gray
](
0,
0,
0)
71 \psSolid[object=ruban,h=
2,fillcolor=red!
50,
73 base=-
200 200 {funcF
} CourbeR2+,
75 \axesIIID(
5,
10,
0)(
7,
11,
6)
81 \subsection{Une surface ondulée
}
83 C'est le même objet que précédemment en lui faisant subir une rotation de
84 $
90^
{\mathrm{o
}}$ autour de $Oy$.
87 \psset{lightsrc=
10 30 10,viewpoint=
50 50 20 rtp2xyz,Decran=
30}
88 \begin{pspicture
}(-
14,-
7)(
8,
5)
90 \defFunction{funcF
}(t)
{t
4 mul cos
}{t
20 div
}{}
91 \psSolid[object=grille,base=
0 16 -
10 10,action=draw,linecolor=gray
](
0,
0,
0)
92 \psSolid[object=ruban,h=
16,fillcolor=red!
50,RotY=
90,incolor=green!
20,
94 base=-
200 200 {funcF
} CourbeR2+,
96 \axesIIID(
16,
10,
0)(
20,
12,
6)
101 \psset{lightsrc=
10 30 10,viewpoint=
50 50 20 rtp2xyz,Decran=
30}
102 \begin{pspicture
}(-
14,-
7)(
8,
7)
103 \defFunction{funcF
}(t)
{t
4 mul cos
}{t
20 div
}{}
104 \psSolid[object=grille,base=
0 16 -
10 10,action=draw,linecolor=gray
](
0,
0,
0)
105 \psSolid[object=ruban,h=
16,fillcolor=red!
50,RotY=
90,incolor=green!
20,
107 base=-
200 200 {funcF
} CourbeR2+,
109 \psframe(-
14,-
7)(
8,
7)
110 \axesIIID(
16,
10,
0)(
20,
12,
6)
113 On peut ensuite l'imaginer comme toit en tôle ondulée d'un abri quelconque.
116 \subsection{Un paravent étoilé : version
1}
117 Le contour du paravent est défini dans une boucle :
119 base=
0 72 360 {/Angle ED
5 Angle cos mul
5 Angle sin mul
120 3 Angle
36 add cos mul
3 Angle
36 add sin mul
} for
122 la surface bleutée du fond est définie à l'aide d'un polygone dont les
123 sommets sont calculés par la commande \\
\verb+
\psPoint(x,y,z)
{P
}+
125 \multido{\iA=
0+
72,
\iB=
36+
72,
\i=
0+
1}{6}{%
126 \psPoint(
\iA\space cos
5 mul,
\iA\space sin
5 mul,
0)
{P
\i}
127 \psPoint(
\iB\space cos
3 mul,
\iB\space sin
3 mul,
0)
{p
\i}
129 \pspolygon[fillstyle=solid,fillcolor=blue!
50](P0)(p0)(P1)(p1)(P2)(p2)
130 (P3)(p3)(P4)(p4)(P5)(p5)
134 \psset{lightsrc=
10 0 10,viewpoint=
50 20 30 rtp2xyz,Decran=
50}
135 \begin{pspicture
}(-
9,-
5)(
9,
7)
137 \multido{\iA=
0+
72,
\iB=
36+
72,
\i=
0+
1}{6}{%
138 \psPoint(
\iA\space cos
5 mul,
\iA\space sin
5 mul,
0)
{P
\i}
139 \psPoint(
\iB\space cos
3 mul,
\iB\space sin
3 mul,
0)
{p
\i}
141 \pspolygon[fillstyle=solid,fillcolor=blue!
50](P0)(p0)(P1)(p1)(P2)(p2)(P3)(p3)(P4)(p4)(P5)(p5)
142 \defFunction{funcF
}(t)
{t cos
5 mul
}{t sin
5 mul
}{}
143 \defFunction{funcG
}(t)
{t
36 add cos
3 mul
}{t
36 add sin
3 mul
}{}
144 \psSolid[object=grille,base=-
6 6 -
6 6,action=draw,linecolor=gray
](
0,
0,
0)
145 \psSolid[object=ruban,h=
1,fillcolor=red!
50,
146 base=
0 72 360 {/Angle exch def Angle funcF Angle funcG
} for,
150 \axesIIID(
5,
5,
0)(
6,
6,
6)
154 \begin{pspicture
}(-
9,-
5)(
9,
7)
156 \multido{\iA=
0+
72,
\iB=
36+
72,
\i=
0+
1}{6}{%
157 \psPoint(
\iA\space cos
5 mul,
\iA\space sin
5 mul,
0)
{P
\i}
158 \psPoint(
\iB\space cos
3 mul,
\iB\space sin
3 mul,
0)
{p
\i}
160 \pspolygon[fillstyle=solid,fillcolor=blue!
50]
161 (P0)(p0)(P1)(p1)(P2)(p2)(P3)(p3)(P4)(p4)(P5)(p5)
162 \defFunction{funcF
}(t)
{t cos
5 mul
}{t sin
5 mul
}{}
163 \defFunction{funcG
}(t)
{t
36 add cos
3 mul
}{t
36 add sin
3 mul
}{}
164 \psSolid[object=grille,base=-
6 6 -
6 6,action=draw,linecolor=gray
](
0,
0,
0)
165 \psSolid[object=ruban,h=
1,fillcolor=red!
50,
166 base=
0 72 360 {/Angle exch def Angle funcF Angle funcG
} for,
167 num=
0 1 2 3, show=
0 1 2 3, ngrid=
2](
0,
0,
0)
168 \axesIIID(
5,
5,
0)(
6,
6,
6)
173 \subsection{Un paravent étoilé : version
2}
175 Le fond du récipient est défini par l'objet
\texttt{face
} avec l'option
179 \psset{lightsrc=
10 0 10,viewpoint=
50 -
20 20 rtp2xyz,Decran=
50}
180 \begin{pspicture
}(-
9,-
4)(
9,
7)
182 \defFunction{funcF
}(t)
{t cos
5 mul
}{t sin
5 mul
}{}
183 \defFunction{funcG
}(t)
{t
36 add cos
3 mul
}{t
36 add sin
3 mul
}{}
184 \psSolid[object=face,fillcolor=blue!
50,
186 base=
0 72 360 {/Angle exch def Angle funcF Angle funcG
} for,
188 \psSolid[object=grille,base=-
6 6 -
6 6,action=draw,linecolor=gray
](
0,
0,
0)
189 \psSolid[object=ruban,h=
1,fillcolor=red!
50,
190 base=
0 72 360 {/Angle exch def Angle funcF Angle funcG
} for,
192 \axesIIID(
5,
5,
0)(
6,
6,
6)
197 \psset{lightsrc=
10 0 10,viewpoint=
50 -
20 20 rtp2xyz,Decran=
50}
198 \begin{pspicture
}(-
9,-
4)(
9,
7)
200 \defFunction{funcF
}(t)
{t cos
5 mul
}{t sin
5 mul
}{}
201 \defFunction{funcG
}(t)
{t
36 add cos
3 mul
}{t
36 add sin
3 mul
}{}
202 \psSolid[object=face,fillcolor=blue!
50,
204 base=
0 72 360 {/Angle exch def Angle funcF Angle funcG
} for,
206 \psSolid[object=grille,base=-
6 6 -
6 6,action=draw,linecolor=gray
](
0,
0,
0)
207 \psSolid[object=ruban,h=
1,fillcolor=red!
50,
208 base=
0 72 360 {/Angle exch def Angle funcF Angle funcG
} for,
210 \axesIIID(
5,
5,
0)(
6,
6,
6)