Retour

Source de pst-solides3d-doc.tex

Fichier TeX
\documentclass{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[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{framed}
\usepackage[frenchb]{babel}
\listfiles
\DeclareFixedFont{\timesnormal}{T1}{ptm}{m}{n}{2cm}
\raggedbottom
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% de nouvelles flèches de Christophe FOUREY
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
% http://tug.org/mailman/htdig/pstricks/2007/004294.html
% v : Vee arrow (inside)
% V : Vee arrow (outside)
% f : Filled vee arrow (inside)
% F : Filled vee arrow (outside)
\edef\pst@arrowtable{\pst@arrowtable,v-v,V-V,f-f,F-F}

% Vee arrow
\def\psset@veearrowlength#1{\pst@getlength{#1}\psk@veearrowlength}
\psset@veearrowlength{3mm} % default projected length
\def\psset@veearrowangle#1{\pst@getangle{#1}\psk@veearrowangle}
\psset@veearrowangle{30} % default angle
\def\psset@veearrowlinewidth#1{\pst@getlength{#1}\psk@veearrowlinewidth}
\psset@veearrowlinewidth{.35mm} % default vee arrow line width

% Filled vee arrow
\def\psset@filledveearrowlength#1{\pst@getlength{#1}
\psk@filledveearrowlength}
\psset@filledveearrowlength{3mm} % default projected length
\def\psset@filledveearrowangle#1{\pst@getangle{#1}
\psk@filledveearrowangle}
\psset@filledveearrowangle{15} % default angle
\def\psset@filledveearrowlinewidth#1{\pst@getlength{#1}
\psk@filledveearrowlinewidth}
\psset@filledveearrowlinewidth{.35mm} % default vee arrow line width

\pst@def{VeeArrow}<%
     1 setlinecap           % round caps
     1 setlinejoin          % round join
     setlinewidth           % vee arrow line width
     /y ED              % projected length
     2 div /a ED                % angle (divide by 2)
     /t ED              % false = inside, true = outside
     a sin a cos div y mul /x ED        % perpendicular length : x=tan(a).y
     t { 1 -1 scale } if            % if outside : symmetry
     x neg y moveto         % point #1
     0 0 L              % point #2
     x y L              % point #3
     {closepath gsave fill grestore} if % if filled : close and fill
     stroke             % draw line
     0 t {y 2 mul} {0} ifelse moveto>   % if outside : twice longer line

% VeeArrow : filled?   outside?   (total) angle   (projected) length   (arrow) line width

\@namedef{psas@v}{%
   false false \psk@veearrowangle \psk@veearrowlength
\psk@veearrowlinewidth \tx@VeeArrow}

\@namedef{psas@V}{%
   false true \psk@veearrowangle \psk@veearrowlength
\psk@veearrowlinewidth \tx@VeeArrow}

\@namedef{psas@f}{%
   true false \psk@filledveearrowangle \psk@filledveearrowlength
\psk@filledveearrowlinewidth \tx@VeeArrow}

\@namedef{psas@F}{%
   true true \psk@filledveearrowangle \psk@filledveearrowlength
\psk@filledveearrowlinewidth \tx@VeeArrow}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% adapté de \psRandom du package pstricks-add
%% pour rendre aléatoire la taille des étoiles
%% Manuel Luque
\newdimen\pssizeStar
\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}}


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

\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>}.}}
\date{6 juillet 2\,008}
\begin{document}
\maketitle


%\input[tore-damier}
%\input{methane}
%\input{anneaux}
%\vfill
%\input{S2O3}
%\input \datapath init3d
%\vfill
%\newpage
\tableofcontents

\newpage

%%\end {document}

\input \datapath par-constitution
\input \datapath par-preambule
\input \datapath par-presentation
\input \datapath par-changements


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


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

\input \datapath par-couleurs
\input \datapath par-colorierfacettes
\input \datapath par-opacity
\input \datapath par-definitionmaillage
\input \datapath par-modes

\input \datapath par-eclairageponctuel
\input \datapath par-tronque
\input \datapath par-affinage
\input \datapath par-chanfrein
\input \datapath par-transform
\input \datapath par-lignedeniveau


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

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


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

\input \datapath par-courbeR3
\input \datapath par-tube
\input \datapath par-prisme
\input \datapath par-new
\input \datapath par-face
\input \datapath par-ruban
%\newpage
\input \datapath par-anneaux
\input \datapath par-cylindres-cones
\input \datapath par-surfacesparametrees


\chapter{Surfaces définies par une fonction $z=f(x,y)$}
\input \datapath par-surfaces


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


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


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

\chapter{Annexe}
\input \datapath par-parametres

\end{document}