Mise à jour...
[pst-anamorphosis.git] / img / serie02 / foliums.tex
1 \documentclass[12pt]{article}
2 \usepackage{pst-anamorphosis-add,pst-plot,pst-grad}
3 \usepackage[a4paper]{geometry}
4
5 \makeatletter
6 \def\psparametricplotA{\pst@object{parametricplotA}}% hv 2008-11-22
7 \def\parametricplotA{\pst@object{parametricplotA}}
8 \def\parametricplotA@i#1#2{\@ifnextchar[{\parametricplotA@x{#1}{#2}}{\parametricplotA@x{#1}{#2}[]}}
9 \def\parametricplotA@x#1#2[#3]{\@ifnextchar[{\parametricplotA@xi{#1}{#2}[#3]}{\parametricplotA@xi{#1}{#2}[#3][]}}
10 \def\parametricplotA@xi#1#2[#3][#4]#5{%
11 \pst@killglue%
12 \begingroup%
13 \use@par%
14 \@nameuse{beginplot@\psplotstyle}%
15 \addto@pscode{%
16 \tx@optionsanamorphosis
17 \tx@optionsanamorphosisAdd
18 #3 %prefix PS code
19 \psplot@init
20 /t #1 def
21 /t1 #2 def
22 /dt t1 t sub \psk@plotpoints div def
23 /F@pstplot \ifPst@algebraic (#5)
24 \ifx\psk@PlotDerivative\@none\else
25 \psk@PlotDerivative\space { (t) tx@Derive begin Derive end } repeat
26 \fi\space
27 tx@AlgToPs begin AlgToPs end cvx
28 \else { #5 } \fi def
29 \ifPst@VarStep
30 /StillZero 0 def /LastNonZeroStep dt def
31 /F2@pstplot tx@Derive begin (#5) (t) Derive (t) Derive end
32 \ifx\psk@PlotDerivative\@none\else
33 \psk@PlotDerivative\space { (t) tx@Derive begin Derive end } repeat
34 \fi\space
35 tx@AlgToPs begin AlgToPs end cvx def
36 %% computation of the tolerance defined by plotpoints
37 /epsilon12 \ifx\psk@VarStepEpsilon\@default
38 tx@Derive begin F2@pstplot end Pyth
39 dt 3 exp abs mul
40 \else\psk@VarStepEpsilon\space 12 mul \fi def
41 /ComputeStep {
42 dup 1e-4 lt
43 { pop StillZero 2 ge { LastNonZeroStep 2 mul } { LastNonZeroStep } ifelse /StillZero StillZero 1 add def }
44 { epsilon12 exch div 1 3 div exp /StillZero 0 def }
45 ifelse } bind def
46 \fi
47 /xy {
48 \ifPst@algebraic F@pstplot \else #5 \fi
49 \pst@number\psyunit mul exch
50 \pst@number\psxunit mul exch
51 tx@anamorphosisPathDict begin Anamorphose end
52 } def
53 }%
54 \gdef\psplot@init{}%
55 \@pstfalse
56 \@nameuse{testqp@\psplotstyle}%
57 \if@pst\parametricplotA@ii{#4}\else\parametricplotA@iii{#4}\fi
58 \endgroup%
59 \ignorespaces}
60 %
61 \def\parametricplotA@ii#1{% para is the post code
62 \ifPst@VarStep%
63 \addto@pscode{%
64 mark xy \@nameuse{beginqp@\psplotstyle}
65 { F2@pstplot Pyth ComputeStep
66 t 2 copy add dup t1 gt {pop t1} if /t exch def F2@pstplot Pyth ComputeStep
67 /t 3 -1 roll def 2 copy gt { exch } if pop
68 /t t 3 -1 roll add dup t1 gt {pop t1} if def
69 xy \@nameuse{doqp@\psplotstyle}
70 t t1 eq { exit } if } loop}%
71 \else\pst@killglue%
72 \addto@pscode{%
73 /ps@Exit false def
74 xy \@nameuse{beginqp@\psplotstyle}
75 \psk@plotpoints 1 sub {
76 /t t dt add def
77 xy \@nameuse{doqp@\psplotstyle}
78 ps@Exit { exit } if
79 } repeat
80 ps@Exit not {
81 /t t1 def
82 xy \@nameuse{doqp@\psplotstyle}
83 } if
84 }%
85 \fi%
86 \addto@pscode{ #1 }%
87 \@nameuse{endqp@\psplotstyle}}
88 %
89 \def\parametricplotA@iii#1{%
90 \ifPst@VarStep%
91 \addto@pscode{%
92 /n 2 def
93 mark
94 { xy n 2 roll F2@pstplot Pyth
95 ComputeStep t 2 copy add dup t1 gt {pop t1} if
96 /t exch def F2@pstplot Pyth ComputeStep
97 /t 3 -1 roll def 2 copy gt { exch } if pop
98 /t t 3 -1 roll dup /LastNonZeroStep exch def add dup t1 gt {pop t1} if def /n n 2 add def
99 t t1 eq { exit } if } loop
100 xy n 2 roll}%
101 \else\pst@killglue%
102 \addto@pscode{
103 mark
104 /n 2 def
105 \psk@plotpoints {
106 xy
107 n 2 roll
108 /n n 2 add def
109 /t t dt add def
110 } repeat
111 /t t1 def
112 xy
113 n 2 roll}%
114 \fi%
115 \addto@pscode{ #1 }%
116 \@nameuse{endplot@\psplotstyle}}
117 %
118 \makeatother
119 \pagestyle{empty}
120 \begin{document}
121 \begin{center}
122 \begin{pspicture}(-6,-6)(6,6)
123 \pscircle[doubleline=true]{3}
124 \psset{type=conical}
125 \parametricplot[plotpoints=3600,linecolor=red,linewidth=0.5mm]{0}{360}{%
126 /Radius 0.75 t 4 mul cos mul def
127 Radius t cos mul 1 add
128 Radius t sin mul
129 }
130 \parametricplotA[plotpoints=3600,linecolor=red,linewidth=0.5mm]{0}{360}{%
131 /Radius 0.75 t 4 mul cos mul def
132 Radius t cos mul 1 add
133 Radius t sin mul
134 }
135 \parametricplot[plotpoints=3600,linecolor=blue,linewidth=0.5mm]{0}{360}{%
136 /Radius 1 t 5 mul cos mul def
137 Radius t cos mul -1.25 add
138 Radius t sin mul
139 }
140 \parametricplotA[plotpoints=3600,linecolor=blue,linewidth=0.5mm]{0}{360}{%
141 /Radius 1 t 5 mul cos mul def
142 Radius t cos mul -1.25 add
143 Radius t sin mul
144 }
145 \parametricplot[plotpoints=3600,fillstyle=solid,fillcolor=green!50]{0}{360}{%
146 /Radius 1 t 2 mul sin t 6 mul sin 4 div add mul def
147 Radius t cos mul
148 Radius t sin mul 1.5 add
149 }
150 \parametricplotA[plotpoints=3600,fillstyle=solid,fillcolor=green!50]{0}{360}{%
151 /Radius 1 t 2 mul sin t 6 mul sin 4 div add mul def
152 Radius t cos mul
153 Radius t sin mul 1.5 add
154 }
155 \parametricplot[plotpoints=3600,fillstyle=gradient,gradend=yellow,gradbegin=white]{0}{360}{%
156 /Radius 1 t cos 3 exp mul def
157 Radius t sin mul 0 add
158 Radius t cos mul 1 add neg
159 }
160 \parametricplotA[plotpoints=3600,fillstyle=gradient,gradbegin=yellow,gradend=white]{0}{360}{%
161 /Radius 1 t cos 3 exp mul def
162 Radius t sin mul 0 add
163 Radius t cos mul 1 add neg
164 }
165 {\psset{linewidth=0.5\pslinewidth,linecolor={[rgb]{1 0.75 0}}}
166 \multido{\n=0.25+0.25,\N=0.25+0.25}{9}{%
167 \pnode(! \n\space -2.25){A}
168 \pnode(! \n\space 2.25){B}
169 \psline(A)(B)
170 \pslineA(A)(B)
171 \pnode(!-2.25 \N){A}
172 \pnode(!2.25 \N){B}
173 \pslineA(A)(B)
174 \psline(A)(B)
175 }
176 \multido{\n=-2.25+0.25,\N=-2.25+0.25}{9}{%
177 \pnode(! \n\space -2.25){A}
178 \pnode(! \n\space 2.25){B}
179 \psline(A)(B)
180 \pslineA(A)(B)
181 \pnode(!-2.25 \N){A}
182 \pnode(!2.25 \N){B}
183 \pslineA(A)(B)
184 \psline(A)(B)
185 }
186 \psline(-2.25,0)(2.25,0)
187 \psline(0,-2.25)(0,2.25)
188 \pslineA(0,-2.25)(0,-0.25)
189 \pslineA(0,2.25)(0,0.25)
190 \pslineA(-2.25,0)(-0.25,0)
191 \pslineA(2.25,0)(0.25,0)}
192 \psdot[dotstyle=x,dotsize=.2](0,0)
193 \end{pspicture}
194 \end{center}
195 \end{document}

Licence Creative Commons Les fichiers de Syracuse sont mis à disposition (sauf mention contraire) selon les termes de la
Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 4.0 International.