\documentclass[a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{pst-solides3d}

\title{\texttt{pst-solides3d} :\\
       Test}
\date{\today }
\begin{document}
\pagestyle {empty}
\maketitle

\section {Test basique}

\begin{verbatim}
   tablez=2 3 4 5,
   zcolor=(color1) (color2) (Yellow) (Apricot) (CadetBlue)
\end{verbatim}

\begin{pspicture}(-4,-1)(4,7.5)
\psset{viewpoint=50 30 20 rtp2xyz}
\psset{solidmemory}
\psset[pst-solides3d]{color1=red!60}
\psset[pst-solides3d]{color2=red!20}
\defFunction[algebraic]{f}(x,y)
   {(x^2+y^2)/4}
   {}
   {}
\psSolid[object=surface*,
   base=-4 4 -4 4,
   r=5,
   ngrid=1. .5,
   function=f,
   name=A,
   color1=red!20,
   color2=red!60,
   tablez=2 3 4 5, 
   zcolor=(color1) (color2) (Yellow) (Apricot) (CadetBlue)
]
\end{pspicture}

\newpage
\section {Dégradés de couleurs}
\subsection {Couleurs nommées}

\begin{verbatim}
   tablez=0 .2 6 {} for,
   zcolor=(Apricot) (CadetBlue)
\end{verbatim}

\begin{pspicture}(-4,-1)(4,7.5)
\psset{viewpoint=50 30 20 rtp2xyz}
\psset{solidmemory}
\psset[pst-solides3d]{color1=red!60}
\psset[pst-solides3d]{color2=red!20}
\defFunction[algebraic]{f}(x,y)
   {(x^2+y^2)/4}
   {}
   {}
\psSolid[object=surface*,
   base=-4 4 -4 4,
   r=5,
   ngrid=1. .5,
   function=f,
   name=A,
   color1=red!20,
   color2=red!60,
   tablez=0 .2 6 {} for,
   zcolor=(Apricot) (CadetBlue)
]
\end{pspicture}

\newpage
\begin{verbatim}
   color1=red!20,
   color2=red!60,
   tablez=0 .2 5 {} for,
   zcolor=(color1) (color2)
\end{verbatim}

\begin{pspicture}(-4,-1)(4,7.5)
\psset{viewpoint=50 30 20 rtp2xyz}
\psset{solidmemory}
\psset[pst-solides3d]{color1=red!60}
\psset[pst-solides3d]{color2=red!20}
\defFunction[algebraic]{f}(x,y)
   {(x^2+y^2)/4}
   {}
   {}
\psSolid[object=surface*,
   base=-4 4 -4 4,
   r=5,
   ngrid=1. .5,
   function=f,
   name=A,
   color1=red!20,
   color2=red!60,
   tablez=0 .2 5 {} for,
   zcolor=(color1) (color2)
]
\end{pspicture}

\newpage
\subsection {Espace RGB}

\begin{verbatim}
   tablez=2 3 4 5,
   zcolor=1 0 0 0 0 1
\end{verbatim}

\begin{pspicture}(-4,-1)(4,7.5)
\psset{viewpoint=50 30 20 rtp2xyz}
\psset{solidmemory}
\psset[pst-solides3d]{color1=red!60}
\psset[pst-solides3d]{color2=red!20}
\defFunction[algebraic]{f}(x,y)
   {(x^2+y^2)/4}
   {}
   {}
\psSolid[object=surface*,
   base=-4 4 -4 4,
   r=5,
   ngrid=1. .5,
   function=f,
   name=A,
   tablez=2 3 4 5,
   zcolor=1 0 0 0 0 1
]
\end{pspicture}



\subsection {Espace CMYK}

\begin{verbatim}
   tablez=2 3 4 5,
   zcolor=1 0 0 0 0 1 0 0
\end{verbatim}

\begin{pspicture}(-4,-1)(4,7.5)
\psset{viewpoint=50 30 20 rtp2xyz}
\psset{solidmemory}
\psset[pst-solides3d]{color1=red!60}
\psset[pst-solides3d]{color2=red!20}
\defFunction[algebraic]{f}(x,y)
   {(x^2+y^2)/4}
   {}
   {}
\psSolid[object=surface*,
   base=-4 4 -4 4,
   r=5,
   ngrid=1. .5,
   function=f,
   name=A,
   tablez=2 3 4 5,
   zcolor=1 0 0 0 0 1 0 0
]
\end{pspicture}

\subsection {Espace HSB saturation et brillance max}

\begin{verbatim}
   tablez=2 3 4 5,
   zcolor=.5 .6
\end{verbatim}
\begin{pspicture}(-4,-1)(4,7.5)
\psset{viewpoint=50 30 20 rtp2xyz}
\psset{solidmemory}
\psset[pst-solides3d]{color1=red!60}
\psset[pst-solides3d]{color2=red!20}
\defFunction[algebraic]{f}(x,y)
   {(x^2+y^2)/4}
   {}
   {}
\psSolid[object=surface*,
   base=-4 4 -4 4,
   r=5,
   ngrid=1. .5,
   function=f,
   name=A,
   tablez=2 3 4 5,
   zcolor=.5 .6
]
\end{pspicture}


\subsection {Espace HSB saturation et brillance fixes}

\begin{verbatim}
   tablez=2 3 4 5,
   zcolor=.5 .6 .8 .7
\end{verbatim}
\begin{pspicture}(-4,-1)(4,7.5)
\psset{viewpoint=50 30 20 rtp2xyz}
\psset{solidmemory}
\psset[pst-solides3d]{color1=red!60}
\psset[pst-solides3d]{color2=red!20}
\defFunction[algebraic]{f}(x,y)
   {(x^2+y^2)/4}
   {}
   {}
\psSolid[object=surface*,
   base=-4 4 -4 4,
   r=5,
   ngrid=1. .5,
   function=f,
   name=A,
   tablez=2 3 4 5,
   zcolor=.5 .6 .8 .7
]
\end{pspicture}

\subsection {Espace HSB, cas général}

\begin{verbatim}
   tablez=2 3 4 5,
   zcolor=0 .8 1 1 1 .7 (hsb)
\end{verbatim}
\begin{pspicture}(-4,-1)(4,7.5)
\psset{viewpoint=50 30 20 rtp2xyz}
\psset{solidmemory}
\psset[pst-solides3d]{color1=red!60}
\psset[pst-solides3d]{color2=red!20}
\defFunction[algebraic]{f}(x,y)
   {(x^2+y^2)/4}
   {}
   {}
\psSolid[object=surface*,
   base=-4 4 -4 4,
   r=5,
   ngrid=1. .5,
   function=f,
   name=A,
   tablez=2 3 4 5,
   zcolor=0 .8 1 1 1 .7 (hsb)
]
\end{pspicture}

\end{document}
