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
|
%%
%% Ein Beispiel der DANTE-Edition
%%
%% 7. Auflage
%%
%% Beispiel 35-00-92 auf Seite 855.
%%
%% Copyright (C) 2016 Herbert Voss
%%
%% It may be distributed and/or modified under the conditions
%% of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%%
%% See http://www.latex-project.org/lppl.txt for details.
%%
%%
%% ====
% Show page(s) 1
%%
%%
\documentclass[]{exaarticle}
\pagestyle{empty}
\setlength\textwidth{352.81416pt}
\setlength\parindent{0pt}
%StartShownPreambleCommands
\usepackage{pstricks,pst-plot,pst-xkey}
\makeatletter
\pst@addfams{pst-HSB}
\define@key[psset]{pst-HSB}{HueBegin}{% Between 0 and 1
\def\PstParametricplotHSB@HueBegin{#1}}
\define@key[psset]{pst-HSB}{HueEnd}{% Between 0 and 1
\def\PstParametricplotHSB@HueEnd{#1}}
\define@boolkey[psset]{pst-HSB}[Pst@]{HSB}[true]{}
% Default values
\psset[pst-HSB]{HueBegin=0,HueEnd=1,HSB=true}
\psset{dimen=outer}
\def\parametricplotHSB{\pst@object{parametricplotHSB}}
\def\parametricplotHSB@i#1#2#3{{%
\begin@ClosedObj
\addto@pscode{%
/t #1 def
/dt #2 t sub \psk@plotpoints\space div def
/t t dt sub def
/Counter 0 def
1 setlinejoin
\psk@plotpoints {
/t t dt add def
/Counter Counter 1 add def
#3
\pst@number\psyunit mul exch
\pst@number\psxunit mul exch
1 Counter eq { moveto currentpoint /OldY ED /OldX ED } % First point
{\ifPst@HSB % Other points than the first one
/PointY exch def
/PointX exch def
Counter \psk@plotpoints\space div
\PstParametricplotHSB@HueEnd\space
\PstParametricplotHSB@HueBegin\space sub mul
\PstParametricplotHSB@HueBegin\space add
1 1 sethsbcolor
OldX OldY PointX PointY lineto lineto
stroke
PointX PointY moveto
/OldX PointX def /OldY PointY def
\else lineto \fi } ifelse
} repeat }% fin du code ps
\end@ClosedObj}%
\ignorespaces} % fin de la commande PSTricks
\makeatother
%StopShownPreambleCommands
\begin{document}
\begin{pspicture}(-5,-5)(5,5)
\psframe*[linecolor=lightgray](-5,-4)(5,4)
\psgrid[gridlabels=0,subgriddiv=0](-5,-4)(5,4)
\multido{\nxDiv=-5+0.2}{50}{%
\psline(\nxDiv,-.1)(\nxDiv,0.1)}
\multido{\nyDiv=-4.0+0.2}{40}{%
\psline(-0.1,\nyDiv)(0.1,\nyDiv)}
\psset{linewidth=1mm}%
\parametricplotHSB[plotpoints=2000,linecolor=blue,HSB=false,yunit=0.5]{-5}{5}{%
t
/temps t 2e-3 mul def
/frequence2 100 def
frequence2 360 mul temps mul cos
1 mul 3 add
}
\parametricplotHSB[plotpoints=2000,yunit=1]{-5}{5}{%
t
/temps t 2e-3 mul def
/frequence1 1200 def
/frequence2 100 def
frequence2 360 mul temps mul cos
1 mul 3 add
frequence1 360 mul temps mul cos
4 mul
mul
0.1 mul
}
\end{pspicture}
\end{document}
|