2 \documentclass[a4paper,fleqn
]{article
}
3 \usepackage[utf8
]{inputenc}
4 \usepackage[T1]{fontenc}
5 \usepackage{amsmath,amssymb
}
6 \usepackage[frenchb
]{babel
}
8 \usepackage[charter
]{mathdesign
}
9 \usepackage[margin=
2.5cm
]{geometry
}
12 \usepackage[svgnames
]{xcolor
}
14 \usepackage[nomessages
]{fp
}
16 \usepackage{pst-plot,pst-solides3d,pst-anamorphosis-add,pst-
3d
}
18 \usepackage[absolute,notitlepage
]{pst-abspos
}
21 \psset{path=C:/Dokumente und Einstellungen/Besitzer/Desktop/bergen/bergen/
}
22 %\def\epsRoot{C:/Dokumente und Einstellungen/Besitzer/Desktop/bergen/bergen/}
24 \renewcommand{\ttdefault}{lmtt
}
26 \definecolor{syracuseGRIS
}{HTML
}{C1C1C1
}
27 \definecolor{syracuseVERT
}{HTML
}{029235}
29 \definecolor{sepia
}{rgb
}{1,
0.8,
0.8}
30 \definecolor{grisclair
}{rgb
}{0.8,
0.8,
0.8}
31 \definecolor{BleuCiel
}{cmyk
}{0.2,
0,
0,
0}
32 \definecolor{OrangePale
}{cmyk
}{0,
0.2,
0.4,
0}
37 basicstyle=
\ttfamily\small,
%
38 texcsstyle=*
\color{blue
},
%
39 identifierstyle=
\color{black
},
%
40 keywordstyle=
\color{syracuseVERT
},
%
41 otherkeywords=
{$, \
{, \
}, \
[, \
]},
42 stringstyle=
\color{syracuseVERT
},
%
43 commentstyle=
\color{syracuseVERT
},
%
44 backgroundcolor=
\color{syracuseGRIS!
30},
%
49 %rulesepcolor=\color{syracuseGRIS!30},%
52 showstringspaces=false,
%
57 breakautoindent=true,
%
61 morekeywords=
[6]{pspicture,center
},
%
62 keywordstyle=
[6]\color{FireBrick
},
%
63 %morekeywords=[7]{(,)},%
64 %keywordstyle=[7]\color{syracuseVERT}
67 \renewcommand{\lstlistingname}{Source
}
68 \renewcommand{\labelitemi}{$
\bullet$
}
71 \newcommand\cs[1]{\texttt{\char`\\
#1}}
72 \newcommand\file[1]{\texttt{#1}}
77 \def\syracuseTitle{Les anamorphoses : extensions possibles
}
78 %\def\syracuseGraphic{eiffel2}
82 \def\psparametricplotA{\pst@object
{parametricplotA
}}% hv 2008-11-22
83 \def\parametricplotA{\pst@object
{parametricplotA
}}
84 \def\parametricplotA@i
#1#2{\@ifnextchar
[{\parametricplotA@x
{#1}{#2}}{\parametricplotA@x
{#1}{#2}[]}}
85 \def\parametricplotA@x
#1#2[#3]{\@ifnextchar
[{\parametricplotA@xi
{#1}{#2}[#3]}{\parametricplotA@xi
{#1}{#2}[#3][]}}
86 \def\parametricplotA@xi
#1#2[#3][#4]#5{%
90 \@nameuse
{beginplot@
\psplotstyle}%
92 \tx@optionsanamorphosis
93 \tx@optionsanamorphosisAdd
98 /dt t1 t sub
\psk@plotpoints div def
99 /F@pstplot
\ifPst@algebraic (
#5)
100 \ifx\psk@PlotDerivative\@none
\else
101 \psk@PlotDerivative
\space { (t) tx@Derive begin Derive end
} repeat
103 tx@AlgToPs begin AlgToPs end cvx
106 /StillZero
0 def /LastNonZeroStep dt def
107 /F2@pstplot tx@Derive begin (
#5) (t) Derive (t) Derive end
108 \ifx\psk@PlotDerivative\@none
\else
109 \psk@PlotDerivative
\space { (t) tx@Derive begin Derive end
} repeat
111 tx@AlgToPs begin AlgToPs end cvx def
112 %% computation of the tolerance defined by plotpoints
113 /epsilon12
\ifx\psk@VarStepEpsilon\@default
114 tx@Derive begin F2@pstplot end Pyth
116 \else\psk@VarStepEpsilon
\space 12 mul
\fi def
119 { pop StillZero
2 ge
{ LastNonZeroStep
2 mul
} { LastNonZeroStep
} ifelse /StillZero StillZero
1 add def
}
120 { epsilon12 exch div
1 3 div exp /StillZero
0 def
}
124 \ifPst@algebraic F@pstplot
\else #5 \fi
125 \pst@number
\psyunit mul exch
126 \pst@number
\psxunit mul exch
127 tx@anamorphosisPathDict begin Anamorphose end
132 \@nameuse
{testqp@
\psplotstyle}%
133 \if@pst
\parametricplotA@ii
{#4}\else\parametricplotA@iii
{#4}\fi
137 \def\parametricplotA@ii
#1{% para is the post code
140 mark xy \@nameuse
{beginqp@
\psplotstyle}
141 { F2@pstplot Pyth ComputeStep
142 t
2 copy add dup t1 gt
{pop t1
} if /t exch def F2@pstplot Pyth ComputeStep
143 /t
3 -
1 roll def
2 copy gt
{ exch
} if pop
144 /t t
3 -
1 roll add dup t1 gt
{pop t1
} if def
145 xy \@nameuse
{doqp@
\psplotstyle}
146 t t1 eq
{ exit
} if
} loop
}%
150 xy \@nameuse
{beginqp@
\psplotstyle}
151 \psk@plotpoints
1 sub
{
153 xy \@nameuse
{doqp@
\psplotstyle}
158 xy \@nameuse
{doqp@
\psplotstyle}
163 \@nameuse
{endqp@
\psplotstyle}}
165 \def\parametricplotA@iii
#1{%
170 { xy n
2 roll F2@pstplot Pyth
171 ComputeStep t
2 copy add dup t1 gt
{pop t1
} if
172 /t exch def F2@pstplot Pyth ComputeStep
173 /t
3 -
1 roll def
2 copy gt
{ exch
} if pop
174 /t t
3 -
1 roll dup /LastNonZeroStep exch def add dup t1 gt
{pop t1
} if def /n n
2 add def
175 t t1 eq
{ exit
} if
} loop
192 \@nameuse
{endplot@
\psplotstyle}}
194 %%%%%%%\psframeA ---------------------
195 \def\psframeA{\pst@object
{psframeA
}}
196 \def\psframeA@i(
#1)
{%
197 \@ifnextchar(
{\psframeA@ii(
#1)
}{\psframeA@ii(
0,
0)(
#1)
}}
198 \def\psframeA@ii(
#1)(
#2)
{%
200 \pst@getcoor
{#1}\pst@tempa
%
202 \def\pst@linetype
{2}%
204 \tx@optionsanamorphosis
205 \tx@optionsanamorphosisAdd
212 X1 Y1 tx@anamorphosisPathDict begin Anamorphose end
214 0 0.005 1.0 { %(X1,Y1)->(X2,Y1)
216 K X2 mul
1 K sub X1 mul add
218 tx@anamorphosisPathDict begin Anamorphose end
221 0 0.005 1.0 { % (X2,Y1)->(X2,Y2)
224 K Y2 mul
1 K sub Y1 mul add
225 tx@anamorphosisPathDict begin Anamorphose end
228 0 0.005 1.0 { % (X2,Y2)->(X1,Y2)
230 K X1 mul
1 K sub X2 mul add
232 tx@anamorphosisPathDict begin Anamorphose end
235 0 0.005 1.0 { % (X1,Y2)->(X1,Y1)
238 K Y1 mul
1 K sub Y2 mul add
239 tx@anamorphosisPathDict begin Anamorphose end
246 %%%%%%%\translateA ---------------------------
247 \def\translateA{\def\pst@par
{}\pst@object
{translateA
}}
248 \def\translateA@i(
#1)
{{%
251 \tx@optionsanamorphosis
252 \tx@optionsanamorphosisAdd
254 tx@anamorphosisPathDict begin Anamorphose end
263 %% === BEGIN == Page de garde =================================================
265 \thispagestyle{empty
}
267 \pstPutAbs(
0,-
29.7)
{%
268 \begin{pspicture
}(
0,
0)(
21,
29.7)
269 \pspolygon[fillstyle=solid,linecolor=syracuseVERT,fillcolor=syracuseVERT
](
0,
0)(
10.5,
14.85)(
21,
0)
270 \pspolygon[fillstyle=solid,linecolor=syracuseGRIS,fillcolor=syracuseGRIS
](
0,
0)(
21,
29.7)(
0,
29.7)
271 \pspolygon[fillstyle=solid,linecolor=syracuseGRIS!
50,fillcolor=syracuseGRIS!
50](
21,
0)(
10.5,
14.85)(
21,
29.7)
274 \pstPutAbs(
2.5,-
3.75)
{%
275 \includegraphics[scale=
1]{pst-anamorphosis
}
277 \pstPutAbs(
2.5,-
5.25)
{%
278 \LARGE \textbf{\syracuseTitle}
280 \pstPutAbs(
2.5,-
13.5)
{%
281 \begin{pspicture
}(
0,
0)(
12,
12)
282 \rput(
4,
4)
{\includegraphics[height=
8cm
]{Eiffel
}}
283 %\rput(4,4){\includegraphics[height=8cm]{\syracuseGraphic}}
287 \pstPutAbs(
12.5,-
15)
{%
288 \parbox{0.4\textwidth}{\Large\raggedleft
289 {\LARGE\textbf{Contributeurs
}}\\
[0.2cm
]
290 J\"
{u
}rgen
\textsc{Gilg
}\\
291 Manuel
\textsc{Luque
}\\
292 Jean-Michel
\textsc{Sarlat
}
296 \textcolor{white
}{\textbf{\today}}\\
[0.3cm
]
297 \textcolor{white
}{\url{http://melusine.eu.org/syracuse/G/pst-anamorphosis/
}}\\
298 \includegraphics[scale=
0.4]{logo_syracuse
}
301 %% == END == Page de garde ====================================================
307 Il est relativement facile d'adapter les commandes de
\textsf{PSTricks
} \`
{a
} \textsf{pst-anamorphosis
}. C'est ainsi que la plupart des macros de
\textsf{pst-anamorphosis-add
} sont des adaptations de celles de
\textsf{PStricks
}. Toutes ne l'on pas \'
{e
}t\'
{e
} pour ne pas alourdir inutilement le package. Nous allons d\'
{e
}tailler sur un exemple la fa
\c{c
}on de proc\'
{e
}der.
309 Remarque : toutes les macros ne sont pas adaptables, cela serait le cas si les anamorphoses transformaient une ligne droite en une ligne droite. Or, \`
{a
} part la perspective, ce n'est pas le cas. En cons\'
{e
}quence,
\verb+
\psline+,
\verb+
\psframe+,
\verb+
\pspolygon+ doivent \^
{e
}tre r\'
{e
}\'
{e
}crits en divisant le segment initial en un grand nombre de petits segments : pour
\verb+
\pslineA+ par exemple chaque segment initial est divis\'
{e
} en
200 parties et ceci quelle que soit sa longueur, dans l'id\'
{e
}al il faudrait tenir compte de la longueur du segment avant de choisir le nombre de segmentations.
313 \section{\textbackslash{}psparametricplotA
}
315 \subsection{Adaptation
}
317 \`
{A
} partir d'une copie de
\textbackslash{}\textsf{psparametricplot
} :
319 \item On remplace parout
\textsf{psparametricplot
} par
\textsf{psparametricplotA
} ;
320 \item dans le premier
\verb+
\addto@pscode
{%+
323 \tx@optionsanamorphosis
324 \tx@optionsanamorphosisAdd
328 on introduit juste au d\'
{e
}but les variables de
\textsf{pst-anamorphosis
} ;
329 \item et pour terminer dans
\verb+/xy
{+:
332 \ifPst@algebraic F@pstplot
\else #5 \fi
333 \pst@number
\psyunit mul exch
334 \pst@number
\psxunit mul exch
335 tx@anamorphosisPathDict begin Anamorphose end
338 on ins\`
{e
}re \`
{a
} la fin les calculs propres \`
{a
} l'anamorphose. C'est termin\'
{e
}, la macro est op\'
{e
}rationnelle !
345 \begin{pspicture
}(-
6,-
6)(
6,
6)
346 \pscircle[doubleline=true
]{3}
348 \pscircle[linecolor=blue
](
0,
0)
{1}
349 \pscircleA[linecolor=blue
](
0,
0)
{1}
350 \pscircle[linecolor=blue
](
0,
0)
{2}
351 \pscircleA[linecolor=blue
](
0,
0)
{2}
352 \psframeA[linecolor=blue,fillstyle=solid,fillcolor=cyan
](
1,
1)(
2,
2)
353 \psframeA[linecolor=blue,fillstyle=solid,fillcolor=cyan
](-
1,-
1)(-
2,-
2)
354 \psframeA[linecolor=blue,fillstyle=solid,fillcolor=cyan
](-
1,
1)(-
2,
2)
355 \psframeA[linecolor=blue,fillstyle=solid,fillcolor=cyan
](
1,-
1)(
2,-
2)
356 \psframe[linecolor=blue,fillstyle=solid,fillcolor=cyan
](
1,
1)(
2,
2)
357 \psframe[linecolor=blue,fillstyle=solid,fillcolor=cyan
](-
1,-
1)(-
2,-
2)
358 \psframe[linecolor=blue,fillstyle=solid,fillcolor=cyan
](-
1,
1)(-
2,
2)
359 \psframe[linecolor=blue,fillstyle=solid,fillcolor=cyan
](
1,-
1)(
2,-
2)
360 \parametricplotA[plotpoints=
3600,linecolor=red,linewidth=
1mm
]{0}{360}{%
361 /Radius
1.5 0.5 t
10 mul sin mul add def
365 \parametricplot[plotpoints=
3600,linecolor=red,linewidth=
1mm
]{0}{360}{%
366 /Radius
1.5 0.5 t
10 mul sin mul add def
370 \multido{\n=
0.5+
0.5,
\N=
0.5+
0.5}{4}{%
371 \pnode(!
\n\space -
2)
{A
}
372 \pnode(!
\n\space 2)
{B
}
380 \multido{\n=-
2.0+
0.5,
\N=-
2.0+
0.5}{4}{%
381 \pnode(!
\n\space -
2)
{A
}
382 \pnode(!
\n\space 2)
{B
}
392 \pslineA(
0,-
2)(
0,-
0.5)
394 \pslineA(-
2,
0)(-
0.5,
0)
396 \psdot[dotstyle=x,dotsize=
.2](
0,
0)
400 \parametricplotA[plotpoints=
3600,linecolor=red,linewidth=
1mm
]{0}{360}{%
401 /Radius
1.5 0.5 t
10 mul sin mul add def
405 \parametricplot[plotpoints=
3600,linecolor=red,linewidth=
1mm
]{0}{360}{%
406 /Radius
1.5 0.5 t
10 mul sin mul add def
412 \section{\textbackslash{}psframeA
}
414 \verb+
\psframeA(x1,y1)(x2,y2)+ a les m\^
{e
}mes propri\'
{e
}t\'
{e
}s que
\verb+
\psframe+
416 \begin{pspicture
}(-
6,-
6)(
6,
6.5)
417 \psset{type=conical,Rmirror=
3}
418 \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue
](-
0.25,-
0.25)(-
0.01,-
0.01)
419 \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue
](-
0.25,
0.25)(-
0.01,
0.01)
420 \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue
](
0.01,
0.01)(
0.25,
0.25)
421 \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue
](
0.01,-
0.01)(
0.25,-
0.25)
422 \multido{\ry=-
2.75+
1,
\rY=-
2.25+
1}{6}{
423 \multido{\n=-
2.75+
1.00,
\N=-
2.25+
1.00}{7}{%
424 \psframeA[fillstyle=solid,fillcolor=red,linecolor=red
](
\n,
\ry)(
\N,
\rY)
}
426 \multido{\ry=-
3.25+
1,
\rY=-
2.75+
1}{3}{
427 \multido{\n=-
3.25+
1.00,
\N=-
2.75+
1.00}{7}{%
428 \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue
](
\n,
\ry)(
\N,
\rY)
}
430 \multido{\ry=
0.75+
1,
\rY=
1.25+
1}{3}{
431 \multido{\n=-
3.25+
1.00,
\N=-
2.75+
1.00}{7}{%
432 \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue
](
\n,
\ry)(
\N,
\rY)
}
434 \multido{\n=-
3.25+
1.00,
\N=-
2.75+
1.00}{3}{%
435 \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue
](
\n,-
0.25)(
\N,
0.25)
}
436 \multido{\n=
0.75+
1.00,
\N=
1.25+
1.00}{3}{%
437 \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue
](
\n,-
0.25)(
\N,
0.25)
}
438 \begin{psclip
}{\pscircle[fillstyle=solid,fillcolor=white,linestyle=none
]{3}}
439 \multido{\ry=-
2.75+
1,
\rY=-
2.25+
1}{6}{
440 \multido{\n=-
2.75+
1.00,
\N=-
2.25+
1.00}{6}{%
441 \psframe*
[linecolor=red
](
\n,
\ry)(
\N,
\rY)
}
443 \multido{\ry=-
3.25+
1,
\rY=-
2.75+
1}{7}{
444 \multido{\n=-
3.25+
1.00,
\N=-
2.75+
1.00}{7}{%
445 \psframe*
[linecolor=blue
](
\n,
\ry)(
\N,
\rY)
}
447 \pscircle[doubleline=true
]{3}
452 \multido{\ry=-
2.75+
1,
\rY=-
2.25+
1}{6}{
453 \multido{\n=-
2.75+
1.00,
\N=-
2.25+
1.00}{7}{%
454 \psframeA[fillstyle=solid,fillcolor=red,linecolor=red
](
\n,
\ry)(
\N,
\rY)
}
456 \multido{\ry=-
3.25+
1,
\rY=-
2.75+
1}{3}{
457 \multido{\n=-
3.25+
1.00,
\N=-
2.75+
1.00}{7}{%
458 \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue
](
\n,
\ry)(
\N,
\rY)
}
463 \section{\textbackslash{}pspolygonA
}
465 En r\'
{e
}alit\'
{e
} la macro
\verb+pspolygonA+ n'a pas \'
{e
}t\'
{e
} \'
{e
}crite. En effet il suffit de servir de
\verb+
\pslineA+ et de boucler le chemin en revenant au point origine.
467 \begin{pspicture
}(-
5,-
5)(
5,
5)
468 \psset{type=conical,Rmirror=
3}
469 \pspolygon[linecolor=red,linewidth=
1mm
](
2.5;
30)(
2.5;
90)(
2.5;
150)(
2.5;
210)(
2.5;
270)(
2.5;
330)
470 \pslineA[linecolor=red,linewidth=
1mm
](
2.5;
30)(
2.5;
90)(
2.5;
150)(
2.5;
210)(
2.5;
270)(
2.5;
330)(
2.5;
30)
471 \rput(
1.25,
1)
{\pspolygon[linecolor=blue,fillstyle=solid,linewidth=
1mm,fillcolor=
{[rgb
]{1 0.875 0.5}}](
0.75;
30)(
0.75;
90)(
0.75;
150)(
0.75;
210)(
0.75;
270)(
0.75;
330)
}
472 \multido{\i=
30+
60,
\I=
1+
1}{6}{%
473 \pnode(!
\i\space cos
0.75 mul
1.25 add
\i\space sin
0.75 mul
1 add)
{A
\I}
475 \pslineA[linecolor=blue,fillstyle=solid,linewidth=
1mm,fillcolor=
{[rgb
]{1 0.875 0.5}}](A1)(A2)(A3)(A4)(A5)(A1)
476 \pscircle[doubleline=true
]{3}
477 \psdot[dotstyle=x
](
0,
0)
481 \begin{pspicture
}(-
5,-
5)(
5,
5)
482 \psset{type=conical,Rmirror=
3}
483 \pspolygon[linecolor=red,linewidth=
1mm
](
2.5;
30)(
2.5;
90)(
2.5;
150)(
2.5;
210)(
2.5;
270)(
2.5;
330)
484 \pslineA[linecolor=red,linewidth=
1mm
](
2.5;
30)(
2.5;
90)(
2.5;
150)(
2.5;
210)(
2.5;
270)(
2.5;
330)(
2.5;
30)
485 \rput(
1.25,
1)
{\pspolygon[linecolor=blue,fillstyle=solid,linewidth=
1mm,fillcolor=
{[rgb
]{1 0.875 0.5}}](
0.75;
30)(
0.75;
90)(
0.75;
150)(
0.75;
210)(
0.75;
270)(
0.75;
330)
}
486 \multido{\i=
30+
60,
\I=
1+
1}{6}{%
487 \pnode(!
\i\space cos
0.75 mul
1.25 add
\i\space sin
0.75 mul
1 add)
{A
\I}
489 \pslineA[linecolor=blue,fillstyle=solid,linewidth=
1mm,fillcolor=
{[rgb
]{1 0.875 0.5}}](A1)(A2)(A3)(A4)(A5)(A1)
490 \pscircle[doubleline=true
]{3}
491 \psdot[dotstyle=x
](
0,
0)
494 On remarquera que le
\verb+
\rput(
1.25,
1)+ doit \^
{e
}tre remplac\'
{e
} par un calcul adapt\'
{e
}. La macro
\verb+
\rputA+ n'a pas \'
{e
}t\'
{e
} d\'
{e
}finie.