summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-10-24 23:37:47 +0000
committerKarl Berry <karl@freefriends.org>2010-10-24 23:37:47 +0000
commit9e2770a473f440628f782f2af002bb98475d61e1 (patch)
treeea0060b8713a317e345ea6fbaeed202dc366a744 /Master/texmf-dist/doc
parented591f3387c5ae42c8da11c3fca9ecc305b9ff3c (diff)
pst-bspline (19oct10)
git-svn-id: svn://tug.org/texlive/trunk@20173 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r--Master/texmf-dist/doc/generic/pst-bspline/README4
-rw-r--r--Master/texmf-dist/doc/generic/pst-bspline/pst-bspline-doc.pdfbin101556 -> 111493 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-bspline/pst-bspline-doc.tex52
3 files changed, 50 insertions, 6 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-bspline/README b/Master/texmf-dist/doc/generic/pst-bspline/README
index 3e8dd393146..5224a25cf46 100644
--- a/Master/texmf-dist/doc/generic/pst-bspline/README
+++ b/Master/texmf-dist/doc/generic/pst-bspline/README
@@ -2,10 +2,10 @@
%%
%% Michael Sharpe <msharpe@ucsd.edu>
%%
-%% Version 1.4, 2010/10/14
+%% Version 1.41, 2010/10/19
%%
%% License: Free
-This package draws uniform, cubic Bspline curves, open and closed, based on a sequence of Bspline control points. There is also code which permits drawing the open or closed cubic Bspline curve interplating a sequence of points. This version adds a \thickBspline macro.
+This package draws uniform, cubic B-spline curves, open and closed, based on a sequence of B-spline control points. There is also code which permits drawing the open or closed cubic B-spline curve interpolating a sequence of points. This version adds a \thickBspline macro.
The .tex and .sty files should be installed in a folder searched by TeX. All documentation is in pst-bspline-doc.pdf. \ No newline at end of file
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 6c395adbf4f..7b4beb03b8d 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 9e08c19d7f1..8e034e19af3 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
@@ -1,3 +1,4 @@
+\listfiles
\documentclass[dvips,11pt]{article}
\usepackage{amsmath}
\usepackage{amsthm}
@@ -14,7 +15,7 @@
\large Michael Sharpe\\[10pt]
msharpe@ucsd.edu}
\end{center}
-A cubic uniform B-spline curve with control points $B_0 \ldots B_n$ is a curve parametrized by the interval $[0,n]$, which is $C^2$-continuous (that is, has continuous curvature) and is on each interval $[k-1,k]$ given by a cubic B\'ezier curve whose control points are derived from the $(B_k)$. These curves are discussed in any reasonably modern text on Numerical Analysis. One easily accessible source is the UCLA lecture notes of Kirby Baker:
+A cubic uniform B-spline curve with control points $B_0 \ldots B_n$ is a curve parametrized by the interval $[0,n]$, which is, except in degenerate cases, $C^2$-continuous (that is, has continuous curvature) and is on each interval $[k-1,k]$ given by a cubic B\'ezier curve whose control points are derived from the $(B_k)$. These curves are discussed in any reasonably modern text on Numerical Analysis. One easily accessible source is the UCLA lecture notes of Kirby Baker:
\noindent\url{http://www.math.ucla.edu/~baker/149.1.02w/handouts/dd_splines.pdf}
@@ -316,20 +317,27 @@ for k=n-2 downto 1
x(k)=x(k)-m(k)* x(k+1)-c(k)*x(n)
y(k)=y(k)-m(k)* y(k+1)-c(k)*y(n)
\end{verbatim}
-This algorithm is implemented in \TeX/PostScript code in {\tt pst-Bspline.tex} and may be invoked using the macro
+This algorithm is implemented in \TeX/PostScript code in {\tt pst-bspline.tex} and may be invoked using the macro
\begin{verbatim}
\psBsplineInterpC{<node root>}{<index>}
\end{verbatim}
- You must previously have defined a sequence, say {\tt S0} $\cdots$ {\tt S100} of \verb|\pnode|s that you plan to interpolate with a closed curve. Then
+ You must previously have defined a sequence, say {\tt S0} $\cdots$ {\tt S100} of \verb|\pnode|s that you plan to interpolate with a closed curve. If you used \verb|\pnodes| to do this, it would have constructed a macro \verb|\Snodecount| to store the value $100$. Then
\begin{verbatim}
\psBsplineInterpC{S}{100}
\end{verbatim}
constructs the sequence {\tt SB0} $\cdots$ {\tt SB100} of B-spline control points (appending~{\tt B} to the root name) for a closed curve interpolating {\tt S0} $\cdots$ {\tt S100}, which may then be rendered with the command
\begin{verbatim}
-\psBsplineNodesC{SB}{100}
+\psBsplineNodesC{SB}{101}
\end{verbatim}
with any keywords options you wish.
+{\bf IMPORTANT:} The macro \verb|\psBsplineInterpC| modifies the node sequence {\tt S}, setting \verb|S101=S0|, and changing \verb|\Snodecount| to take the value $101$. This is convenient when you use the construction:
+\begin{verbatim}
+\pnodes{S}()()()()% sets \Snodecount to 3
+\psBsplineInterpC{S}{\Snodecount}% constructs B-spline control pts SB0..SB4
+\psBsplineNodesC{SB}{\Snodecount}
+\end{verbatim}
+
The following example illustrates that there is a difference between \verb|\psccurve| and B-spline interpolation, the former having a rounder appearance. Generally speaking, B-spline interpolation comes closer to minimizing the average curvature.
\begin{verbatim}
\documentclass{article}
@@ -456,6 +464,7 @@ The clipping path is drawn by default positively oriented so that objects are cl
\end{document}
\end{verbatim}
+\vspace{12pt}
\begin{center}
\begin{pspicture}[showgrid=true](-.5,-.5)(6,5)
\pnodes{S}(1,0)(5,1)(4,4)(1,3)%
@@ -466,4 +475,39 @@ The clipping path is drawn by default positively oriented so that objects are cl
\end{pspicture}
\end{center}
+\vspace{12pt}
+The \verb|\thickBspline| macro works as expected in the closed (periodic) case, taking advantage of automatic incrementing of the nodecount.
+
+\begin{verbatim}
+\documentclass{article}
+\usepackage{pstricks}
+\usepackage{pst-bspline,pstricks-add}
+\begin{document}
+\begin{pspicture}[showgrid=true](-.5,-.5)(6,5)
+\pnodes{S}(1,0)(5,1)(4,4)(1,3)%
+\psBsplineInterpC{S}{\Snodecount}%
+% defines nodes SB0, SB1, SB2 etc --- the Bspline control points
+% increments \Snodecount by 1 for future macros
+\psBsplineNodes[linestyle=none,showpoints=false]{SB}{\Snodecount}%
+% Constructs the Bezier control points SBR0, SBL1, SBR1, etc
+\thickBspline[linestyle=none]{S}{\Snodecount}{22pt}%
+{\psframe[fillstyle=vlines](-1,-1)(6,6)}%
+\end{pspicture}
+\end{document}
+\end{verbatim}
+
+\vspace{12pt}
+
+\begin{center}
+\begin{pspicture}[showgrid=true](-.5,-.5)(6,5)
+\pnodes{S}(1,0)(5,1)(4,4)(1,3)%
+\psBsplineInterpC{S}{\Snodecount}%
+% defines nodes SB0, SB1, SB2 etc --- the Bspline control points
+% increments \Snodecount by 1 for future macros
+\psBsplineNodes[linestyle=none,showpoints=false]{SB}{\Snodecount}%
+% Constructs the Bezier control points SBR0, SBL1, SBR1, etc
+\thickBspline[linestyle=none]{S}{\Snodecount}{22pt}{\psframe[fillstyle=vlines](-1,-1)(6,6)}%
+\end{pspicture}
+\end{center}
+
\end{document} \ No newline at end of file