summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pstricks-examples-en/30-04-11.ltx
blob: 0f98d4ef72eae1c10d6adffde3b6e0da1576bc88 (plain)
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
%% 
%%  A DANTE-Edition example
%% 
%%  Example 30-04-11 on page 610.
%% 
%%  Copyright (C) 2011 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[]{article}
\pagestyle{empty}
\setlength\textwidth{375.57637pt}
\setlength\parindent{0pt}

\usepackage{pstricks-add}
\def\Lissa{t dup 2 RadtoDeg mul cos 3.5 mul exch 6 mul RadtoDeg sin 3.5 mul}

\begin{document}
\psset{unit=0.75cm}
\begin{pspicture}(-4,-5)(4,5)%  secant gradient
  \parametricplot[plotpoints=500,linewidth=1.5pt]{0}{3.141592}{\Lissa}
  \multido{\r=0.000+0.314}{11}{%
    \psplotTangent[arrows=<->,linecolor=black!40]{\r}{1.5}{\Lissa}}
  \multido{\r=0.157+0.314}{11}{%
    \psplotTangent[arrows=<->,linecolor=black!40]{\r}{1.5}{\Lissa}}
  \rput(0,4.5){secant gradient}
\end{pspicture}\hfill%
%
\def\LissaAlg{3.5*cos(2*t)|3.5*sin(6*t)}
\def\LissaAlgDer{-7*sin(2*t)|21*cos(6*t)}
\begin{pspicture}(-4,-5)(4,5)%  tangent gradient
  \parametricplot[algebraic,plotpoints=500,
    linewidth=1.5pt]{0}{3.141592}{\LissaAlg}
  \multido{\r=0.000+0.314}{11}{%
    \psplotTangent[algebraic,arrows=<->,linecolor=black!40]{\r}{1.5}{\LissaAlg} }
  \multido{\r=0.157+0.314}{11}{%
  \psplotTangent[algebraic,arrows=<->,linecolor=black!40,%
     Derive=\LissaAlgDer]{\r}{1.5}{\LissaAlg} }
  \rput(0,4.5){tangent gradient}
\end{pspicture}
\end{document}