summaryrefslogtreecommitdiff
path: root/graphics/pstricks/contrib/pst-solides3d/doc/pst-solides3d-doc.tex
blob: 7e829069873422bd89883ddf6e20347a75da8bbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
%\RequirePackage{pdfmanagement-testphase}
%\DeclareDocumentMetadata{}

\listfiles % Writes out the package versions in the log file
\documentclass[%
    11pt,           % normal font size  (default, alias for fontsize=11pt)
    bibtotoc,       % add unnumbered entry for the bibliography to the table
                    % of contents (deprecated, use: toc=bibliography or
                    % bibliography=totoc)
    parskip=half-,        % use one base line vertical inter-paragraph space and
                    % at least 1 em horizontal space at the end of paragraphs
                    % instead of indenting first line of paragraphs
    twoside,        % use twosided layout (default)
    smallheadings,  % use smaller font sizes for headings (but at least
                    % \normalsize) with less vertical above and below headings
                    % (deprecated, use: headings=small)
    1.1headlines,   % set head height to 1.1\baselineskip of \normalsize
                    % (deprecated, use: headlines=1.1)
    french,english,
    usegeometry,
    ]{scrbook}


%\graphicspath{{images/}}
\usepackage[T1]{fontenc}
\usepackage[scale=0.95]{tgpagella}
\usepackage[scale=0.92]{tgheros}
\usepackage[scaled=0.83]{beramono}
\usepackage{amsmath,amssymb} % allows multiple maths-environments
%\usepackage{libertinus}
%\usepackage[scaled=0.9]{beramono}
\usepackage[a4paper,hmargin=2cm,vmargin=3cm]{geometry}    % Flexible and complete interface to document dimensions
\usepackage{scrlayer-scrpage}
\pagestyle{scrheadings}

\usepackage{babel}
\usepackage{makeidx}
\makeindex
%\usepackage{lscape}

\usepackage{biblatex}
\addbibresource{pst-solides3d-doc.bib}


%\usepackage{arev}
%\usepackage{manfnt}
%\usepackage[garamond]{mathdesign}
%\renewcommand{\ttdefault}{lmtt}

\usepackage{multicol}   % Intermix single and multiple columns
\usepackage{longtable}  % Allows tables to flow over page boundaries
\usepackage{array}      % Extending the array and tabular environments
\usepackage{arrayjob}   % Management of arrays
\usepackage{url}        % Verbatim with URL-sensitive line breaks
\usepackage{framed}            % Framed or shaded regions that can break across pages
\usepackage{ragged2e}
\usepackage{paralist}


%%%%%%%
%%%%%%% Loading the necessary graphic packages
\usepackage[dvipsnames,svgnames,x11names,prologue,table]{pstricks} % Loads 'PSTricks' and xcolor

%\usepackage{animate}
\usepackage{showexpl}   % Typesetting LaTeX source code
\usepackage{pst-plot}  % Macros for plotting functions and data records
\usepackage{pst-eucl}  % The 'pst-eucl' package allow the drawing of Euclidean geometric
                       % figures using LaTeX macros for specifying mathematical constraints.
                       % It is thus possible to build point using common transformations or intersections.
                       % The use of coordinates is  limited to points which controlled the figure.
\usepackage{pst-solides3d}   % The package is designed to draw solids in 3D perspective.
\let\PSTfileversion\fileversion
\let\PSTfiledate\filedate
\usepackage{pstricks-add}    % A collection of add-ons and bugfixes for PSTricks.
                             % Allows 'algebraic notation' instead of the PostScript
                             % native RPN (Revers Polish Notation).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Note: 'pstricks-add' always needs to be loaded last. %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DeclareFixedFont{\timesnormal}{T1}{ptm}{m}{n}{2cm}
\raggedbottom
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% adapt\'{e} de \psRandom du package pstricks-add
%% pour rendre al\'{e}atoire la taille des \'{e}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
}


\renewcommand*\l@section{\bprot@dottedtocline{1}{1.5em}{2.5em}}   % hv
\renewcommand*\l@subsection{\bprot@dottedtocline{2}{3.8em}{3.5em}}% hv


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 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}

