summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2009-01-09 02:46:01 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2009-01-09 02:46:01 +0000
commit4b6d56d6a548fb8274ddaf58ada908e069a7ba90 (patch)
treeca245da243f9a346d45d658c6673ac04fe3bd865
parent79f180b0bb53942fafac31f52a8daf9ceaa77c68 (diff)
pst-func 0.58 2008/12/08
git-svn-id: svn://tug.org/texlive/trunk@11831 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/Changes5
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/README2
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdfbin2699707 -> 2854335 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex161
-rw-r--r--Master/texmf-dist/dvips/pst-func/pst-func.pro31
-rw-r--r--Master/texmf-dist/source/generic/pst-func/Makefile5
-rw-r--r--Master/texmf-dist/tex/generic/pst-func/pst-func.tex21
7 files changed, 210 insertions, 15 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-func/Changes b/Master/texmf-dist/doc/generic/pst-func/Changes
index 2c6049860b8..d1d858b05fe 100644
--- a/Master/texmf-dist/doc/generic/pst-func/Changes
+++ b/Master/texmf-dist/doc/generic/pst-func/Changes
@@ -1,4 +1,8 @@
..... pst-func.tex
+0.58 2008-12-08 - add the ChebyshevT and ChebyshevU (first and second kind)
+ the macros are only wrappers for the PS routines
+ - take the optional argument comma from pstricks-add into
+ account for \psPrintValue
0.57 2008-11-13 - new optional argument for the step width of \psPlotImp
0.56 2008-10-31 - fix bug with \psPoisson, thanks to Gerry Coombes
- index for the documentation
@@ -60,6 +64,7 @@
..... pst-func.pro
+0.10 2009-01-08 added ChebyshevT and ChebyshevU (first and second kind)
0.09 2008-03-22 added Bernstein code for Bernstein polynomials
0.08 2008-03-21 added BezierCurve code for Bezier curves of up to
order 9
diff --git a/Master/texmf-dist/doc/generic/pst-func/README b/Master/texmf-dist/doc/generic/pst-func/README
index 8006296267e..bc9e337e31e 100644
--- a/Master/texmf-dist/doc/generic/pst-func/README
+++ b/Master/texmf-dist/doc/generic/pst-func/README
@@ -41,4 +41,4 @@ CTAN server, f.ex. ftp://ftp.ctan.org
PSTricks is PostScript Tricks, the documentation cannot be run
with pdftex, use the sequence latex->dvips->ps2pdf.
-%% $Id: README 55 2008-11-14 12:01:12Z herbert $
+%% $Id: README 56 2008-11-14 15:55:45Z herbert $
diff --git a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
index 3cecc9ab010..18fc3f85dda 100644
--- a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
index 3f7b0a0a456..3b97fe8ed01 100644
--- a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
@@ -1,9 +1,10 @@
-%% $Id: pst-func-doc.tex 55 2008-11-14 12:01:12Z herbert $
+%% $Id: pst-func-doc.tex 72 2009-01-08 22:00:47Z herbert $
\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings
headexclude,footexclude,oneside]{pst-doc}
\usepackage[utf8]{inputenc}
\usepackage{pst-func}
\let\pstFuncFV\fileversion
+\usepackage{pstricks-add}
\usepackage{pst-math}
\lstset{pos=t,wide=true,language=PSTricks,
morekeywords={psGammaDist,psChiIIDist,psTDist,psFDist,psBetaDist,psPlotImpl},basicstyle=\footnotesize\ttfamily}
@@ -53,6 +54,7 @@ and last but not least \url{http://mathworld.wolfram.com}
\end{abstract}
+
\section{\nxLcs{psBezier\#}}
This macro can plot a B\'ezier spline from order 1 up to 9 which needs
(order+1) pairs of given coordinates.
@@ -169,8 +171,159 @@ changed in the usual way.
\end{pspicture}
\endgroup
-
+\clearpage
\section{Polynomials}
+
+\subsection{Chebyshev polynomials}
+
+The polynomials of the first (ChebyshevT) kind are defined through the identity
+
+\[ T_n(\cos\theta)=\cos(n\theta)\]
+
+They can be obtained from the generating functions
+\begin{align}
+ g_1(t,x) &= \frac{1-t^2}{1-2xt+t^2}\\
+ &= T_0(x)+2\sum_{n=1}^\infty T_n(x)t^n
+\end{align}
+
+and
+
+\begin{align}
+ g_2(t,x) &= \frac{1-xt}{1-2xt+t^2}\\
+ &= \sum_{n=0}^\infty T_n(x)t^n
+\end{align}
+
+The polynomials of second kind (ChebyshevU) can be generated by
+
+\begin{align}
+ g(t,x) &= \frac{1}{1-2xt+t^2}\\
+ &= \sum_{n=0}^\infty U_n(x)t^n
+\end{align}
+
+\LPack{pst-func} defines the \TeX-macros \Lcs{ChebyshevT} for the
+first kind and \Lcs{ChebyshevU} for the second kind of Chebyshev polynomials.
+These \TeX-macros cannot be used outside of PostScript, they are only wrappers
+for \verb+tx@FuncDict begin ChebyshevT end+ and the same for \Lcs{ChebyshevU}.
+
+\begin{center}
+\bgroup
+\psset{arrowscale=1.5,unit=3cm}
+\begin{pspicture}(-1.5,-1.5)(1.5,1.5)
+ \psaxes[ticks=none,labels=none]{->}(0,0)(-1.25,-1.25)(1.25,1.25)%
+ [Re$\{s_{21}\}$,0][Im$\{s_{21}\}$,90]
+ \pscircle(0,0){1}
+ \parametricplot[linecolor=blue,plotpoints=10000]{0}{1.5}{
+ /N 9 def
+ /x 2 N mul t \ChebyshevT def
+ /y 2 N mul 1 sub t \ChebyshevU def
+ x x 2 exp y 2 exp add div
+ y x 2 exp y 2 exp add div
+ }
+\end{pspicture}
+\egroup
+\end{center}
+
+\begin{lstlisting}
+\psset{arrowscale=1.5,unit=3cm}
+\begin{pspicture}(-1.5,-1.5)(1.5,1.5)
+ \psaxes[ticks=none,labels=none]{->}(0,0)(-1.25,-1.25)(1.25,1.25)%
+ [Re$\{s_{21}\}$,0][Im$\{s_{21}\}$,90]
+ \pscircle(0,0){1}
+ \parametricplot[linecolor=blue,plotpoints=10000]{0}{1.5}{
+ /N 9 def
+ /x 2 N mul t \ChebyshevT def
+ /y 2 N mul 1 sub t \ChebyshevU def
+ x x 2 exp y 2 exp add div
+ y x 2 exp y 2 exp add div
+ }
+\end{pspicture}
+\end{lstlisting}
+
+\begin{center}
+\bgroup
+\psset{xunit=4cm,yunit=3cm,plotpoints=1000}
+\begin{pspicture}(-1.2,-2)(2,1.5)
+ \psaxes[Dx=0.2]{->}(0,0)(-1.25,-1.2)(1.25,1.2)
+ \psset{linewidth=1.5pt}
+ \psplot[linestyle=dashed]{-1}{1}{1 x \ChebyshevT}
+ \psplot[linecolor=black]{-1}{1}{2 x \ChebyshevT}
+ \psplot[linecolor=black]{-1}{1}{3 x \ChebyshevT}
+ \psplot[linecolor=blue]{-1}{1}{4 x \ChebyshevT }
+ \psplot[linecolor=red]{-1}{1}{5 x \ChebyshevT }
+\end{pspicture}
+\egroup
+\end{center}
+
+
+
+\begin{lstlisting}
+\psset{xunit=4cm,yunit=3cm,plotpoints=1000}
+\begin{pspicture}(-1.2,-2)(2,1.5)
+ \psaxes[Dx=0.2]{->}(0,0)(-1.25,-1.2)(1.25,1.2)
+ \psset{linewidth=1.5pt}
+ \psplot[linestyle=dashed]{-1}{1}{1 x \ChebyshevT}
+ \psplot[linecolor=black]{-1}{1}{2 x \ChebyshevT}
+ \psplot[linecolor=black]{-1}{1}{3 x \ChebyshevT}
+ \psplot[linecolor=blue]{-1}{1}{4 x \ChebyshevT }
+ \psplot[linecolor=red]{-1}{1}{5 x \ChebyshevT }
+\end{pspicture}
+\end{lstlisting}
+
+\begin{center}
+\bgroup
+\psset{xunit=4cm,yunit=3cm,plotpoints=1000}
+\begin{pspicture*}(-1.5,-1.5)(1.5,1.5)
+ \psaxes[Dx=0.2]{->}(0,0)(-1.15,-1.1)(1.15,1.1)
+ \psset{linewidth=1.5pt}
+ \psplot[linecolor=black]{-1}{1}{2 x \ChebyshevU}
+ \psplot[linecolor=black]{-1}{1}{3 x \ChebyshevU}
+ \psplot[linecolor=blue]{-1}{1}{4 x \ChebyshevU }
+ \psplot[linecolor=red]{-1}{1}{5 x \ChebyshevU }
+\end{pspicture*}
+\egroup
+\end{center}
+
+
+
+\begin{lstlisting}
+\psset{xunit=4cm,yunit=3cm,plotpoints=1000}
+\begin{pspicture*}(-1.5,-1.5)(1.5,1.5)
+ \psaxes[Dx=0.2]{->}(0,0)(-1.15,-1.1)(1.15,1.1)
+ \psaxes[Dx=0.2]{->}(0,0)(-1.25,-1.2)(1.25,1.2)
+ \psset{linewidth=1.5pt}
+ \psplot[linecolor=black]{-1}{1}{2 x \ChebyshevU}
+ \psplot[linecolor=black]{-1}{1}{3 x \ChebyshevU}
+ \psplot[linecolor=blue]{-1}{1}{4 x \ChebyshevU }
+ \psplot[linecolor=red]{-1}{1}{5 x \ChebyshevU }
+\end{pspicture*}
+\end{lstlisting}
+
+\begin{center}
+\bgroup
+\psset{xunit=4cm,yunit=3cm,plotpoints=1000}
+\begin{pspicture}(-1.25,-1.2)(1.25,1.2)
+ \psaxes[Dx=0.2]{->}(0,0)(-1.25,-1.1)(1.25,1.1)
+ \psset{linewidth=1.5pt}
+ \psplot[linecolor=black]{-1}{1}{x ACOS 2 mul RadtoDeg cos}
+ \psplot[linecolor=black]{-1}{1}{x ACOS 3 mul RadtoDeg cos}
+ \psplot[linecolor=blue]{-1}{1}{x ACOS 4 mul RadtoDeg cos}
+ \psplot[linecolor=red]{-1}{1}{x ACOS 5 mul RadtoDeg cos}
+\end{pspicture}
+\egroup
+\end{center}
+
+\begin{lstlisting}
+\psset{xunit=4cm,yunit=3cm,plotpoints=1000}
+\begin{pspicture}(-1.25,-1.2)(1.25,1.2)
+ \psaxes[Dx=0.2]{->}(0,0)(-1.25,-1.2)(1.25,1.2)
+ \psset{linewidth=1.5pt}
+ \psplot[linecolor=black]{-1}{1}{x ACOS 2 mul RadtoDeg cos}
+ \psplot[linecolor=black]{-1}{1}{x ACOS 3 mul RadtoDeg cos}
+ \psplot[linecolor=blue]{-1}{1}{x ACOS 4 mul RadtoDeg cos}
+ \psplot[linecolor=red]{-1}{1}{x ACOS 5 mul RadtoDeg cos}
+\end{pspicture}
+\end{lstlisting}
+
\subsection{\Lcs{psPolynomial}}
The polynomial function is defined as
%
@@ -1559,7 +1712,7 @@ There are the following new options:
\makebox[1em]{\iA}
\makebox[5em]{\psPrintValue[PSfont=Helvetica]{\iA\space sin}}
\makebox[4em][r]{\psPrintValue[PSfont=Courier,fontscale=10,decimals=3]{\iA\space cos}}\hspace{1em}
- \makebox[5em]{\psPrintValue[valuewidth=15,linecolor=blue,PSfont=AvantGarde]{\iA\space sqrt}}
+ \makebox[5em]{\psPrintValue[comma,valuewidth=15,linecolor=blue,PSfont=AvantGarde]{\iA\space sqrt}}
\makebox[7em]{\psPrintValue[PSfont=Times-Italic]{\iA\space dup sin exch cos add}}
\makebox[6em]{\psPrintValue[PSfont=Palatino-Roman]{\iA\space dup sin dup mul exch cos dup mul add}}\\}
\end{center}
@@ -1574,7 +1727,7 @@ There are the following new options:
\makebox[1em]{\iA}
\makebox[5em]{\psPrintValue[PSfont=Helvetica]{\iA\space sin}}
\makebox[4em][r]{\psPrintValue[PSfont=Courier,fontscale=10,decimals=3]{\iA\space cos}\hspace{1em}}
- \makebox[5em]{\psPrintValue[valuewidth=15,linecolor=blue,PSfont=AvantGarde]{\iA\space sqrt}}
+ \makebox[5em]{\psPrintValue[comma,valuewidth=15,linecolor=blue,PSfont=AvantGarde]{\iA\space sqrt}}
\makebox[7em]{\psPrintValue[PSfont=Times-Italic]{\iA\space dup sin exch cos add}}
\makebox[6em]{\psPrintValue[PSfont=Palatino-Roman]{\iA\space dup sin dup mul exch cos dup mul add}}\\}
\end{lstlisting}
diff --git a/Master/texmf-dist/dvips/pst-func/pst-func.pro b/Master/texmf-dist/dvips/pst-func/pst-func.pro
index 8a4b0e98f8e..e1093708323 100644
--- a/Master/texmf-dist/dvips/pst-func/pst-func.pro
+++ b/Master/texmf-dist/dvips/pst-func/pst-func.pro
@@ -1,4 +1,4 @@
-%% $Id: pst-func.pro 55 2008-11-14 12:01:12Z herbert $
+%% $Id: pst-func.pro 72 2009-01-08 22:00:47Z herbert $
%%
%% This is file `pst-func.pro',
%%
@@ -16,7 +16,7 @@
%% `pst-func' is a PSTricks package to plot special math functions
%%
%%
-%% version 0.09 / 2008-03-22 Herbert Voss <voss _at_ pstricks.de>
+%% version 0.10 / 2009-01-08 Herbert Voss <voss _at_ pstricks.de>
%
/tx@FuncDict 100 dict def
tx@FuncDict begin
@@ -282,7 +282,32 @@ tx@FuncDict begin
sum z ln sub CEuler z mul sub
end
} def
-
+%
+/ChebyshevT { 5 dict begin % z on stack
+ /xtmp exch def
+ /n exch def
+ 0 0 1 n .5 mul floor {
+ /k exch def
+ xtmp xtmp mul 1 sub k exp
+ xtmp n 2 k mul sub exp mul
+ n 2 k mul MoverN mul
+ add
+ } for
+ end
+} def
+%
+/ChebyshevU {5 dict begin % z on stack
+ /xtmp exch def
+ /n exch def
+ 0 0 1 n .5 mul floor {
+ /k exch def
+ xtmp xtmp mul 1 sub k exp
+ xtmp n 2 k mul sub exp mul
+ n 1 add 2 k mul 1 add MoverN mul
+ add
+ } for
+ end
+} def
%
% subroutines for complex numbers, given as an array [a b]
% which is a+bi = Real+i Imag
diff --git a/Master/texmf-dist/source/generic/pst-func/Makefile b/Master/texmf-dist/source/generic/pst-func/Makefile
index 8a27072a75e..0d67fc8c284 100644
--- a/Master/texmf-dist/source/generic/pst-func/Makefile
+++ b/Master/texmf-dist/source/generic/pst-func/Makefile
@@ -14,8 +14,7 @@ ARCHFILES = $(PACKAGE).sty $(PACKAGE).tex $(PACKAGE).pro $(MAIN).tex README Chan
TDS = ~/PSTricks/PSTricks-TDS
-all : doc clean
-# clean
+all : doc clean tds clean
doc: $(MAIN).pdf
$(MAIN).pdf : $(MAIN).ps
@@ -31,7 +30,7 @@ $(MAIN).dvi : $(MAIN).tex
if ! test -f $(basename $<).idx ; then touch $(basename $<).idx; fi
makeindex -s gglo.ist -t $(basename $<).glg -o $(basename $<).gls \
$(basename $<).glo
- makeindex -t $(basename $<).ilg -o $(basename $<).ind \
+ makeindex -s pst-doc.ist -t $(basename $<).ilg -o $(basename $<).ind \
$(basename $<).idx
bibtex $(basename $<)
$(LATEX) $<
diff --git a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
index dd9c71b80e5..4f07a235ddd 100644
--- a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
+++ b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
@@ -1,4 +1,4 @@
-%% $Id: pst-func.tex 55 2008-11-14 12:01:12Z herbert $
+%% $Id: pst-func.tex 72 2009-01-08 22:00:47Z herbert $
%%
%% This is file `pst-func.tex',
%%
@@ -29,13 +29,19 @@
% interface to the `xkeyval' package
\pst@addfams{pst-func}
-\def\fileversion{0.57}
-\def\filedate{2008/11/14}
+\def\fileversion{0.58}
+\def\filedate{2008/12/08}
\message{`PST-func' v\fileversion, \filedate\space (hv)}
%
\pstheader{pst-func.pro}
\pstheader{pst-math.pro}% for GAMMALN
%
+% Shortcuts ....
+
+\def\ChebyshevT{ tx@FuncDict begin ChebyshevT end }
+\def\ChebyshevU{ tx@FuncDict begin ChebyshevU end }
+
+%
\define@key[psset]{pst-func}{xShift}[0]{\def\psk@xShift{#1}}
\psset[pst-func]{xShift=0}
%
@@ -322,7 +328,14 @@
\addto@pscode{
gsave \psk@PSfont findfont \psk@fontscale scalefont setfont
#1 \psk@decimals -1 gt { 10 \psk@decimals exp dup 3 1 roll mul cvi exch div } if
- \psk@valuewidth string cvs 0 0 moveto show grestore
+ \psk@valuewidth string cvs /Output exch def % save output
+ \ifPst@comma % do we have to change dot to comma
+ 0 1 Output length 1 sub {
+ /Index exch def
+ Output Index get 46 eq { Output Index 44 put } if
+ } for
+ \fi
+ 0 0 moveto Output show grestore
}%
\end@SpecialObj%
}