A prism is determined by two parameters:
\begin{itemize}
\item The base of the prism can be defined by the coordinates of the vertices
in the $xy$-plane. Note that it is necessary that the four
vertices be given in counterclockwise order with respect to the barycentre of
the base;
\item the direction of the prism axis (the components of the shearing vector).
\end{itemize}
\subsubsection{Example 1: a right and \Index{oblique prisms} with polygonal section}
\subsubsection{Example 2: a \Index{right prism} with cross-section a rounded square}
\begin{LTXexample}[width=6.5cm]
\psset{unit=0.5cm}
\psset{lightsrc=10 -20 50,viewpoint=50 -20 30 rtp2xyz,Decran=50}
\begin{pspicture}(-5,-4)(3,9)
\psSolid[object=grille,base=-4 4 -4 4,action=draw]
\psSolid[object=prisme,h=6,fillcolor=yellow,
base=
0 10 90 {/i exch def i cos 1 add i sin 1 add } for
90 10 180 {/i exch def i cos 1 sub i sin 1 add} for
180 10 270 {/i exch def i cos 1 sub i sin 1 sub} for
270 10 360 {/i exch def i cos 1 add i sin 1 sub} for]
\axesIIID(4,4,6)(6,6,8)
\end{pspicture}
\end{LTXexample}
\subsubsection{Example 4: a prism with an elliptic section}
We draw the exterior face (semicircle of radius 3~cm) in counterclockwise
order: \verb!0 pi {F} CourbeR2+!
Then the interior face (semicircle of radius 2{.}5~cm), is drawn in clockwise order:
\verb!pi 0 {G} CourbeR2+!
We can turn the solid $-90^{\mathrm{o}}$ and place it at the point $(0,-6,3)$.
If we use the \verb+algebraic+ option to define the functions $F$
and $G$, the functions $\sin$ and $\cos$ are in radians.
We wrote above that the first four vertices must be given in counterclockwise order
with respect to the barycentre of the vertices of the base. In fact, this is the
default version of the following rule: If the base has $n+1$ vertices,
and if $G$ is their barycentre,
then $(s_0,s_1)$ on one hand and $(s_{n-1},s_n)$ on the other, should be
in counterclockwise order with respect to $G$.
This rule puts constraints on the coding of the base of a prism which
sometimes renders the latter unaesthetically.
For this reason we have introduced the argument \Lkeyword{decal} (default value$=-2$)
which allows us to consider the list of vertices of the base as a circular file
which you will shift round if needed.