summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-14 23:42:04 +0000
committerKarl Berry <karl@freefriends.org>2010-09-14 23:42:04 +0000
commit3d0cb91a86809c8becca994b9f708c9cc8eb7fdc (patch)
treee49b2a952719048b3119796e74598ea01f9c95d0
parent4ff035e5c9345f5e6e713650e83adc236471ecca (diff)
pst-bspline update (4sep10)
git-svn-id: svn://tug.org/texlive/trunk@19733 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/generic/pst-bspline/README2
-rw-r--r--Master/texmf-dist/doc/generic/pst-bspline/pst-bspline-doc.pdfbin88723 -> 86397 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-bspline/pst-bspline-doc.tex74
-rw-r--r--Master/texmf-dist/tex/generic/pst-bspline/pst-bspline.tex32
-rw-r--r--Master/texmf-dist/tex/latex/pst-bspline/pst-bspline.sty16
5 files changed, 59 insertions, 65 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-bspline/README b/Master/texmf-dist/doc/generic/pst-bspline/README
index df0f5ffeafc..a5bc5e71956 100644
--- a/Master/texmf-dist/doc/generic/pst-bspline/README
+++ b/Master/texmf-dist/doc/generic/pst-bspline/README
@@ -2,7 +2,7 @@
%%
%% Michael Sharpe <msharpe@ucsd.edu>
%%
-%% Version 1.2, 2010/06/12
+%% Version 1.3, 2010/09/04
%%
%% License: Free
diff --git a/Master/texmf-dist/doc/generic/pst-bspline/pst-bspline-doc.pdf b/Master/texmf-dist/doc/generic/pst-bspline/pst-bspline-doc.pdf
index a72c26b22c8..c116ed3af90 100644
--- a/Master/texmf-dist/doc/generic/pst-bspline/pst-bspline-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pst-bspline/pst-bspline-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-bspline/pst-bspline-doc.tex b/Master/texmf-dist/doc/generic/pst-bspline/pst-bspline-doc.tex
index f991acd10e4..1de47c211ac 100644
--- a/Master/texmf-dist/doc/generic/pst-bspline/pst-bspline-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-bspline/pst-bspline-doc.tex
@@ -3,7 +3,7 @@
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{pstricks}
-\usepackage{multido,pst-node,pst-bspline,pstricks-add}
+\usepackage{multido,pst-bspline,pstricks-add}
\usepackage{amssymb}
\usepackage[parfill]{parskip}
\usepackage{hyperref}
@@ -35,7 +35,7 @@ The {\tt pst-Bspline} package implements this algorithm as \verb|\psBspline|, wh
\noindent
\verb|\psBspline(.5,.5)(2,0)(5,2)(6,4)(4,5)(2,4)|
-\noindent The coordinates are the B-spline control points. Aside from the usual keywords, like {\tt linestyle}, {\tt linecolor} and {\tt arrows}, there is a Boolean keyword {\tt showframe}. The effect of {\tt showframe=true} is to show the intermediate points and lines in the algorithm described above.
+\noindent The coordinates are the B-spline control points. Aside from the usual keywords, like {\tt linestyle}, {\tt linecolor} and {\tt arrows}, there is a Boolean keyword {\tt showframe}. The effect of {\tt showframe} is to show the intermediate points and lines in the algorithm described above.
There is another optional argument that can be applied if you wish to be able to refer to any of the points constructed in the algorithm. By example,
@@ -44,7 +44,7 @@ There is another optional argument that can be applied if you wish to be able to
\noindent sets the root of the naming scheme to {\tt B}, the effect of which is that the B-spline control points will be nodes of type \verb|\pnode| with names {\tt B0}, {\tt B1} and so on, the other points being similarly named {\tt BL0}, {\tt BL1}, ... , {\tt BR0}, {\tt BR1}, ... , {\tt BS0}, {\tt BS1}, ... . For example, to draw a line between {\tt BL1} and {\tt BS4}, just use \verb|\ncline(BL1)(BS4)|.
-The algorithm is implemented entirely in PSTricks code with PostScript specials, but no PostScript header file, depending for the most part on the flexibility of nodes, and above all the \verb|\multido| macro, which allows one to construct with relative ease items that look and feel like arrays. Use of \verb|\SpecialCoor| is essential.
+The algorithm is implemented entirely in PSTricks code, without any PostScript programming at all, depending for the most part on the flexibility of nodes, and above all the \verb|\multido| macro, which allows one to construct with relative ease items that look and feel like arrays. Use of \verb|\SpecialCoor| is essential.
There is a closely related macro \verb|\psBsplineE| which removes the first and last B\'ezier segments, much as \verb|\psecurve| acts in relation to \verb|\pscurve|, allowing one one to draw B-splines with non-zero curvature at the endpoints.
@@ -56,8 +56,8 @@ There is a closely related macro \verb|\psBsplineE| which removes the first and
\begin{document}
\SpecialCoor % essential for pst-bspline package
\psset{unit=.6in}
-\begin{pspicture}[showgrid=true](-.5,-.5)(6,5)
-\psBspline[showframe=true]{B}(.5,.5)(2,0)(5,2)(6,4)(4,5)(2,4)
+\begin{pspicture}[showgrid](-.5,-.5)(6,5)
+\psBspline[showframe]{B}(.5,.5)(2,0)(5,2)(6,4)(4,5)(2,4)
\multido{\i=0+1}{5}{\uput[20](B\i){B\i}}
\uput[90](B5){B5}
\uput[90](BS1){S1}
@@ -73,8 +73,8 @@ There is a closely related macro \verb|\psBsplineE| which removes the first and
\vspace{1pc}
\begin{center}
\psset{unit=.6in}
-\begin{pspicture}[showgrid=true](-.5,-.5)(6,5)
-\psBspline[showframe=true]{B}(.5,.5)(2,0)(5,2)(6,4)(4,5)(2,4)
+\begin{pspicture}[showgrid](-.5,-.5)(6,5)
+\psBspline[showframe]{B}(.5,.5)(2,0)(5,2)(6,4)(4,5)(2,4)
\multido{\i=0+1}{5}{\uput[20](B\i){B\i}}
\uput[90](B5){B5}
\uput[90](BS1){S1}
@@ -94,8 +94,8 @@ There is a closely related macro \verb|\psBsplineE| which removes the first and
\begin{document}
\SpecialCoor % essential for pst-bspline package
\psset{unit=.6in}
-\begin{pspicture}[showgrid=true](-.5,-.5)(6,5)
-\psBsplineE[showframe=true]{B}(.5,.5)(2,0)(5,2)(6,4)(4,5)(2,4)
+\begin{pspicture}[showgrid](-.5,-.5)(6,5)
+\psBsplineE[showframe]{B}(.5,.5)(2,0)(5,2)(6,4)(4,5)(2,4)
\multido{\i=0+1}{5}{\uput[20](B\i){B\i}}
\uput[90](B5){B5}
\uput[90](BS1){S1}
@@ -111,8 +111,8 @@ There is a closely related macro \verb|\psBsplineE| which removes the first and
\vspace{1pc}
\begin{center}
\psset{unit=.6in}
-\begin{pspicture}[showgrid=true](-.5,-.5)(6,5)
-\psBsplineE[showframe=true]{B}(.5,.5)(2,0)(5,2)(6,4)(4,5)(2,4)
+\begin{pspicture}[showgrid](-.5,-.5)(6,5)
+\psBsplineE[showframe]{B}(.5,.5)(2,0)(5,2)(6,4)(4,5)(2,4)
\multido{\i=0+1}{5}{\uput[20](B\i){B\i}}
\uput[90](B5){B5}
\uput[90](BS1){S1}
@@ -146,8 +146,8 @@ The macro in this case is \verb|\psBsplineC|, where the {\tt C} stands for Close
\begin{document}
\SpecialCoor % essential for pst-bspline package
\psset{unit=.6in}
-\begin{pspicture}[showgrid=true](-.5,-.5)(6,5)
-\psBsplineC[showframe=true]{B}(.5,.5)(2,0)(5,2)(6,4)(4,5)(2,4)
+\begin{pspicture}[showgrid](-.5,-.5)(6,5)
+\psBsplineC[showframe]{B}(.5,.5)(2,0)(5,2)(6,4)(4,5)(2,4)
\multido{\i=0+1}{5}{\uput[20](B\i){B\i}}
\uput[90](B5){B5}\uput[90](BS1){S1}
\uput[90](BS2){S2}\uput[180](BS3){S3}
@@ -160,8 +160,8 @@ The macro in this case is \verb|\psBsplineC|, where the {\tt C} stands for Close
\vspace{1pc}
\begin{center}
\psset{unit=.6in}
-\begin{pspicture}[showgrid=true](-.5,-.5)(6,5)
-\psBsplineC[showframe=true]{B}(.5,.5)(2,0)(5,2)(6,4)(4,5)(2,4)
+\begin{pspicture}[showgrid](-.5,-.5)(6,5)
+\psBsplineC[showframe]{B}(.5,.5)(2,0)(5,2)(6,4)(4,5)(2,4)
\multido{\i=0+1}{5}{\uput[20](B\i){B\i}}
\uput[90](B5){B5}
\uput[90](BS1){S1}
@@ -205,7 +205,7 @@ for the $B_k$. In matrix form, this becomes the tridiagonal system
&1&4&1\\
&&\cdots&&1\\
&&&1&4\end{pmatrix}
-\begin{pmatrix}B_1\\B_2\\B_3\\ \cdots\\ B_{n-1}\end{pmatrix}=ß
+\begin{pmatrix}B_1\\B_2\\B_3\\ \cdots\\ B_{n-1}\end{pmatrix}=§
\begin{pmatrix}6S_1-S_0\\6S_2\\6S_3\\ \cdots\\6S_{n-1}-S_{n}\end{pmatrix}
\]
The LU decomposition of the tridiagonal matrix may be seen to take the form
@@ -262,7 +262,7 @@ for the $B_k$, $1\le k\le n$. In matrix form, this becomes the system
&1&4&1\\
&&\cdots&&1\\
1&&&1&4\end{pmatrix}
-\begin{pmatrix}B_1\\B_2\\B_3\\ \cdots\\ B_{n}\end{pmatrix}=ß
+\begin{pmatrix}B_1\\B_2\\B_3\\ \cdots\\ B_{n}\end{pmatrix}=§
\begin{pmatrix}6S_1\\6S_2\\6S_3\\ \cdots\\6S_{n}\end{pmatrix}
\]
Let $(x_k,y_k)=6S_k$. We perform Gaussian elimination on the matrix
@@ -336,10 +336,10 @@ The following example illustrates that there is a difference between \verb|\pscc
\usepackage{pstricks}
\usepackage{pst-bspline,pstricks-add}
\begin{document}
-\begin{pspicture}[showgrid=true](-.5,-.5)(6,5)
-\pnodes{P}(0,1)(2,0)(5,2)(6,4)(4,5)(2,4)%
-\psBsplineInterpC{P}{5}%
-\psBsplineNodesC*[linecolor=gray!40]{PB}{5}%
+\begin{pspicture}[showgrid](-.5,-.5)(6,5)
+\pnodes{P}(0,1)(2,0)(5,2)(6,4)(4,5)(2,4)
+\psBsplineInterpC{P}{5}
+\psBsplineNodesC*[linecolor=gray!40]{PB}{5}
\psccurve[linecolor=red,showpoints=true](0,1)(2,0)(5,2)(6,4)(4,5)(2,4)
\end{pspicture}
\end{document}
@@ -349,33 +349,15 @@ The following example illustrates that there is a difference between \verb|\pscc
\begin{center}
Slight difference between psccurve and B-spline interpolation\\
\vspace*{2pc}
-\begin{pspicture}[showgrid=true](-.5,-.5)(6,5)
-\pnodes{P}(0,1)(2,0)(5,2)(6,4)(4,5)(2,4)%
-\psBsplineInterpC{P}{5}%
-\psBsplineNodesC*[linecolor=gray!40]{PB}{5}%
+\begin{pspicture}[showgrid](-.5,-.5)(6,5)
+\pnodes{P}(0,1)(2,0)(5,2)(6,4)(4,5)(2,4)
+\psBsplineInterpC{P}{5}
+\psBsplineNodesC*[linecolor=gray!40]{PB}{5}
\psccurve[linecolor=red,showpoints=true](0,1)(2,0)(5,2)(6,4)(4,5)(2,4)
\end{pspicture}
\end{center}
-A B-spline curve can in many cases provide a good function interpolation mechanism, but the result is not guaranteed to be the graph of a function.
-\begin{verbatim}
-\begin{center}
-\begin{pspicture}[showgrid=true](-.5,-.5)(6,4)
-\psdots(0,3.5)(1,.5)(3,2.5)(4,0)(5,2)(6,.5)
-\psaxes(0,0)(-.5,-.5)(6,4)
-\psbspline(0,3.5)(1,.5)(3,2.5)(4,0)(5,2)(6,.5)
-\end{pspicture}
-\end{center}
-\end{verbatim}
-
-\begin{center}
-\begin{pspicture}(-.5,-.5)(6,4)
-\psdots(0,3.5)(1,.5)(3,2.5)(4,0)(5,2)(6,.5)
-\psbspline(0,3.5)(1,.5)(3,2.5)(4,0)(5,2)(6,.5)
-\psaxes(0,0)(-.5,-.5)(6,4)
-\end{pspicture}
-\end{center}
-\vspace{12pt}
+\newpage
\begin{verbatim}
\documentclass{article}
\usepackage{graphicx}
@@ -383,7 +365,7 @@ A B-spline curve can in many cases provide a good function interpolation mechani
\usepackage{pst-bspline,pstricks-add}
\begin{document}
\psset{unit=.25in}
-\begin{pspicture}[showgrid=true](-.5,-.5)(6,5)
+\begin{pspicture}[showgrid](-.5,-.5)(6,5)
\pnodes{P}(0,1)(2,0)(5,2)(6,4)(4,5)(2,4)
\pnode(3,3){C}
\multido{\ra=0+.05,\rb=1+.05,\i=30+1}{40}{%
@@ -398,7 +380,7 @@ A B-spline curve can in many cases provide a good function interpolation mechani
\vspace{1pc}
\begin{center}
\psset{unit=.25in}
-\begin{pspicture}[showgrid=true](-.5,-.5)(6,5)
+\begin{pspicture}[showgrid](-.5,-.5)(6,5)
\pnodes{P}(0,1)(2,0)(5,2)(6,4)(4,5)(2,4)
\pnode(3,3){C}
\multido{\ra=0+.05,\rb=1+.05,\i=30+1}{40}{%
diff --git a/Master/texmf-dist/tex/generic/pst-bspline/pst-bspline.tex b/Master/texmf-dist/tex/generic/pst-bspline/pst-bspline.tex
index 633a463f474..ded6c31d4f4 100644
--- a/Master/texmf-dist/tex/generic/pst-bspline/pst-bspline.tex
+++ b/Master/texmf-dist/tex/generic/pst-bspline/pst-bspline.tex
@@ -1,15 +1,22 @@
%% BEGIN pst-bspline.tex
%% Author: Michael Sharpe (msharpe at ucsd.edu)
-\def\fileversion{1.2}
-\def\filedate{2010/06/12}
%%
%\message{ v\fileversion, \filedate}
\csname PSTBsplineLoaded\endcsname
\let\PSTBsplineLoaded\endinput
-\ProvidesFile{pst-bspline.tex}[\filedate\space v\fileversion\space Bspline routines for pstricks]
-\ifx\PSTnodesLoaded\endinput\else\input pst-node.tex \fi\relax
-\edef\TheAtCode{\the\catcode`\@}\catcode`\@=11
+
+\ifx\PSTricksLoaded\endinput \else\input pstricks.tex\fi
+\ifx\PSTnodeLoaded\endinput \else\input pst-node.tex\fi
+\ifx\PSTXKeyLoaded\endinput \else\input pst-xkey \fi
+\def\fileversion{1.3}
+\def\filedate{2010/09/04}
+
+\message{`pst-bspline' v\fileversion, \filedate\space Bspline routines for pstricks (ms)}
%
+\edef\TheAtCode{\the\catcode`\@} \catcode`\@=11\relax
+\pst@addfams{pst-bspline}
+\SpecialCoor
+
%\newcount\pst@args%used in several macros--now defined in pst-node.tex
\def\PST@root{}
\newcount\bsp@args
@@ -31,9 +38,8 @@
\bsp@seqfalse%
}%
% showframe key and its default are global
-\newif\ifshowframe%
-\def\psset@showframe#1{\@nameuse{showframe#1}}%
-\psset@showframe{false}%
+\define@boolkey[psset]{pst-bspline}[Pst@]{showframe}[true]{}
+\psset[pst-bspline]{showframe=false}%
%
%Bspline drawing macros
\def\psBsplineNodes{\def\pst@par{}\pst@object{psBsplineNodes}}%
@@ -93,7 +99,7 @@
% Define the left and right bezier control points in each interval. These are
% denoted (root+) R0, L1, R1, L2, R2, etc
\multido{\ia=0+1,\ib=1+1}{\bsp@args}{%
-\ifshowframe%
+\ifPst@showframe%
\ncline[linestyle=dashed,linecolor=gray,arrows=*-*]{\bsp@root\ia}{\bsp@root\ib}%
\fi%
\nodexn{.667(\bsp@root\ia)+.333(\bsp@root\ib)}{\bsp@root R\ia}%
@@ -102,11 +108,11 @@
%Finally, define the bezier endpoints for each interval
\advance\bsp@args by \m@ne%
\mmultido{\ia=0+1}{\bsp@args}{%
-\ifshowframe%
+\ifPst@showframe%
\ncline[linestyle=solid,linecolor=red]{\bsp@root L\ia}{\bsp@root R\ia}%
\fi%
\midAB(\bsp@root L\ia)(\bsp@root R\ia){\bsp@root S\ia}%
-\ifshowframe%
+\ifPst@showframe%
\psdot[linecolor=red](\bsp@root S\ia)%
\fi%
}%
@@ -143,9 +149,9 @@
\advance\bsp@cntB by \@ne%
\psbezier[arrows=-\bsp@arrowB,showpoints=false](\bsp@root S\the\bsp@cntA)%
(\bsp@root R\the\bsp@cntA)(\bsp@root L\the\bsp@cntB)(\bsp@root S\the\bsp@cntB)%
- \ifshowframe \psdot[linecolor=red](\bsp@root L\the\bsp@cntB) \fi%
+ \ifPst@showframe \psdot[linecolor=red](\bsp@root L\the\bsp@cntB) \fi%
\fi% end \ifbsp@closed
-\ifshowframe%
+\ifPst@showframe%
\psdot[linecolor=red](\bsp@root R0)%
\psdot[linecolor=red](\bsp@root L\the\bsp@args)%
\fi%
diff --git a/Master/texmf-dist/tex/latex/pst-bspline/pst-bspline.sty b/Master/texmf-dist/tex/latex/pst-bspline/pst-bspline.sty
index 6500f4dbefb..58c9eca005b 100644
--- a/Master/texmf-dist/tex/latex/pst-bspline/pst-bspline.sty
+++ b/Master/texmf-dist/tex/latex/pst-bspline/pst-bspline.sty
@@ -1,5 +1,11 @@
-\ProvidesPackage{pst-bspline}
-
-\input{pst-bspline}
-
-\endinput \ No newline at end of file
+\RequirePackage{pstricks}
+\ProvidesPackage{pst-bspline}[2007/12/23 package wrapper for
+ pst-bspline.tex (hv)]
+\input{pst-bspline.tex}
+%\IfFileExists{pst-bspline.pro}{%
+% \ProvidesFile{pst-bspline.pro}
+% [2007/03/23 v. 0.01, PostScript prologue file (hv)]
+% \@addtofilelist{pst-bspline.pro}}{}%
+\ProvidesFile{pst-bspline.tex}
+ [\filedate\space v\fileversion\space `pst-bspline' (ms)]
+\endinput