%%%%%%% Highlight some expressions
\newcommand\Cadre[1]{\psframebox[fillstyle=solid,fillcolor=gray!20,linecolor=gray!20]{\texttt{#1}}}

%%%%%%%
%%%%%%% Box and highlight some notes
\newcommand\encadre[1]{
\psframebox[fillstyle=solid,fillcolor=gray!20,linecolor=gray!20]{
  \begin{minipage}{\textwidth}
  {\textbf{\textcolor{OrangeReddy}{Note:}}\qquad #1}
  \end{minipage}}
}


%%%%%%%
%%%%%%% Highlight the table of the predefined solids
\newcommand\toptableau{%
\rowcolor{gray!20}
  \textbf{Solid} & \begin{tabular}{c}
                      \textbf{Default}\\
                      \textbf{Parameters}
                      \end{tabular} &
                      \begin{minipage}{4cm}
                      \centerline{\textbf{View}}
                      \end{minipage}&
                      \begin{minipage}{4cm}
                      \centerline{\textbf{Code}}
                      \end{minipage}}
%%%%%%%
%%%%%%% Color array
\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}
\definecolor{OrangeReddy}{rgb}{0.73,0.00,0.00}

%%%%%%%
%%%%%%% Highlight some commands with backslashes (the three macros)
\newcommand\bs[1]{%
  \psframebox[fillstyle=solid,fillcolor=gray!20,
    linecolor=gray!20]{\texttt{\textbackslash#1}}}

%%%%%%%
%%%%%%% Positioning the viewpoint
\def\PointEcran(#1,#2,#3)#4{% position of the viewpoint on the screen
\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{data/}% ./data/
\def\inputpath{text/}% ..

\lstset{%
    basicstyle=\ttfamily\footnotesize,
    commentstyle=\color{PineGreen}\slshape\footnotesize,
    showspaces=false,
    showstringspaces=false,
    breaklines=true,
    backgroundcolor=\color{gray!20},
    breakautoindent=true,
    captionpos=t,
    language=TeX,
    emph={\begin,\codejps,\end},
    emphstyle=\color{RoyalBlue},
    emph={[2]pspicture},
    emphstyle={[2]\color{OrangeReddy}},
    numbersep=5pt,
    preset=\centering,
    rframe={}%
}

\usepackage[
% colors for the links
   colorlinks=true,         % color links
   urlcolor=OrangeReddy,    % color of URL links
   filecolor=black,         % color of file links
   linkcolor=OrangeReddy,   % color of links
% Links
   %raiselinks=true,    % raise up links (for HyperTeX backend)
%   backref=page,           % do bibliographical back refenrernces
%   pagebackref=true,        % back reference by page numbers
%   verbose,                 % be chatty
%   hyperindex=true,         % set up hyperlink indices
   linktocpage=true,        % make page number, not text, be linked on TOC, LOF, LOT
%   hyperfootnotes=false,    % do not set up hyperlink footnotes
% Bookmarks
   bookmarks=true,          % Generating Bookmarks for the PDF-Viewer
%   bookmarksopenlevel=1,    % Level to which Bookmarks are opened
   bookmarksopen=true,      % Open up Bookmarks tree
%   bookmarksnumbered=true,  % Put section numbers in Bookmarks
   %bookmarkstype=toc,      % Specify which TOC file to mimic
% Anchors
%   plainpages=false,        % do not page number anchors as plain arabic
%   pageanchor=true          % put an anchor on every page
   ]{hyperref}

%%%%%%%
%%%%%%% PDF Informations
\hypersetup{%
   pdftitle={pst-solides3d - The Documentation},    % Text for the PDF title field
   pdfauthor={Jean-Paul Vignault, Manuel Luque, Arnaud Schmittbuhl, Herbert Voss;},    % Text for the PDF author field
   pdfcreator={LaTeX, hyperref, KOMA-Script},       % Text for the PDF creator field
   %pdfproducer={pdfeTeX 1.10b-2.1}                 % Text for the PDF producer field
   pdfstartview=FitH,       % Fits the width of the page to the window.
   pdfpagemode=UseOutlines, % Show Bookmarks in the Viewer
   pdfpagelabels=true       % set PDF page labels
   }
%\usepackage{breakurl}   % Line-breakable \url-like links in hyperref when compiling via dvips/ps2pdf

%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Herbert %%%%%%%%%%%%%%%%%%%%%%%%%%
\pagestyle{scrheadings}
\ofoot{\pagemark}
\newcommand\Input[2][\inputpath]{\ifoot{{\footnotesize#2}}\input{#1#2}}
\def\Lcs#1{\texttt{\textbackslash#1}%
  \index{#1@\texttt{\textbackslash#1}}%
  \index{Macro!#1@\texttt{\textbackslash#1}}}
\def\Lenv#1{\texttt{#1}\index{#1@\texttt{#1}}\index{Environment!#1@\texttt{#1}}}
\def\Lkeyword#1{\texttt{#1}%
  \index{#1@\texttt{#1}}\index{Keyword!#1@\texttt{#1}}}
\def\Lkeyval#1{\texttt{#1}%
  \index{#1@\texttt{#1}}\index{Value!#1@\texttt{#1}}}
\def\Index#1{#1\index{#1}}


%%%%%%%
%%%%%%% Title Page
\title{\texttt{pst-solides3d}:\\
       The Documentation -- The Basics
        \\[0.5cm]
{\normalsize v. \PSTfileversion\ (\PSTfiledate)}\\[20pt]
%\includegraphics[scale=0.6]{images/kepler}
}
\author{Jean-Paul Vignault\thanks{\protect\url{<jpv@melusine.eu.org>}}
\and Manuel Luque\thanks{\protect\url{<manuel.luque27@gmail.com>}}
\and Arnaud Schmittbuhl\thanks{\protect\url{<aschmittbuhl@libertysurf.fr>}}
\and Jürgen Gilg\thanks{\protect\url{<gilg@acrotex.net>}}
\and Jean-Michel Sarlat\thanks{\protect\url{<jm.sarlat@gmail.com>}}
\and Herbert Voß\thanks{\protect\url{<herbert.voss@fu-berlin.de>}}}
\date{\today}

\begin{document}
\maketitle

%\tableofcontents

\newpage


\chapter{Basics for the package}
\Input{chapter-1-en}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\chapter{Setting the layout of the scenery}
\Input{chapter-2-en}
\Input{par-eclairageponctuel-en}
\Input{par-axes3D-en}





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\chapter{Predefined solids and their positioning}

\Input{par-solidespredefinis-en}
\Input{par-positionnersolide-en}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\chapter{More options of \textbackslash{}psSolid}
\Input{par-commandestrace-en}
\Input{par-solidescreux-en}
\Input{par-numeroterfacettes-en}
\Input{par-enleverfacettes-en}
\Input{par-pointagesommets-en}
\Input{par-couleurs-en}
\Input{par-colorierfacettes-en}
\Input{par-opacity-en}
\Input{par-definitionmaillage-en}

\Input{par-modes-en}

\Input{par-tronque-en}
\Input{par-affinage-en}
\Input{par-chanfrein-en}
\Input{par-transform-en}
\Input{par-lignedeniveau-en}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\chapter{Usage of external files}
\Input{par-datfile-en}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\chapter{Some special objects}
\Input{par-grille-en}
\Input{par-point-en}
\Input{par-vecteur-en}
\Input{par-plan-en}
\Input{par-geode-en}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\chapter{Generating some new solids}
\Input{par-codejps-en}
\Input{par-definirfonction-en}
\Input{par-courbeR3-en}
\Input{par-tube-en}
\Input{par-prisme-en}
\Input{par-new-en}
\Input{par-face-en}
\Input{par-ruban-en}
\Input{par-anneaux-en}
\Input{par-cylindres-cones-en}
\Input{par-surfacesparametrees-en}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\chapter{Surfaces defined by a function of the form $z=f(x,y)$}
\Input{par-surfaces-en}



\clearpage
\Input{par-implicitsurface-en}%% hc 2016-12-11

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\chapter{Advanced usage}
\Input{par-nommersolide-en}
\Input{par-section-en}
\Input{par-fusion-en}
\Input{par-fusionjps-en}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\chapter{Interaction with PSTricks}

\Input{par-positionnerpointconnu-en}
\Input{par-ligne3D-en}
\Input{par-tracerpolygone-en}
\Input{par-transformpointconnu-en}
\Input{par-annoterschema-en}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\chapter{Projections}
\Input{par-projpresentation-en}
\Input{par-projectionvisibility-en}
\Input{par-definirplanquelconque-en}
\Input{par-projectionpoint-en}
\Input{par-projectionvecteur-en}

\Input{par-projectiondroite-en}




%\newpage
\Input{par-projectioncercle-en}
\Input{par-projectionpolygone-en}
\Input{par-projectionligne-en}
%\newpage
\Input{par-projectionangledroit-en}
\Input{par-projectioncourbe-en}
\Input{par-projectiontexte-en}



\Input{par-image2d-en}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\chapter{Possible extensions}
\Input{par-extensions-en}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\appendix
\chapter{Appendix}
\Input{par-parametres-en}
\Input{par-keywords-en}
\Input{par-acknowledgements-en}
\Input{par-poems-en}

\printindex

\nocite{*}
\bgroup
\RaggedRight
\printbibliography{pst-solides3d-doc}
\egroup

\end{document}