summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-03-09 01:21:28 +0000
committerKarl Berry <karl@freefriends.org>2012-03-09 01:21:28 +0000
commit46ee7396c790858808d1c5cb91ea167ecec56008 (patch)
tree496ceb05a6e5edf6b4ee83bcb3ba62a742d8c443
parentdd7800396fbf08c2385608316ffa46f096ae12f6 (diff)
pst-bspline 1.61 (7mar12)
git-svn-id: svn://tug.org/texlive/trunk@25582 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/generic/pst-bspline/README4
-rw-r--r--Master/texmf-dist/doc/generic/pst-bspline/pst-bspline-doc.pdfbin148250 -> 173893 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-bspline/pst-bspline-doc.tex83
-rw-r--r--Master/texmf-dist/tex/generic/pst-bspline/pst-bspline.tex262
-rw-r--r--Master/texmf-dist/tex/latex/pst-bspline/pst-bspline.sty2
5 files changed, 340 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-bspline/README b/Master/texmf-dist/doc/generic/pst-bspline/README
index afabbd22858..f98df84e3ce 100644
--- a/Master/texmf-dist/doc/generic/pst-bspline/README
+++ b/Master/texmf-dist/doc/generic/pst-bspline/README
@@ -2,10 +2,10 @@
%%
%% Copyright 2011 Michael Sharpe <msharpe@ucsd.edu>
%%
-%% Version 1.5, 2011/08/20
+%% Version 1.61, 2012/03/06
%%
-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 update adds a number of macros allowing B-spline curves to be used as if they were parametric curves or graphs of functions.
+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 update adds a number of macros allowing B-spline curves to be used as if they were parametric curves or graphs of functions, including several macros for thickened B-splines.
The .tex and .sty files should be installed in a folder searched by TeX. All documentation is in pst-bspline-doc.pdf.
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 5aea67e4329..d51aeb62953 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 235522f7950..7df9fbf84e8 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
@@ -18,7 +18,7 @@
%\def\url@ttstyle{%
% \@ifundefined{selectfont}{\def\UrlFont{\tt}}{\def\UrlFont{\ttfamily\small}}}
\usepackage{hyperref}
-\hyphenation{Post-Script}
+\hyphenation{Post-Script de-fines}
%\date{} % Activate to display a given date or no date
\begin{document}
\begin{center}{\Large Cubic B-splines Using PSTricks\\[12pt]
@@ -49,8 +49,12 @@ I'll focus on two special cases: (i) relaxed, uniform B-splines; (ii) periodic,
\item[\cs{bspFnNode\{P\}\{5\}\{2.3\}\{Q\}}] requires that you first run \cs{bspcurvepoints}{\tt[E]} to create PostScript arrays with basename {\tt P}. It then sets a node {\tt Q} at position $x=1.3$ on the curve. (Nothing is drawn.) The result is meaningful only for a B-spline curve that is the graph of a function of $x$ and where $x_0<x_1<\cdots$.
\item[\cs{psBsplineInterp\{S\}\{4\}}] will construct a sequence {\tt SB0}..{\tt SB4} for which the associated B-spline curve interpolates {\tt S0}..{\tt S4}. (Nothing is drawn---you have to then issue the command \cs{psBsplineNodes\{SB\}\{4\}}.)
\item[\cs{psBsplineInterpC\{S\}\{4\}}] will construct a sequence {\tt SB0}..{\tt SB5} for which the associated closed B-spline curve interpolates {\tt S0}..{\tt S4}. (Nothing is drawn --- you have then to issue the command \cs{psBsplineNodesC\{SB\}\{5\}}.)
-\item[\cs{thickBspline\{B\}\{5\}\{12pt\}\{<graphic to clip>\}}] defines a clipping path 12{\tt pt} wide around the B-spline curve with control points {\tt B0}..{\tt B5}, then draws the {\tt <graphic>} clipped to that path.
\item[\cs{bspcurvenodes\{P\}\{Q\}}] creates a node sequence {\tt Q0} {\tt Q1},... from the position data in the arrays {\tt P.X}, {\tt P.Y} created a \cs{bspcurvepoints} macro.
+\item[\cs{thickBspline\{B\}\{5\}\{12pt\}\{<graphic to clip>\}}] defines a clipping path 12{\tt pt} wide around the B-spline curve with control points {\tt B0}..{\tt B5}, then draws the {\tt <graphic>} clipped to that path.
+\item[\cs{thickBEspline\{S\}\{5\}\{30pt\}\{18pt\}\{-70\}\{<graphic>\}}] defines a clipping path of width from {\tt18pt} to {\tt 30pt} and axis angle -70 degrees, then draws the {\tt <graphic>} clipped to that path. The clipping path is widest where the path is parallel to the axis angle. This macro is best called from the following auxiliary macro, because the data must be prepared in a specific order---see the example provided.
+\item[\cs{thickBdraw\{S\}\{30pt\}\{18pt\}\{-70\}\{<graphic>\}}] prepares and runs the macro \verb|thickBEspline| using all points in the node sequence {\tt S}, apassing all parameters to that macro.
+\item[\cs{thickBsplinePen\{S\}\{5\}\{.7cm\}\{.2cm\}\{-45\}\{<graphic>\}}] defines a clipping path following the outline of an elliptical pen drawn along the curve interpolating the points {\tt S0..S5}. The ellipse has $a=.7$cm, $b=.2$cm and and is rotated through -70 degrees. The macro then draws the {\tt <graphic>} clipped to that path. The underlying curve has relaxed endpoints.
+\item[\cs{thickBsplinePenE\{S\}\{5\}\{.7cm\}\{.2cm\}\{-45\}\{<graphic>\}}] defines a clipping path following the outline of an elliptical pen drawn along the curve interpolating the points {\tt S0..S5}. The ellipse has $a=.7$cm, $b=.2$cm and and is rotated through -70 degrees. The macro then draws the {\tt <graphic>} clipped to that path. The underlying curve omits the intial and final segments, and is not limited to relaxed endpoints.
\end{description}
Details and examples are provided below.
@@ -668,4 +672,79 @@ The \verb|\thickBspline| macro works as expected in the closed (periodic) case,
\end{pspicture}
\end{center}
+\vspace{12pt}
+
+There are three variants of the \verb|\thickBspline| macro. The first is
+\begin{verbatim}
+\thickBEspline#1#2#3#4#5#6
+% #1=root | #2=nsegments | #3=maxthickness |
+% #4=minthickness | #5=axis angle | #6=items to clip
+\end{verbatim}
+works just like \verb|\thickBspline|, but instead of providing a thickness, you provide three parameters specifying maxthickness, minthickness and an axis angle.
+An axis angle of -45 means that lines normal to angle -45 will be minthickness and lines normal to 45 will be maxthickness. You may get unexpected results if your initial curve is too curvy. This macro is best called from \verb|\thickBdraw|, as shown in the following example.
+\begin{verbatim}
+\psset{yunit=.7cm}
+\begin{pspicture}[showgrid=false](-1,-1)(6,7)
+\psgrid%
+\pnodes{S}(0,1)(0,5)(3,5)(4,2)(5,0)%
+\thickBdraw{S}{30pt}{16pt}{-70}{\psframe[fillstyle=solid,fillcolor=yellow](-1,-1)(6,7)}%
+\end{pspicture}
+\end{verbatim}
+
+\begin{center}
+\psset{yunit=.7cm}
+\begin{pspicture}[showgrid=false](-1,-1)(6,7)
+\psgrid%
+\pnodes{S}(0,1)(0,5)(3,5)(4,2)(5,0)%
+\thickBdraw{S}{30pt}{16pt}{-70}{\psframe[fillstyle=solid,fillcolor=yellow](-1,-1)(6,7)}%
+\end{pspicture}
+\psset{yunit=1cm}
+\end{center}
+
+A second variant \verb|\thickBsplinePen| simulates the effect of an elliptical pen run along the specified curve. Note that you will receive an error message if xunit differs from yunit---the calculations in the general case are quite nasty. The macro is called with something like
+\begin{verbatim}
+\thickBsplinePen{S}{\Snodecount}{2cm}{.5cm}{10}{%
+\psframe[fillstyle=crosshatch](-1,-1)(7,6)}%
+\end{verbatim}
+where {\tt S0..} is an established node sequence with highest index \verb|\Snodecount| and the pen has semi-major axis {\tt 2cm}, semi-minor axis {\tt.5cm}, and the major axis is rotated 10 degrees from the positive x axis. This gives results that look like those generated in \textsf{metafont/post} except that the curve ends are not drawn by the pen---if you want them, draw them separately using \verb|\psellipse|. Note that the underlying curve has relaxed ends.
+
+\begin{verbatim}
+\begin{pspicture}[showgrid=false](-1,-1)(7,7)
+\psgrid%
+\pnodes{S}(1,0)(4,1)(5,2)(3,3)(1,5)(5,6)%
+\thickBsplinePen[linecolor=green]{S}{\Snodecount}{.7cm}{.1cm}{-45}{\psframe[fillstyle=solid,fillcolor=green](-1,-1)(7,7)}%
+\psBsplineNodes[linestyle=solid]{SB}{\Snodecount}%
+\end{pspicture}
+\end{verbatim}
+
+\vspace{12pt}
+
+\begin{center}
+\begin{pspicture}[showgrid=false](-1,-1)(7,7)
+\psgrid%
+\pnodes{S}(1,0)(4,1)(5,2)(3,3)(1,5)(5,6)%
+\thickBsplinePen[linecolor=green]{S}{\Snodecount}{.7cm}{.1cm}{-45}{\psframe[fillstyle=solid,fillcolor=green](-1,-1)(7,7)}%
+\psBsplineNodes[linestyle=solid]{SB}{\Snodecount}%
+\end{pspicture}
+\end{center}
+
+A third variant \verb|\thickBsplinePenE| is quite similar but omits the first and last segments of the underlying curve, permitting the endpoints to not be relaxed.
+
+\begin{verbatim}
+\begin{pspicture}[showgrid=false](-1,-1)(7,7)
+\psgrid%
+\pnodes{S}(0,4)(1,0)(4,.5)(5,2)(3,3)(1,5)(5,6)(5,3)%
+\thickBsplinePenE[linecolor=green]{S}{\Snodecount}{.7cm}{.1cm}{30}{\psframe[fillstyle=solid,fillcolor=green](-1,-1)(7,7)}%
+\psBsplineNodesE[linestyle=solid]{SB}{\Snodecount}%
+\end{pspicture}
+\end{verbatim}
+
+\begin{center}
+\begin{pspicture}[showgrid=false](-1,-1)(7,7)
+\psgrid%
+\pnodes{S}(0,4)(1,0)(4,.5)(5,2)(3,3)(1,5)(5,6)(5,3)%
+\thickBsplinePenE[linecolor=green]{S}{\Snodecount}{.7cm}{.1cm}{30}{\psframe[fillstyle=solid,fillcolor=green](-1,-1)(7,7)}%
+\psBsplineNodesE[linestyle=solid]{SB}{\Snodecount}%
+\end{pspicture}
+\end{center}
\end{document} \ No newline at end of file
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 38675b96909..6f6c91ae5bd 100644
--- a/Master/texmf-dist/tex/generic/pst-bspline/pst-bspline.tex
+++ b/Master/texmf-dist/tex/generic/pst-bspline/pst-bspline.tex
@@ -8,8 +8,8 @@
\ifx\PSTricksLoaded\endinput \else\input pstricks \fi
\ifx\PSTnodeLoaded\endinput \else\input pst-node \fi
\ifx\PSTXKeyLoaded\endinput \else\input pst-xkey \fi
-\def\fileversion{1.5}
-\def\filedate{2011/08/20}
+\def\fileversion{1.61}
+\def\filedate{2012/03/06}
\message{`pst-bspline' v\fileversion, \filedate\space Bspline routines for pstricks (ms)}
%
@@ -348,7 +348,7 @@
bez@2xT t bez@3xT mul add t mul bez@1x add 2 copy Pyth dup %
3 1 roll div 3 1 roll div \thickness\space 2 div dup 3 1 roll mul 3 1 roll mul ) cvx def %
end grestore }%
-\ifnum\iA=0 \relax%
+\ifnum\iA=\z@ %
\pnode(! /t 0 def FuncN /dy exch def /dx exch def Func 2 copy %
/y0 ED /x0 ED %
clipary 0 x0 dx add put clipary 1 y0 dy add put %
@@ -363,7 +363,7 @@
/lindex lindex 2 add def /uindex uindex 2 sub def ){tmp@P}%
}% end multido \i
}% end multido \iA
-% if periodic, we have to adjust 2 points so as not too leave a wedge in the
+% if periodic, we have to adjust 2 points so as not to leave a wedge in the
% clipping region. We have to set Q_{nk} to Q_0 and R_{nk} to R_0
% R_{nk} is at position 2*nk, 2*nk+1 and Q_{nk} is at the next pair
%\ifbsp@per %
@@ -381,14 +381,14 @@
\code{ clipary aload pop moveto nseg nplotpt mul %
{ lineto } repeat closepath %
moveto nseg nplotpt mul { lineto } repeat closepath }}}%
- #4
+ #4%
\endpsclip%
\else % not periodic
\psclip{\pscustom{%
\code{ clipary aload pop moveto nseg nplotpt mul 2 mul %
1 add { lineto } repeat closepath %
\ifPst@reverseclip\space reversepath \fi}}}%
- #4
+ #4%
\endpsclip%
\fi%
}%
@@ -526,5 +526,255 @@
\pnode(! #1.X \iA\space get #1.Y \iA\space get ){#2\iA}}%
}%
%
+% start experimental variable thickness
+\def\thickBEspline{\def\pst@par{}\pst@object{thickBEspline}}%
+\def\thickBEspline@i#1#2#3#4#5#6{{%
+% #1=root | #2=nsegments | #3=maxthickness | #4=minthickness | #5=axis angle | #6=items to clip
+% An axis angle of -45 means that lines normal to -45 will be minthickness and lines normal to 45 will be maxthickness.
+ \pst@killglue%
+ \use@par%
+ %prepare array
+ \pssetlength{\pst@dimp}{#3}\setlength{\pst@dimp}{0.5\pst@dimp}%
+ \pssetlength{\pst@dimn}{#4}\setlength{\pst@dimn}{0.5\pst@dimn}%
+ \advance\pst@dimp \pst@dimn\setlength{\pst@dimp}{0.5\pst@dimp}%
+ \pst@dimtonum{\pst@dimp}{\ctrthick}% center of thickness/2 in tex pt
+ \advance\pst@dimp -\pst@dimn%
+ \pst@dimtonum{\pst@dimp}{\deltathick}% (max-min)/2 in tex pt
+ \newcount\n@cnt%
+ \newcount\np@cnt%
+ \newcount\ary@max \ary@max=\psk@plotpoints \relax%
+ \multiply\ary@max #2\np@cnt=\ary@max \multiply\ary@max 4\relax%
+ \advance\ary@max 4\relax %
+ \n@cnt=\ary@max \advance\n@cnt \m@ne%
+ \multiply\np@cnt \tw@\advance\np@cnt \tw@% count of points in array
+ \pstVerb{ gsave tx@Dict begin %
+ /psxu \pst@number\psxunit\space def /psyu \pst@number\psyunit\space def %
+ /uratio psyu psxu div dup mul def % so that perp to a, b is -b*uratio, a
+ /nseg #2 def /nplotpt \psk@plotpoints\space def %
+ /clipary #2 nplotpt mul 4 mul 4 add array def %
+ /lindex 2 def /uindex \the\ary@max\space 1 sub def %
+ /dt 1 \psk@plotpoints\space div def %
+ end grestore }%
+\multido{\iA=0+1,\iB=1+1}{#2}{%
+% pass control points of this segment to PostScript variables
+\pstVerb{%
+ gsave tx@Dict begin %
+ STV CP T \psGetNodeCenter{#1\iA}\space \psGetNodeCenter{#1BR\iA}\space \psGetNodeCenter{#1BL\iB}\space \psGetNodeCenter{#1\iB}\space %
+ /bez@1.x #1\iA.x def /bez@1.y #1\iA.y def %initial point on segment
+ /bez@2.x #1BR\iA.x bez@1.x sub def %adjusted control points (less init pt)
+ /bez@2.y #1BR\iA.y bez@1.y sub def %
+ /bez@3.x #1BL\iB.x bez@1.x sub def %
+ /bez@3.y #1BL\iB.y bez@1.y sub def %
+ /bez@4.x #1\iB.x bez@1.x sub def %
+ /bez@4.y #1\iB.y bez@1.y sub def %
+ /bez@1x bez@2.x 3 mul def % for position--w1=3z1
+ /bez@1y bez@2.y 3 mul def %
+ /bez@2x bez@3.x bez@2.x 2 mul sub 3 mul def %position w2=3(z2-2z1)
+ /bez@2y bez@3.y bez@2.y 2 mul sub 3 mul def %
+ /bez@2xT bez@2x 2 mul def % for tangent
+ /bez@2yT bez@2y 2 mul def %
+ /bez@3x bez@4.x bez@2.x bez@3.x sub 3 mul add def % w3=z3+3z1-3z2
+ /bez@3y bez@4.y bez@2.y bez@3.y sub 3 mul add def %
+ /bez@3xT bez@3x 3 mul def % tangent
+ /bez@3yT bez@3y 3 mul def %
+ /Func % position
+ ( bez@3x t mul bez@2x add t mul bez@1x add t mul bez@1.x add psxu mul %
+ bez@3y t mul bez@2y add t mul bez@1y add t mul bez@1.y add psyu mul ) cvx def %
+% /FuncT % tangent
+% ( bez@2xT t bez@3xT mul add t mul bez@1x add %
+% bez@2yT t bez@3yT mul add t mul bez@1y add ) cvx def
+/FuncN % unit normal times delta
+ ( bez@2yT t bez@3yT mul add t mul bez@1y add uratio mul neg
+ bez@2xT t bez@3xT mul add t mul bez@1x add 2 copy Pyth dup %
+ 3 1 roll div 3 1 roll div 2 copy Atan #5 sub 2 mul cos \deltathick\space mul neg \ctrthick\space add dup 3 1 roll mul 3 1 roll mul ) cvx def %
+ end grestore }%
+\ifnum\iA=\z@%
+ \pnode(! /t 0 def FuncN /dy exch def /dx exch def Func 2 copy %
+ /y0 ED /x0 ED %
+ clipary 0 x0 dx add put clipary 1 y0 dy add put %
+ clipary uindex y0 dy sub put clipary uindex 1 sub x0 dx sub put %
+ /uindex uindex 2 sub def ){tmp@P}%
+\fi%
+\multido{\i=1+1}{\psk@plotpoints}{%
+ %make array elements for this segment
+ \pnode(! /t dt \i\space mul def FuncN /dy ED /dx ED Func 2 copy /y0 ED /x0 ED %
+ clipary lindex x0 dx add put clipary lindex 1 add y0 dy add put %
+ clipary uindex y0 dy sub put clipary uindex 1 sub x0 dx sub put %
+ /lindex lindex 2 add def /uindex uindex 2 sub def ){tmp@P}%
+}% end multido \i
+}% end multido \iA
+% if periodic, we have to adjust 2 points so as not to leave a wedge in the
+% clipping region. We have to set Q_{nk} to Q_0 and R_{nk} to R_0
+% R_{nk} is at position 2*nk, 2*nk+1 and Q_{nk} is at the next pair
+%\ifbsp@per %
+% \pstVerb{%
+% tx@Dict begin /itemcnt #2 nplotpt mul 2 mul def %first item to change is index 2nk
+% clipary itemcnt clipary 0 get put /itemcnt itemcnt 1 add def %
+% clipary itemcnt clipary 1 get put /itemcnt itemcnt 1 add def %
+% clipary itemcnt clipary \the\n@cnt\space 1 sub get put /itemcnt itemcnt 1 add def %
+% clipary itemcnt clipary \the\n@cnt\space get put %
+% end }%
+%\fi%
+% make a clipping path in PS and pass commands #6
+\ifbsp@per %periodic
+ \psclip{\pscustom{%
+ \code{ clipary aload pop moveto nseg nplotpt mul %
+ { lineto } repeat closepath %
+ moveto nseg nplotpt mul { lineto } repeat closepath }}}%
+ #6%
+ \endpsclip%
+\else % not periodic
+ \psclip{\pscustom{%
+ \code{ clipary aload pop moveto nseg nplotpt mul 2 mul %
+ 1 add { lineto } repeat closepath %
+ \ifPst@reverseclip\space reversepath \fi}}}%
+ #6%
+ \endpsclip%
+\fi%
+}%
+\ignorespaces}%
+%
+\def\thickBdraw#1#2#3#4#5{\edef\n@decnt{\csname #1nodecount\endcsname}%
+\psBsplineInterp{#1}{\n@decnt}%
+\psBsplineNodes[linestyle=none,showpoints=false]{#1B}{\n@decnt}%
+\thickBEspline{#1}{\n@decnt}{#2}{#3}{#4}{#5}%
+}%
+
+% Elliptic pen as possible in metafont/metapost
+\def\thickBsplinePen{\def\pst@par{}\pst@object{thickBsplinePen}}%
+\def\thickBsplinePen@i#1#2#3#4#5#6{%
+% #1=root | #2=nsegments | #3=semimajor | #4=semiminor | #5=inclination | #6=items to clip
+% An inclination of -45 means that lines pointing at angles -45 and 135 thinnest and lines pointing 45 and 225 will be thickest, assuming #3>#4.
+ \pst@killglue%
+ \psBsplineInterp{#1}{#2}%
+ \psBsplineNodes[linestyle=none]{#1B}{#2}%
+ \thickBsplinePen@ii{#1}{#2}{#3}{#4}{#5}{#6}%
+}%
+\def\thickBsplinePen@ii#1#2#3#4#5#6{{%
+ \pst@killglue%
+ \use@par%
+ \ifdim\psxunit=\psyunit \else \errmessage{Unequal units--must bail out from thickBsplinePen}\fi%
+ %prepare array
+ \pssetlength{\pst@dimp}{#3}\pst@dimtonum{\pst@dimp}{\bez@a}%
+ \pssetlength{\pst@dimn}{#4}\pst@dimtonum{\pst@dimn}{\bez@b}%
+ \newcount\n@cnt%
+ \newcount\np@cnt%
+ \newcount\ary@max \ary@max=\psk@plotpoints \relax%
+ \multiply\ary@max #2\np@cnt=\ary@max \multiply\ary@max 4\relax%
+ \advance\ary@max 4\relax %
+ \n@cnt=\ary@max \advance\n@cnt \m@ne%
+ \multiply\np@cnt \tw@\advance\np@cnt \tw@% count of points in array
+ \pstVerb{ gsave tx@Dict begin %
+ /psxu \pst@number\psxunit\space def /psyu \pst@number\psyunit\space def %
+ /uratio psyu psxu div dup mul def % so that perp to a, b is -b*uratio, a
+ /nseg #2 def /nplotpt \psk@plotpoints\space def %
+ /clipary #2 nplotpt mul 4 mul 4 add array def %
+ /lindex 2 def /uindex \the\ary@max\space 1 sub def %
+ /dt 1 \psk@plotpoints\space div def %
+ end grestore }%
+\multido{\iA=0+1,\iB=1+1}{#2}{%
+% pass control points of this segment to PostScript variables
+\pstVerb{%
+ gsave tx@Dict begin %
+ STV CP T \psGetNodeCenter{#1\iA}\space \psGetNodeCenter{#1BR\iA}\space \psGetNodeCenter{#1BL\iB}\space \psGetNodeCenter{#1\iB}\space %
+ /bez@1.x #1\iA.x def /bez@1.y #1\iA.y def %initial point on segment
+ /bez@2.x #1BR\iA.x bez@1.x sub def %adjusted control points (less init pt)
+ /bez@2.y #1BR\iA.y bez@1.y sub def %
+ /bez@3.x #1BL\iB.x bez@1.x sub def %
+ /bez@3.y #1BL\iB.y bez@1.y sub def %
+ /bez@4.x #1\iB.x bez@1.x sub def %
+ /bez@4.y #1\iB.y bez@1.y sub def %
+ /bez@1x bez@2.x 3 mul def % for position--w1=3z1
+ /bez@1y bez@2.y 3 mul def %
+ /bez@2x bez@3.x bez@2.x 2 mul sub 3 mul def %position w2=3(z2-2z1)
+ /bez@2y bez@3.y bez@2.y 2 mul sub 3 mul def %
+ /bez@2xT bez@2x 2 mul def % for tangent
+ /bez@2yT bez@2y 2 mul def %
+ /bez@3x bez@4.x bez@2.x bez@3.x sub 3 mul add def % w3=z3+3z1-3z2
+ /bez@3y bez@4.y bez@2.y bez@3.y sub 3 mul add def %
+ /bez@3xT bez@3x 3 mul def % tangent
+ /bez@3yT bez@3y 3 mul def %
+ /Func % position
+ ( bez@3x t mul bez@2x add t mul bez@1x add t mul bez@1.x add psxu mul %
+ bez@3y t mul bez@2y add t mul bez@1y add t mul bez@1.y add psyu mul ) cvx def %
+% /FuncT % tangent
+% ( bez@2xT t bez@3xT mul add t mul bez@1x add %
+% bez@2yT t bez@3yT mul add t mul bez@1y add ) cvx def
+/FuncN % leave dx, dy on stack
+ ( bez@2yT t bez@3yT mul add t mul bez@1y add dup /ty ED uratio mul neg
+ bez@2xT t bez@3xT mul add t mul bez@1x add dup /tx ED %
+ 2 copy Pyth dup 3 1 roll div 3 1 roll div /nx ED /ny ED % unit normal to curve
+ tx ty 2 copy Pyth dup 3 1 roll div 3 1 roll div /tx ED /ty ED % unit tangent
+ #5 ty tx Atan sub dup cos /bez@c ED sin /bez@s ED %
+ \bez@a\space bez@s mul \bez@b\space bez@c mul Pyth % sqrt(aa*ss+bb*cc)
+ dup .001 lt { pop \bez@a\space tx mul \bez@a\space ty mul }{/yval ED %
+ bez@c bez@s mul \bez@a\space dup mul \bez@b\space dup mul sub mul yval div %
+ /xval ED %
+ xval tx mul yval nx mul add xval ty mul yval ny mul add } %
+ ifelse ) cvx def %
+ end grestore }%
+\ifnum\iA=\z@%
+ \pnode(! /t 0 def FuncN /dy exch def /dx exch def Func 2 copy %
+ /y0 ED /x0 ED %
+ clipary 0 x0 dx add put clipary 1 y0 dy add put %
+ clipary uindex y0 dy sub put clipary uindex 1 sub x0 dx sub put %
+ /uindex uindex 2 sub def ){tmp@P}%
+\fi%
+\multido{\i=1+1}{\psk@plotpoints}{%
+ %make array elements for this segment
+ \pnode(! /t dt \i\space mul def FuncN /dy ED /dx ED Func 2 copy /y0 ED /x0 ED %
+ clipary lindex x0 dx add put clipary lindex 1 add y0 dy add put %
+ clipary uindex y0 dy sub put clipary uindex 1 sub x0 dx sub put %
+ /lindex lindex 2 add def /uindex uindex 2 sub def ){tmp@P}%
+}% end multido \i
+}% end multido \iA
+% if periodic, we have to adjust 2 points so as not to leave a wedge in the
+% clipping region. We have to set Q_{nk} to Q_0 and R_{nk} to R_0
+% R_{nk} is at position 2*nk, 2*nk+1 and Q_{nk} is at the next pair
+%\ifbsp@per %
+% \pstVerb{%
+% tx@Dict begin /itemcnt #2 nplotpt mul 2 mul def %first item to change is index 2nk
+% clipary itemcnt clipary 0 get put /itemcnt itemcnt 1 add def %
+% clipary itemcnt clipary 1 get put /itemcnt itemcnt 1 add def %
+% clipary itemcnt clipary \the\n@cnt\space 1 sub get put /itemcnt itemcnt 1 add def %
+% clipary itemcnt clipary \the\n@cnt\space get put %
+% end }%
+%\fi%
+% make a clipping path in PS and pass commands #6
+\ifbsp@per %periodic
+ \psclip{\pscustom{%
+ \code{ clipary aload pop moveto nseg nplotpt mul %
+ { lineto } repeat closepath %
+ moveto nseg nplotpt mul { lineto } repeat closepath }}}%
+ #6%
+ \endpsclip%
+\else % not periodic
+ \psclip{\pscustom{%
+ \code{ clipary aload pop moveto nseg nplotpt mul 2 mul %
+ 1 add { lineto } repeat closepath %
+ \ifPst@reverseclip\space reversepath \fi}}}%
+ #6%
+ \endpsclip%
+\fi%
+}%
+\ignorespaces}%
+%
+% Elliptic pen as possible in metafont/metapost, ignoring end segs
+\def\thickBsplinePenE{\def\pst@par{}\pst@object{thickBsplinePenE}}%
+\def\thickBsplinePenE@i#1#2#3#4#5#6{{%
+% #1=root | #2=nsegments | #3=semimajor | #4=semiminor | #5=inclination | #6=items to clip
+% An inclination of -45 means that lines pointing at angles -45 and 135 thinnest and lines pointing 45 and 225 will be thickest, assuming #3>#4.
+ \pst@killglue%
+ \edef\n@decnt{\csname #1nodecount\endcsname}
+ \psBsplineInterp{#1}{\n@decnt}%
+ \psBsplineNodesE[linestyle=none]{#1B}{\n@decnt}%
+ \count0=\n@decnt\advance\count0\m@ne\edef\n@decntm{\the\count0}%
+ \advance\count0\m@ne\edef\newn@decnt{\the\count0}%
+ \multido{\iA=0+1,\iB=1+1}{\n@decntm}{\pnode(#1\iB){@#1\iA}%
+ \pnode(#1B\iB){@#1B\iA}\pnode(#1BR\iB){@#1BR\iA}\pnode(#1BL\iB){@#1BL\iA}}%
+ \use@par%
+ \thickBsplinePen@ii{@#1}{\newn@decnt}{#3}{#4}{#5}{#6}%
+}\ignorespaces}%
+%
\catcode`\@=\TheAtCode\relax
\endinput \ No newline at end of file
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 6b62c0ce7ea..ba0256f130f 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,5 @@
\ProvidesPackage{pst-bspline}
- [2011/08/20 v1.5 LaTeX wrapper for pst-bspline (MS)]
+ [2012/03/06 v1.61 LaTeX wrapper for pst-bspline (MS)]
\input{pst-bspline}
\ProvidesFile{pst-bspline.tex}
[\filedate\space \fileversion\space `pst-bspline' (ms)]