1 \documentclass[12pt
]{article
}
2 \usepackage{pst-anamorphosis-add,pst-plot,pst-grad
}
3 \usepackage[a4paper]{geometry
}
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{%
14 \@nameuse
{beginplot@
\psplotstyle}%
16 \tx@optionsanamorphosis
17 \tx@optionsanamorphosisAdd
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
27 tx@AlgToPs begin AlgToPs end cvx
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
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
40 \else\psk@VarStepEpsilon
\space 12 mul
\fi def
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
}
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
56 \@nameuse
{testqp@
\psplotstyle}%
57 \if@pst
\parametricplotA@ii
{#4}\else\parametricplotA@iii
{#4}\fi
61 \def\parametricplotA@ii
#1{% para is the post code
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
}%
74 xy \@nameuse
{beginqp@
\psplotstyle}
75 \psk@plotpoints
1 sub
{
77 xy \@nameuse
{doqp@
\psplotstyle}
82 xy \@nameuse
{doqp@
\psplotstyle}
87 \@nameuse
{endqp@
\psplotstyle}}
89 \def\parametricplotA@iii
#1{%
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
116 \@nameuse
{endplot@
\psplotstyle}}
122 \begin{pspicture
}(-
6,-
6)(
6,
6)
123 \pscircle[doubleline=true
]{3}
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
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
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
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
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
148 Radius t sin mul
1.5 add
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
153 Radius t sin mul
1.5 add
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
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
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
}
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
}
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)