\documentclass[twoside]{book}
\usepackage[dvipsnames,svgnames]{pstricks}
\usepackage{pst-plot,pst-eucl}
\usepackage{pstricks-add,pst-solides3d}
\let\PSTfileversion\fileversion
\let\PSTfiledate\filedate
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{manfnt}
\usepackage{lmodern}
\usepackage[garamond]{mathdesign}
%\renewcommand{\ttdefault}{lmtt}
\usepackage{colortbl}
\usepackage{multicol}
\usepackage{longtable}
\usepackage{array}
\usepackage{amsmath}
\usepackage{arrayjob}
\usepackage{url}
\usepackage[a4paper,dvips,hmargin=2cm,vmargin=3cm]{geometry}
\usepackage[colorlinks=true,dvips]{hyperref}
\usepackage{showexpl}
\usepackage{ragged2e}
\usepackage{framed}
\usepackage[frenchb]{babel}
\listfiles
\DeclareFixedFont{\timesnormal}{T1}{ptm}{m}{n}{2cm}
\raggedbottom
%% adapté de \psRandom du package pstricks-add
%% pour rendre aléatoire la taille des étoiles
%% Manuel Luque
\newdimen\pssizeStar
\makeatletter
\def\psset@sizeStar#1{\pssetlength\pssizeStar{#1}}
\psset@sizeStar{1pt}
\def\psRandomStar{\pst@object{psRandomStar}}%
\def\psRandomStar@i{\@ifnextchar({\psRandomStar@ii}{\psRandomStar@iii(0,0)(1,1)}}
\def\psRandomStar@ii(#1){\@ifnextchar({\psRandomStar@iii(#1)}{\psRandomStar@iii(0,0)(#1)}}
\def\psRandomStar@iii(#1)(#2)#3{%
  \def\pst@tempA{#3}%
  \ifx\pst@tempA\pst@empty\psclip{\psframe(#2)}\else\psclip{#3}\fi
  \pst@getcoor{#1}\pst@tempA
  \pst@getcoor{#2}\pst@tempB
  \begin@SpecialObj
  \addto@pscode{
    \pst@tempA\space /yMin exch def
    /xMin exch def
    \pst@tempB\space /yMax exch def
    /xMax exch def
    /dy yMax yMin sub def
    /dx xMax xMin sub def
    rrand srand                 % initializes the random generator
    /getRandReal { rand 2147483647 div } def
     \psk@randomPoints {
    /DS \pst@number\pssizeStar\space getRandReal mul def
    \@nameuse{psds@\psk@dotstyle}
     \ifPst@color getRandReal 1 1 sethsbcolor \fi
     getRandReal dx mul xMin add
     getRandReal dy mul yMin add
     Dot
     \ifx\psk@fillstyle\psfs@solid fill \fi stroke
    } repeat
  }%
  \end@SpecialObj
  \endpsclip
  \ignorespaces
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% macro H.Voss sur :
%%http://tug.org/mailman/htdig/pstricks/2007/004640.html

\def\GetCenter#1{ tx@NodeDict begin /N@#1 load GetCenter end
  \pst@number\psyunit div /#1.y ED
  \pst@number\psxunit div /#1.x ED }
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Jean-Michel Sarlat et Guillaume Connan
\newenvironment{gbar}{%
  \def\FrameCommand{{\color{red}\vrule width 2pt}\colorbox{yellow!30}}%
  \MakeFramed {\advance\hsize-\width \FrameRestore}}%
{\endMakeFramed}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\Cadre[1]{\psframebox[fillstyle=solid,fillcolor=yellow,linecolor={[cmyk]{0,0,1,0.1}}]{\texttt{#1}}}
\newcommand\encadre[1]{\begin{center}
\psframebox[fillstyle=solid,fillcolor=green!33,linecolor=green,linewidth=0.5mm]{
  \begin{minipage}{0.95\textwidth}
  {#1}
  \end{minipage}}
  \end{center}}

\newcommand\toptableau{
\rowcolor{yellow}
  \textbf{solide} & \begin{tabular}{c}
                      \textbf{paramètres}\\
                      \textbf{par défaut}
                      \end{tabular} &
                      \begin{minipage}{4cm}
                      \centerline{\textbf{vue}}
                      \end{minipage}&
                      \begin{minipage}{4cm}
                      \centerline{\textbf{code}}
                      \end{minipage}}

\newarray\colors
\readarray{colors}{%
Apricot&Aquamarine%
&Bittersweet&Black&Blue&BlueGreen&BlueViolet&BrickRed&Brown&BurntOrange%
&CadetBlue&CarnationPink&Cerulean&CornflowerBlue&Cyan&Dandelion&DarkOrchid%
&Emerald&ForestGreen&Fuchsia&Goldenrod&Gray&Green&GreenYellow&JungleGreen%
&Lavender&LimeGreen&Magenta&Mahogany&Maroon&Melon&MidnightBlue&Mulberry%
&NavyBlue&OliveGreen&Orange&OrangeRed&Orchid&Peach&Periwinkle&PineGreen%
&Plum&ProcessBlue&Purple&RawSienna&Red&RedOrange&RedViolet&Rhodamine&RoyalBlue%
&RoyalPurple&RubineRed&Salmon&SeaGreen&Sepia&SkyBlue&SpringGreen&Tan&TealBlue%
&Thistle&Turquoise&Violet&VioletRed&White&WildStrawberry&Yellow&YellowGreen&YellowOrange}


\edef\colorfaces{}%
\multido{\i=0+1}{67}{%
 \checkcolors(\i)
\xdef\colorfaces{\colorfaces\i\space(\cachedata)\space}}

\definecolor{bleuciel}{rgb}{0.78,0.84,0.99}

% pour le dessin du point de vue
\def\PointEcran(#1,#2,#3)#4{% position du point sur l'écran
\pstVerb{/xM #1 def /yM #2 def /zM #3 def
         /kC dE dup mul xM xE mul yM yE mul zM zE mul add add sub
           xV xE mul xM xE mul sub
           yV yE mul yM yE mul sub add
           zV zE mul zM zE mul sub add
           div def
         /x_E kC xV xM sub mul xM add def
         /y_E kC yV yM sub mul yM add def
         /z_E kC zV zM sub mul zM add def}%
\psPoint(x_E,y_E,z_E){#4}}


\title{\texttt{pst-solides3d} :\\
       guide de l'utilisateur
        \\[0.5cm]
{\normalsize v. \PSTfileversion\ (\PSTfiledate)}\\
\input \datapath tintin
%\input \datapath init3d 
}
\author{Jean-Paul \textsc{Vignault}, Manuel \textsc{Luque}, Arnaud
\textsc{Schmittbuhl}\\
{\small
 \url{<jpv@melusine.eu.org>}, \url{<manuel.luque27@gmail.com>},
 \url{<aschmittbuhl@libertysurf.fr>}}
\thanks{Avec la collaboration de :
 Jürgen \textsc{Gilg}\url{<gilg@acrotex.net>},
 Jean-Michel \textsc{Sarlat}\url{<jm.sarlat@gmail.com>},
 Herbert \textsc{Voss}\url{<Herbert.Voss@FU-Berlin.DE>}.}}
\date{\today}

\def\datapath{}%../doc/}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Herbert %%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyfoot{}% delete all
\fancyfoot[LE,RO]{\thepage}
\newcommand\Input[2][\datapath]{\fancyfoot[RE,LO]{{\footnotesize#2}}%
  \begingroup\input{#1#2}\endgroup\par}
% doesnt work with underscores in filename

\begin{document}
\maketitle

\tableofcontents

\newpage

%\end {document}

\Input{par-constitution}
\Input{par-preambule}
\Input{par-presentation}
\Input{par-changements}

\chapter{Commandes de bases}
\Input{par-choixpointdevue}
\Input{par-axes3D}
\newpage
\Input{par-solidespredefinis}
\Input{par-positionnersolide}


\chapter{Les options de \textbackslash{}psSolid}
\Input{par-commandestrace}
\Input{par-solidescreux}
\Input{par-numeroterfacettes}
\Input{par-enleverfacettes}
\Input{par-pointagesommets}

\Input{par-couleurs}
\Input{par-colorierfacettes}
\Input{par-opacity}
\Input{par-definitionmaillage}
\Input{par-modes}

\Input{par-eclairageponctuel}
\Input{par-tronque}
\Input{par-affinage}
\Input{par-chanfrein}
\Input{par-transform}
\Input{par-lignedeniveau}


\chapter{Utilisation de fichiers externes}
\Input{par-datfile}
%\Input{par-offfile
%\Input{par-objfile

\chapter{Quelques objets spécifiques}
%\Input{par-grille
\Input{par-plan}
\Input{par-vecteur}
\Input{par-point}
\Input{par-geode}


\chapter{Fabriquer de nouveaux solides}
\Input{par-codejps}
\Input{par-definirfonction}

\Input{par-courbeR3}
\Input{par-tube}
\Input{par-prisme}
\Input{par-new}
\Input{par-face}
\Input{par-ruban}
%\newpage

\Input{par-anneaux}% Problem with the \Input macro and par-anneaux here
%\fancyfoot[RE,LO]{{\footnotesize par-anneaux}}\input{\datapath par-anneaux}
%\fancyfoot[RE,LO]{}
\clearpage
\Input{par-anneaux2}% Problem with the \Input macro and par-anneaux here


\Input{par-cylindres-cones}


\Input{par-surfacesparametrees}


\chapter{Surfaces définies par une fonction}
\Input{par-surfaces}

\chapter{Utilisation avancée}
\Input{par-nommersolide}
\Input{par-section}
\Input{par-fusion}
\Input{par-fusionjps}


\chapter{Interaction avec PSTricks}
\Input{par-positionnerpointconnu}
\Input{par-ligne3D}
\Input{par-tracerpolygone}
\Input{par-transformpointconnu}
\Input{par-annoterschema}
%%\Input{par-composervue}


\chapter{Projections}
\Input{par-projpresentation}
\Input{par-projectionvisibility}
\Input{par-definirplanquelconque}
\Input{par-projectionpoint}
\Input{par-projectionvecteur}
\Input{par-projectiondroite}
\newpage
\Input{par-projectioncercle}
\Input{par-projectionpolygone}
\Input{par-projectionligne}
\newpage
\Input{par-projectionangledroit}
%% \Input{par-definirfacesolideproj} %% destroy
\Input{par-projectioncourbe}
%% \Input{par-projectionchemin}
\Input{par-projectiontexte}

\appendix
\chapter{Annexe}
\Input{par-parametres}

\nocite{*}
\bgroup
\fancyfoot{}
\RaggedRight
\bibliographystyle{plain}
\bibliography{pst-solides3d-doc}
\egroup

\end{document}
