1 \documentclass{article
}
2 \usepackage{pst-anamorphosis-add,pst-plot
}
3 \usepackage[a4paper]{geometry
}
5 \def\psparametricplotA{\pst@object
{parametricplotA
}}% hv 2008-11-22
6 \def\parametricplotA{\pst@object
{parametricplotA
}}
7 \def\parametricplotA@i
#1#2{\@ifnextchar
[{\parametricplotA@x
{#1}{#2}}{\parametricplotA@x
{#1}{#2}[]}}
8 \def\parametricplotA@x
#1#2[#3]{\@ifnextchar
[{\parametricplotA@xi
{#1}{#2}[#3]}{\parametricplotA@xi
{#1}{#2}[#3][]}}
9 \def\parametricplotA@xi
#1#2[#3][#4]#5{%
13 \@nameuse
{beginplot@
\psplotstyle}%
15 \tx@optionsanamorphosis
16 \tx@optionsanamorphosisAdd
21 /dt t1 t sub
\psk@plotpoints div def
22 /F@pstplot
\ifPst@algebraic (
#5)
23 \ifx\psk@PlotDerivative\@none
\else
24 \psk@PlotDerivative
\space { (t) tx@Derive begin Derive end
} repeat
26 tx@AlgToPs begin AlgToPs end cvx
29 /StillZero
0 def /LastNonZeroStep dt def
30 /F2@pstplot tx@Derive begin (
#5) (t) Derive (t) Derive end
31 \ifx\psk@PlotDerivative\@none
\else
32 \psk@PlotDerivative
\space { (t) tx@Derive begin Derive end
} repeat
34 tx@AlgToPs begin AlgToPs end cvx def
35 %% computation of the tolerance defined by plotpoints
36 /epsilon12
\ifx\psk@VarStepEpsilon\@default
37 tx@Derive begin F2@pstplot end Pyth
39 \else\psk@VarStepEpsilon
\space 12 mul
\fi def
42 { pop StillZero
2 ge
{ LastNonZeroStep
2 mul
} { LastNonZeroStep
} ifelse /StillZero StillZero
1 add def
}
43 { epsilon12 exch div
1 3 div exp /StillZero
0 def
}
47 \ifPst@algebraic F@pstplot
\else #5 \fi
48 \pst@number
\psyunit mul exch
49 \pst@number
\psxunit mul exch
50 tx@anamorphosisPathDict begin Anamorphose end
55 \@nameuse
{testqp@
\psplotstyle}%
56 \if@pst
\parametricplotA@ii
{#4}\else\parametricplotA@iii
{#4}\fi
60 \def\parametricplotA@ii
#1{% para is the post code
63 mark xy \@nameuse
{beginqp@
\psplotstyle}
64 { F2@pstplot Pyth ComputeStep
65 t
2 copy add dup t1 gt
{pop t1
} if /t exch def F2@pstplot Pyth ComputeStep
66 /t
3 -
1 roll def
2 copy gt
{ exch
} if pop
67 /t t
3 -
1 roll add dup t1 gt
{pop t1
} if def
68 xy \@nameuse
{doqp@
\psplotstyle}
69 t t1 eq
{ exit
} if
} loop
}%
73 xy \@nameuse
{beginqp@
\psplotstyle}
74 \psk@plotpoints
1 sub
{
76 xy \@nameuse
{doqp@
\psplotstyle}
81 xy \@nameuse
{doqp@
\psplotstyle}
86 \@nameuse
{endqp@
\psplotstyle}}
88 \def\parametricplotA@iii
#1{%
93 { xy n
2 roll F2@pstplot Pyth
94 ComputeStep t
2 copy add dup t1 gt
{pop t1
} if
95 /t exch def F2@pstplot Pyth ComputeStep
96 /t
3 -
1 roll def
2 copy gt
{ exch
} if pop
97 /t t
3 -
1 roll dup /LastNonZeroStep exch def add dup t1 gt
{pop t1
} if def /n n
2 add def
98 t t1 eq
{ exit
} if
} loop
115 \@nameuse
{endplot@
\psplotstyle}}
122 \begin{pspicture
}(-
6,-
6)(
6,
6)
123 \pscircle[doubleline=true
]{3}
125 \pscircle[linecolor=blue
](
0,
0)
{1}
126 \pscircleA[linecolor=blue
](
0,
0)
{1}
127 \pscircle[linecolor=blue
](
0,
0)
{2}
128 \pscircleA[linecolor=blue
](
0,
0)
{2}
129 \parametricplotA[plotpoints=
3600,linecolor=red,linewidth=
1mm
]{0}{360}{%
130 /Radius
1.5 0.5 t
8 mul sin mul add def
134 \parametricplot[plotpoints=
3600,linecolor=red,linewidth=
1mm
]{0}{360}{%
135 /Radius
1.5 0.5 t
8 mul sin mul add def
139 \multido{\n=
0.5+
0.5,
\N=
0.5+
0.5}{4}{%
140 \pnode(!
\n\space -
2)
{A
}
141 \pnode(!
\n\space 2)
{B
}
149 \multido{\n=-
2.0+
0.5,
\N=-
2.0+
0.5}{4}{%
150 \pnode(!
\n\space -
2)
{A
}
151 \pnode(!
\n\space 2)
{B
}
161 \pslineA(
0,-
2)(
0,-
0.5)
163 \pslineA(-
2,
0)(-
0.5,
0)
165 \psdot[dotstyle=x,dotsize=
.2](
0,
0)