diff options
author | Karl Berry <karl@freefriends.org> | 2016-08-21 21:40:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-08-21 21:40:48 +0000 |
commit | 61f034941d65cf39d29d8b935d96af5bd35d72b5 (patch) | |
tree | 624754fa8e4b462f03d7502ee4cca44c0e1c889f /Master/texmf-dist | |
parent | 9c9dda62402e3156b09391a12663a213ae391ff1 (diff) |
pst-bezier (21aug16)
git-svn-id: svn://tug.org/texlive/trunk@41899 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-bezier/Changes | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-bezier/README.md (renamed from Master/texmf-dist/doc/generic/pst-bezier/README) | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-bezier/pst-bezier-doc.bib | 214 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-bezier/pst-bezier-doc.pdf | bin | 102996 -> 1163955 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-bezier/pst-bezier-doc.tex | 457 | ||||
-rw-r--r-- | Master/texmf-dist/dvips/pst-bezier/pst-bezier.pro | 143 | ||||
-rw-r--r-- | Master/texmf-dist/source/generic/pst-bezier/Makefile | 68 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-bezier/pst-bezier.tex | 92 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pst-bezier/pst-bezier.sty | 11 |
9 files changed, 781 insertions, 218 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-bezier/Changes b/Master/texmf-dist/doc/generic/pst-bezier/Changes index 66485d07ff9..149148692d8 100644 --- a/Master/texmf-dist/doc/generic/pst-bezier/Changes +++ b/Master/texmf-dist/doc/generic/pst-bezier/Changes @@ -1,10 +1,15 @@ -- pst-bezier.tex --- +0.02 2016-08-19 added macro \psRQBCmasse for a Bezier curve, + definied by three weighted points 0.01 2009-01-29 first CTAN version -- pst-bezier.sty --- +0.02 2016-08-19 - load expl3 for floating point operations + - define \pscalculation 0.01 2009-01-29 first CTAN version -- pst-bezier.pro --- +0.02 2016-08-19 added function tx@RQBCmasse for a Bezier curve 0.01 2009-01-29 first CTAN version diff --git a/Master/texmf-dist/doc/generic/pst-bezier/README b/Master/texmf-dist/doc/generic/pst-bezier/README.md index c8f371e9078..23a4246c098 100644 --- a/Master/texmf-dist/doc/generic/pst-bezier/README +++ b/Master/texmf-dist/doc/generic/pst-bezier/README.md @@ -1,9 +1,9 @@ Save the files pst-bezier.sty|tex in a directory, which is part of your local TeX tree. pst-bezier.pro should be saved in ../texmf/dvips/pstricks/ Then do not forget to run texhash to update this tree. -pst-bezier needs pst-plot and pst-tricks, which should be part of your -local TeX installation, otherwise get it from a CTAN server, f.ex. -http://www.CTAN.org +pst-bezier needs pst-plot and pstricks, which should be part of your +local TeX installation, otherwise get it from a CTAN server +http://mirror.CTAN.org Save the files @@ -37,6 +37,3 @@ latex on the documentation file. The intermediate DVI file works only with viewers which can interprete the embedded PostScript code. - -For another PDF output read the Introduction from -the documentation. diff --git a/Master/texmf-dist/doc/generic/pst-bezier/pst-bezier-doc.bib b/Master/texmf-dist/doc/generic/pst-bezier/pst-bezier-doc.bib index d4c75592e2a..4493f87ffce 100644 --- a/Master/texmf-dist/doc/generic/pst-bezier/pst-bezier-doc.bib +++ b/Master/texmf-dist/doc/generic/pst-bezier/pst-bezier-doc.bib @@ -1,110 +1,148 @@ -@STRING{dtk = {{D}ie {\TeX}nische {K}om{\"o}die} } +@STRING{tugboat = {TUGboat} } +@STRING{beiprogramm = {{\TeX}-Beiprogramm} } +@STRING{bretter = {Bretter, die die Welt bedeuten} } +@STRING{dtk = {{D}ie {\TeX}nische {K}om{\"o}die} } +@STRING{editorial = {Editorial} } +@STRING{fremdebuehne = {Von fremden B{\"u}hnen} } +@STRING{fundus = {Aus dem Fundus} } +@STRING{hinterbuehne = {Hinter der B{\"u}hne} } +@STRING{leserbrief = {Leserbrief(e)} } +@STRING{magazin = {Magazin} } +@STRING{rezension = {Rezensionen} } +@STRING{schonimmer = {Was Sie schon immer {\"u}ber {\TeX} wissen wollten \dots} } +@STRING{theaterkasse = {Von der Theaterkasse} } +@STRING{theatertage = {{\TeX}-Theatertage} } -@Book{PostScript, - Author = {Kollock, Nikolai G.}, - Title = {PostScript richtig eingesetzt: vom Konzept zum - praktischen Einsatz}, - Publisher = {IWT}, - Address = {Vaterstetten}, - year = 1989, +@Book{PSTricks2, + author = {Herbert Vo\ss}, + title = {{\PST} {G}rafik f\"ur \TeX{} und \LaTeX}, + edition = {7}, + publisher = {DANTE -- Lehmanns}, + year = {2016}, + address = {Heidelberg/Berlin} } -@Manual{pstricks, - Title = {PSTricks - {\PS} macros for Generic TeX}, - Author = {Timothy Van Zandt}, - Organization = {}, - Address = {\url{http://www.tug.org/application/PSTricks}}, - Note = {}, - year = 1993, +@Book{PSTricks-E, + author = {Herbert Vo\ss}, + title = {{\PST} {G}raphics for \LaTeX}, + edition = {1}, + publisher = {UIT}, + year = {2011}, + address = {Cambridge} } +@Book{companion04, + author = {Frank Mittelbach and Michel Goosens et al}, + title = {The {\LaTeX} {C}ompanion}, + edition = {second}, + publisher = {Addison-Wesley Publishing Company}, + year = {2004}, + address = {Boston} +} -@Manual{pdftricks, - Title = {PSTricks Support for pdf}, - Author = {Herbert Voss}, - Organization = {}, - Address = {\url{http://PSTricks.de/pdf/pdfoutput.phtml}}, - Note = {}, - year = 2002, +@Book{unbound, + author = {Alan Hoenig}, + title = {\TeX{} {U}nbound: \LaTeX{} \& \TeX{} {S}trategies, {F}onts, {G}raphics, and {M}ore}, + publisher = {Oxford University Press}, + year = {1998}, + address = {London} } -@Manual{miwi, - Title = {References for \TeX{} and Friends}, - Author = {Michael Wiedmann and Peter Karp}, - Organization = {}, - Address = {\url{http://www.miwie.org/tex-refs/}}, - Note = {}, - year = 2003, +@Book{tlgc2, + author = {Michel Goosens and Frank Mittelbach and Sebastian Rahtz and Denis Roegel and Herbert Vo{\ss}}, + title = {The {\LaTeX} {G}raphics {C}ompanion}, + publisher = {{Addison-Wesley Publishing Company}}, + edition = 2, + year = {2007}, + address = {Reading, Mass.} } +@Article{girou:01:, + author = {Denis Girou}, + title = {Pr\'esentation de {PST}ricks}, + journal = {Cahier {GUT}enberg}, + year = 1994, + volume = {16}, + month = apr, + pages = {21--70} +} -@Article{dtk02.2:jackson.voss:plot-funktionen, - author = {Laura E. Jackson and Herbert Vo{\ss}}, - title = {Die {P}lot-{F}unktionen von {\texttt{pst-plot}}}, - journal = dtk, - year = 2002, - volume = {2/02}, - altvolume = 2, - altnumber = 14, - month = jun, - pages = {27--34}, - annote = bretter, - keywords = {}, - abstract = { Im letzten Heft wurden die mathematischen Funktionen von - \PS~im Zusammenhang mit dem {\LaTeX}-Paket - \texttt{pst-plot} zum Zeichnen von Funktionen beschrieben - und durch Beispiele erl{\"a}utert. In diesem Teil werden - die bislang nur erw{\"a}hnten Plot-Funktionen f{\"u}r - externe Daten behandelt. } +@Article{girou:02:, + author = {{Timothy Van} Zandt and Denis Girou}, + title = {Inside {PST}ricks}, + journal = TUGboat, + year = 1994, + volume = {15}, + month = sep, + pages = {239--246} } -@Article{dtk02.1:voss:mathematischen, - author = {Herbert Vo{\ss}}, - title = {Die mathematischen {F}unktionen von {P}ostscript}, - journal = dtk, - year = 2002, - volume = {1/02}, - altvolume = 1, - altnumber = 14, - month = mar, - pages = {40-47}, - annote = bretter, - keywords = {}, - abstract = { \PS, faktisch genauso alt wie {\TeX}, ist im - Verh{\"a}ltnis dazu allgemein noch weniger bekannt, wenn es - darum geht zu beurteilen, was es denn nun im eigentlichen - Sinne ist. Au{\ss}erdem wird h{\"a}ufig vergessen, dass - sich mit den \PS-Funktionen viele Dinge erledigen lassen, - bei denen sonst auf externe Programme zur{\"u}ckgegriffen - wird. Dies wird im Folgenden f{\"u}r die mathematischen - Funktionen im Zusammenhang mit dem Paket \texttt{pst-plot} - gezeigt. } +@Book{PostScript, + Author = {Kollock, Nikolai G.}, + Title = {PostScript richtig eingesetzt: vom {K}onzept zum + praktischen {E}insatz}, + Publisher = {IWT}, + Address = {Vaterstetten}, + year = 1989, } +@online{pstricks, + Title = {PSTricks - {\PS} macros for generic {\TeX}}, + Author = {{Timothy Van} Zandt}, + Organization = {\TeX\ Users Group}, + url = {http://www.tug.org/application/PSTricks}, + urldate={2016-08-21}, + year = 1993 +} -@Book{companion, - author = {Michel Goosens and Frank Mittelbach and Serbastian Rahtz and Denis Roegel and Herbert Vo\ss}, - title = {The {\LaTeX} {G}raphics {C}ompanion}, - publisher = {{Addison-Wesley Publishing Company}}, - year = {2007}, - edition = {2nd}, - address = {Reading, Mass.} +@ctan{pst-plot, + Title = {\texttt{pst-plot}: Plotting two dimensional functions and data}, + Author = {{Timothy Van} Zandt and Herbert Voß}, + Organization = {CTAN}, + url = {graphics/pstricks/generic/pst-plot.tex}, + year = 2016 } -@Book{PSTricks2, - author = {Herbert Vo\ss}, - title = {\texttt{PSTricks} -- {G}rafik f\"ur \TeX{} und \LaTeX}, - edition = {5.}, - publisher = {DANTE/Lehmanns Media}, - year = {2008}, - address = {Heidelberg/Berlin} +@ctan{multido, + Title = {\texttt{multido.tex} - a loop macro, that supports fixed-point addition}, + Author = {{Timothy Van} Zandt}, + Organization = {CTAN}, + url = {/graphics/pstricks/generic/multido.tex}, + year = 1997 } -@Book{voss:math, - author = {Herbert Vo\ss}, - title = {Mathematik mit \LaTeX}, - publisher = {{DANTE/Lehmanns Media}}, - year = {2009}, - address = {Heidelberg/Berlin} +@inproceedings{GB16, + TITLE = {Mass points, {B}\'ezier curves and conics: a survey}, + AUTHOR = {Lionel Garnier and Jean-Paul Bécar}, + url = {http://ufrsciencestech.u-bourgogne.fr/$\sim$garnier/publications/adg2016/}, + BOOKTITLE = {Eleventh International Workshop on Automated Deduction in Geometry}, + ADDRESS = {Strasbourg, France}, + SERIES = {Proceedings of ADG 2016}, + PAGES = {97--116}, + date = {2016-06}, + urldate={2016-08-20}, +} + +@online{gb16a, + author={Lionel Garnier}, + title={Courbes de Bézier et coniques}, + url={http://ufrsciencestech.u-bourgogne.fr/~garnier/Migs/03_CourbesBezierPointsMassiquesEleve.pdf}, + urldate={2016-08-20}, +} +@online{gb16b, + author={Lionel Garnier and Jean-Paul Bécar and Lucie Drouton}, + title={Surfaces canal et courbes de Bézier rationnelles quadratiques}, + journal={Journées du Groupe de Travail en Modélisation Géométrique 2016}, + address={Dijon}, + url={http://ufrsciencestech.u-bourgogne.fr/~garnier/publications/hippocampe/64_GTMG2016_courbesBezierSurfacesCanal.pdf}, + urldate={2016-08-20}, +} + +@PhdThesis{Bec97, +author = {Jean-Paul Bécar}, +title = {Forme ({B}{R}) des coniques et de leurs faisceaux}, +school = {Universit\'e de Valenciennes et de Hainaut-Cambr\'esis, LIMAV}, +date = {1997-12-12}, +address= {Valenciennes, France}, } diff --git a/Master/texmf-dist/doc/generic/pst-bezier/pst-bezier-doc.pdf b/Master/texmf-dist/doc/generic/pst-bezier/pst-bezier-doc.pdf Binary files differindex 79ca40cd86b..2bfbd642d15 100644 --- a/Master/texmf-dist/doc/generic/pst-bezier/pst-bezier-doc.pdf +++ b/Master/texmf-dist/doc/generic/pst-bezier/pst-bezier-doc.pdf diff --git a/Master/texmf-dist/doc/generic/pst-bezier/pst-bezier-doc.tex b/Master/texmf-dist/doc/generic/pst-bezier/pst-bezier-doc.tex index 3be402bebd2..95fa8782722 100644 --- a/Master/texmf-dist/doc/generic/pst-bezier/pst-bezier-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-bezier/pst-bezier-doc.tex @@ -1,20 +1,34 @@ -%% $Id: pst-bezier-doc.tex 86 2009-01-29 10:34:00Z herbert $ -\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings - headexclude,footexclude,oneside]{pst-doc} +%% $Id: pst-bezier-doc.tex 134 2009-09-27 12:28:50Z herbert $ +\documentclass[11pt,english,bibliography=totoc,parskip=false,smallheadings, + oneside]{pst-doc} \usepackage[utf8]{inputenc} -\usepackage{pst-bezier} \usepackage{esvect} \let\vec\vv +\usepackage{animate} +\usepackage{pst-bezier} +\usepackage{bbold} +\addbibresource{pst-bezier-doc.bib} \let\pstBezierFV\fileversion \lstset{pos=l,wide=false,language=PSTricks, morekeywords={multidipole,parallel},basicstyle=\footnotesize\ttfamily} +\definecolor{navy}{rgb}{0 0 0.5} % +\def\bgImage{\pspicture[showgrid](0,1)(5,6) +\psset{showpoints} +\psbcurve[linecolor=blue,linewidth=0.01](1,1)% + (2,2)(3,1)(4,2)(4,4)(3,5)% + (2,4)(1,5) +\psbcurve(1,1)(2,2)(3,1)(4,2)% + T{0.5}(4,4)(3,5)(2,4)(1,5) +\endpspicture} +\newtheorem{definition}{Definition} +\def\dy{\displaystyle} \begin{document} \title{\texttt{pst-bezier}} \subtitle{A PSTricks package for drawing Bezier curves; v.\pstBezierFV} -\author{Tobias Nähring \\Herbert Vo\ss} +\author{Jean-Paul Bécar\\Lionel Garnier\\Tobias Nähring \\Manuel Luque\\Herbert Voß} \docauthor{} \date{\today} \maketitle @@ -37,7 +51,7 @@ control points without simultaneously changing the interpolated points. Note that some control is possible via the \Lkeyword{curvature} option. -The \Lcs{psbezier} macro gives full control over the +The \Lcs{psbcurve} macro gives full control over the interpolation points and the control points of one Bezier polynominal of degree three (two interpolated points and two control points). @@ -47,7 +61,7 @@ Thanks to: \\ Jean-C\^ome Charpentier. \end{abstract} -%% Author: Tobias N"ahring +\clearpage \section{Introduction} @@ -95,7 +109,7 @@ correctly installed the package: \usepackage{pstricks} \usepackage{pst-bezier} \begin{document} - \begin{pspicture}(6,4) + \begin{pspicture}(0,-0.4)(6,2) \psbcurve(1,2)(5,2) % Draw just one straight line. \end{pspicture} \end{document} @@ -107,8 +121,8 @@ In the most simple form you can specify any number of interpolation points as the argument of \Lcs{psbcurve}. \begin{LTXexample} -\begin{pspicture}[showgrid=true](5,3) - \psbcurve(1,1)(2,2)(3,1)(4,2) +\begin{pspicture}[showgrid](0,-0.4)(5,3) + \psbcurve[showpoints](1,1)(2,2)(3,1)(4,2) \end{pspicture} \end{LTXexample} @@ -116,8 +130,8 @@ As usual, options can be specified within brackets. \begin{LTXexample} -\begin{pspicture}[showgrid=true](5,3) - \psbcurve[showpoints=true](1,1)(2,2)(3,1)(4,2) +\begin{pspicture}[showgrid](0,-0.4)(5,3) + \psbcurve[showpoints](1,1)(2,2)(3,1)(4,2) \end{pspicture} \end{LTXexample} @@ -129,8 +143,8 @@ time labels are added to the points (this is just for the following description, it is not a feature of \Lcs{psbcurve}). \begin{LTXexample} -\begin{pspicture}[showgrid=true](5,3) - \psbcurve[showpoints=true](1,1)(2,2)(3,1)(4,2) +\begin{pspicture}[showgrid](0,-0.4)(5,3) + \psbcurve[showpoints](1,1)(2,2)(3,1)(4,2) \uput[-90](1,1){$\vec{p}_{0}=\vec{l}_{1}$} \uput[90](1.5,2){$\vec{r}_{1}$} \uput[90](2,2){$\vec{p}_{1}$} @@ -181,8 +195,8 @@ background in {\color{blue}blue} color. \begin{LTXexample} -\pspicture[showgrid=true](5,3) -\psset{showpoints=true} +\pspicture[showgrid](0,-0.4)(5,3) +\psset{showpoints} \psbcurve[linecolor=blue,linewidth=0.01](1,1)% (2,2)(3,1)(4,2) \psbcurve(1,1)l(2,1)(2,2)(3,1)r(4,1)(4,2) @@ -192,8 +206,8 @@ background in {\color{blue}blue} color. \end{LTXexample} \begin{LTXexample} -\pspicture[showgrid=true](5,3) -\psset{showpoints=true} +\pspicture[showgrid](0,-0.4)(5,3) +\psset{showpoints} \psbcurve[linecolor=blue,linewidth=0.01](1,1)% (2,2)(3,1)(4,2) \psbcurve(1,1)(2,2)l(2,1)(3,1)(4,2) @@ -208,7 +222,7 @@ interpolation point. \begin{LTXexample} -\pspicture(5,3) +\pspicture(0,-0.4)(5,3) \psbcurve(1,1)(2,2)l(2,1)(3,1)(4,2) \endpspicture \end{LTXexample} @@ -220,10 +234,10 @@ interpolation point $\vec{p}_{k-1}$. In that way you get a smooth joint as demonstrated in the next example. \begin{LTXexample} -\pspicture[showgrid=true](5,3) +\pspicture[showgrid](0,-0.4)(5,3) \psbcurve[linecolor=blue,linewidth=0.01](1,1)% (2,2)(3,1)(4,2) -\psset{showpoints=true} +\psset{showpoints} \psbcurve(1,1)(2,2)L(2,1)(3,1)(4,2) \uput[-90](2,1){$\vec{l}_{2}$} \uput[0](2,2){$\vec{p}_{1}$} @@ -236,8 +250,8 @@ automatically computed control points of the current Bezier spline. \begin{LTXexample} -\pspicture[showgrid=true](5,3) -\psset{showpoints=true} +\pspicture[showgrid](0,-0.4)(5,3) +\psset{showpoints} \psbcurve[linecolor=blue,linewidth=0.01](1,1)% (2,2)(3,1)(4,2) \psbcurve(1,1)(2,2)t{0.5}(3,1)(4,2) @@ -252,8 +266,8 @@ point you can use the \Lnotation{tl}\Largb{t} or \Lnotation{tr}\Largb{t} modifie respectively, as demonstrated in the following two examples. \begin{LTXexample} -\pspicture[showgrid=true](5,3) -\psset{showpoints=true} +\pspicture[showgrid](0,-0.4)(5,3) +\psset{showpoints} \psbcurve[linecolor=blue,linewidth=0.01](1,1)% (2,2)(3,1)(4,2) \psbcurve(1,1)% @@ -263,8 +277,8 @@ respectively, as demonstrated in the following two examples. \begin{LTXexample} -\pspicture[showgrid=true](5,3) -\psset{showpoints=true} +\pspicture[showgrid](0,-0.4)(5,3) +\psset{showpoints} \psbcurve[linecolor=blue,linewidth=0.01](1,1)% (2,2)(3,1)(4,2) \psbcurve(1,1)(2,2)tr{0.5}(3,1)(4,2) @@ -278,8 +292,8 @@ of the modifier. In the next example a negative tension value leads to a rather surprising effect. \begin{LTXexample} -\pspicture[showgrid=true](5,3) -\psset{showpoints=true} +\pspicture[showgrid](0,-0.4)(5,3) +\psset{showpoints} \psbcurve[linecolor=blue,linewidth=0.01](1,1)% (2,2)(3,1)(4,2) \psbcurve(1,1)(2,2)ts{-0.5}(3,1)(4,2) @@ -291,8 +305,8 @@ The default value of the tension can be set with the option \begin{LTXexample} -\pspicture[showgrid=true](5,3) -\psset{showpoints=true} +\pspicture[showgrid](0,-0.4)(5,3) +\psset{showpoints} \psbcurve[linecolor=blue,linewidth=0.01](1,1)% (2,2)(3,1)(4,2) \psbcurve[bcurveTension=0.5](1,1)% @@ -307,8 +321,8 @@ middle of a \Lcs{psbcurve}. Just use the modifier \Lnotation{T}\Largb{t} for that purpose as shown in the following example. \begin{LTXexample} -\pspicture[showgrid=true](5,6) -\psset{showpoints=true} +\pspicture[showgrid](0,0.6)(5,6) +\psset{showpoints} \psbcurve[linecolor=blue,linewidth=0.01](1,1)% (2,2)(3,1)(4,2)(4,4)(3,5)% (2,4)(1,5) @@ -324,7 +338,7 @@ The \texttt{linestyle} and \texttt{fillstyle} options (and several more) are respected by \Lcs{psbcurve} as the following example shows. \begin{LTXexample} -\pspicture[showgrid=true](5,3) +\pspicture[showgrid](0,-0.4)(5,3) \psbcurve[linestyle=dashed, linewidth=3pt, dash=0.5 0.2, @@ -333,7 +347,7 @@ more) are respected by \Lcs{psbcurve} as the following example shows. \endpspicture \end{LTXexample} -\section{Things that do not work (`known bugs')} +\subsection{Things that do not work (`known bugs')} As already mentioned this project is something like an experiment. So, there are many things that do not work. @@ -342,10 +356,375 @@ there are many things that do not work. \item The control points are computed in a rather crude way (see above). The \Lkeyword{curvature} option is not recognised. \item If \Lkeyword{fillstyle} is set to \Lkeyword{solid} and - \Lkeyset{showpoints=true} then the fill color covers the interpolation and control points. + \Lkeyword{showpoints} then the fill color covers the interpolation and control points. \item arrow heads do not work. \end{itemize} +\clearpage + +\section{Bezier curve with weighted points} + +\subsection{Mathemathical background} + +A mass point is a weighted point $\left(P;\omega\right)$ with $\omega \neq 0$ or a vector $\left(\overrightarrow{P};0\right)$ with a weight equal to $0$. A generic mass point is noted $\left(P;\omega\right)$. + +Using the quadratic Bernstein polynomials, a rational quadratic B\'ezier curve having three control +mass points $\left(P_{0};\omega_{0}\right)$, $\left(P_{1};\omega_{1}\right)$ +and $\left(P_{2};\omega_{2}\right)$, is defined as follow: + +\begin{definition}\label{fdef::DefRQBC_Fiorot}: Rational quadratic B\'ezier curve (BR curve) + +Let $\omega_{0}$, $\omega_{1}$ and $\omega_{2}$ be three real numbers. +Let $\left(P_{0};\omega_{0}\right)$, $\left(P_{1};\omega_{1}\right)$ +and $\left(P_{2};\omega_{2}\right)$ be three mass points, these points are not collinear. + +Define two sets $I = \left \{ i | \omega_i \neq 0 \right \}$ and +$J = \left \{ i | \omega_i = 0 \right \}$ + + +Define the function $\omega_{f}$ from $\left[0;1\right] $ to $\mathbb{R} $ as follows + +\begin{equation} +%\begin{array}{cccc} +%\omega_{f}: & \left[0;1\right] & \longrightarrow & \mathbb{R} \\ +%& t & \longmapsto &\omega_{f}\left(t\right)=\dy\sum_{i\in I}\omega_{i}\times B_{i}\left(t\right) +%\end{array} +\omega_{f}\left(t\right)=\dy\sum_{i\in I}\omega_{i}\times B_{i}\left(t\right) +\label{eq:DenominateurCbreBezier} +\end{equation} + +A mass point $\left(M;\omega\right)$ or $\left(\overrightarrow{u};0\right)$ +belongs to the quadratic B\'ezier curve defined by the three control +mass points $\left(P_{0};\omega_{0}\right)$, $\left(P_{1};\omega_{1}\right)$ +and $\left(P_{2};\omega_{2}\right)$, +if there is a real $t_{0}$ in $\left[0;1\right]$ such that: + +\begin{itemize} +\item [$\bullet$] if $\omega_{f}\left(t_{0}\right)\neq0$ then we have + +\hspace*{-0.75cm}\begin{minipage}{1.0\textwidth} +\begin{equation} +\overrightarrow{OM} = \dy \frac{1}{\omega_{f}\left(t_{0}\right)}\left(\dy \sum_{i\in I} \dy \omega_{i} B_{i}\left(t_{0}\right) + \overrightarrow{OP_{i}} \right) ++\vspace{0.2cm}\dy \frac{1}{\omega_{f}\left(t_{0}\right)}\left( \sum_{i\in J} B_{i}\left(t_{0}\right) \overrightarrow{P_{i}}\right) +\label{eq:DefRQBC_FiorotPoint} +\end{equation} +\end{minipage} + +\item [$\bullet$] if $\omega_{f}\left(t_{0}\right)=0$ then we have +\begin{equation} +\overrightarrow{u}=\sum_{i\in I}\omega_{i}B_{i}\left(t_{0}\right)\overrightarrow{OP_{i}}+\sum_{i\in J}B_{i}\left(t_{0}\right)\overrightarrow{P_{i}}\label{eq:DefRQBC_FiorotVecteur} +\end{equation} + +\end{itemize} +\hrulefill{}\end{definition} + +The reduced discriminant of the denominator $\omega_{f}\left(t_{0}\right)$ is +\begin{equation} +\Delta'=\omega_{1}^{2}-\omega_{2} \omega_{0}\label{eq:DiscrimantReduitCBRQnonStandard} +\end{equation} +and we can state the following fundamental result: +\begin{itemize} +\item[$\star$] +if $\omega_{1}^{2}-\omega_{2} \omega_{0}=0$ then the + denominator has one and only one root, the curve is a parabolic arc; +\item[$\star$] + if $\omega_{1}^{2}-\omega_{2} \omega_{0}>0$ then the + denominator has two distinct roots, the curve is a hyperbolic arc; +\item[$\star$] + if $\omega_{1}^{2}-\omega_{2} \omega_{0}<0$ then the + denominator does not vanish, the curve is an elliptical arc. +\end{itemize} + +We can note w.l.o.g.\footnote{We can permute the role of $P_0$ and $P_2$} that one of the weights can be equal to~$1$. If $\omega_0$ is not equal to $0$, we choose $\omega_0=1$, else, we choose $\omega_1=1$, and we can characterise the type of the conic from the mass points of the BR curve, see Table~\ref{tab::TypeConicEtcbeBr}. + +\begin{table}[!h] +\begin{center} +\begin{tabular}{|c||c|c|c|}\hline +Conic & Three weighted points & Points and vectors \\ \hline \hline +Parabola & $\left(P_{0};1\right)$, $\left(P_{1};\omega\right)$ + $\left(P_{2};\omega^{2}\right)$ & $\left(P_{0};1\right)$, $\left(\overrightarrow{P_{1}};0\right)^{\mathstrut^{\mathstrut}}_{\mathstrut_{\mathstrut}}$ $\left(\overrightarrow{P_{2}};0\right)$\\ \hline \hline + Ellipse & $\left(P_{0};1\right)$, $\left(P_{1};\omega_{1}\right)$, $\left(P_{2};\omega_{2}\right)$, $ \omega_{2}>\omega_{1}^{2} $ & $\left(P_{0};1\right)$, $\left(\overrightarrow{P_{1}};0\right)^{\mathstrut^{\mathstrut}}_{\mathstrut_{\mathstrut}}$ $\left(P_{2};1\right)$ \\ \hline \hline + Hyperbola & $\left(P_{0};1\right)$, $\left(P_{1};\omega_{1}\right)$ $\left(P_{2};\omega_{2}\right)$, $\omega_{2}<\omega_{1}^{2}$ & $\left(P_{0};1\right)$, $\left(\overrightarrow{P_{1}};0\right)^{\mathstrut^{\mathstrut}}_{\mathstrut_{\mathstrut}}$ $\left(P_{2};-1\right)$ \\ \cline{3-3} +& & $\left(\overrightarrow{P_{0}};0\right)$, $\left(P_{1};1\right)$ and $\left(\overrightarrow{P_{2}};0\right)^{\mathstrut^{\mathstrut}}_{\mathstrut_{\mathstrut}}$ \\ \hline \hline +\end{tabular} +\end{center} +\caption{Types of conics defined by B\'ezier curves with control mass points. +\hrulefill{} +\label{tab::TypeConicEtcbeBr}} +\end{table} + +From the access rights used by Unix and Linux, we define a bijection $f$ between $\mathbb{F_2}^3-\left\lbrace\left(0,0,0\right)\right\rbrace$ and the set $\left\lbrace 1 ,2 , 3, 4, 5, 6, 7\right\rbrace$. From $\left(\omega_2,\omega_1,\omega_0\right)$, we define a triplet $\left(b_2,b_1,b_0\right)$ as follow: if $w_i\neq0$ then $b_i=1$ else $b_i=0$. Then +$$f\left(\omega_2,\omega_1,\omega_0\right)= b_2 \times 4+ b_1 \times 2+b_0$$ + +If $f\left(\omega_2,\omega_1,\omega_0\right)=7$, the control points are weighted points: the curve is an elliptical arc, a parabolic arc or a hyperbolic arc. If $\left(\omega_2,\omega_1,\omega_0\right)=\left(1,-1,1\right)$, the parabolic arc is not bounded and for $t=\frac{1}{2}$, the mass point is a direction vector of the parabola axis. If $\left(\omega_2,\omega_1,\omega_0\right)=\left(1,-2,1\right)$, the hyperbolic arc is not bounded and there exists $t$ in $\left]0,1\right[$ such as the mass point is a direction vector of one of the asymptotes of the hyperbola. \\ +If $f\left(\omega_2,\omega_1,\omega_0\right)=1$, the first control point is a weighted point, the others are vectors: the curve is a parabolic arc. The B\'ezier curve is defined by + \begin{equation} +\begin{cases} + \dy \frac{1}{\omega_0\, B_0\left(t_{0}\right)}\left( \omega_{0}\, B_{0}\left(t_{0}\right) + \overrightarrow{OP_{0}} + B_{1}\left(t_{0}\right) \overrightarrow{P_{1}}+ B_{2}\left(t_{0}\right) + \overrightarrow{P_{2}}\right) & \text{ if }t_0\in\left[0,1\right[ \\[1ex] +\overrightarrow{P_2} & \text{ if }t_0=1\\ + \end{cases} +\label{eq:parabola} +\end{equation} +If $f\left(\omega_2,\omega_1,\omega_0\right)=4$, the B\'ezier curve can be defined in the same way.\\ +If $f\left(\omega_2,\omega_1,\omega_0\right)=2$, the intermediate control point is a weighted point, the others are vectors: the curve is a branch of a hyperbola. The B\'ezier curve is defined by + \begin{equation} +\begin{cases} + \dy \frac{1}{\omega_1\, B_1\left(t_{0}\right)}\left( \omega_{1}\, B_{1}\left(t_{0}\right) \overrightarrow{OP_{1}}+ B_{0}\left(t_{0}\right) \overrightarrow{P_{0}}+ B_{2}\left(t_{0}\right) \overrightarrow{P_{2}}\right) & \text{ if }t_0\in\left]0,1\right[ +\\[1ex] +\overrightarrow{P_0} & \text{ if }t_0=0\\[1ex] +\overrightarrow{P_2} & \text{ if }t_0=1 + \end{cases} +\label{eq:branchHyperbola} +\end{equation} +and the centre of the hyperbola is $P_1$. The vector $\overrightarrow{P_0}$ is a direction vector of an asymptote of the hyperbola whereas the vector $\overrightarrow{P_2}$ is a direction vector of the other asymptote.\\ +If $f\left(\omega_2,\omega_1,\omega_0\right)=5$, the intermediate control point is a vector, the others are weighted points: the curve is an elliptical arc. The B\'ezier curve is defined by + \begin{equation} + \dy \frac{1}{\omega_0\, B_0\left(t_{0}\right)+\omega_2\, B_2\left(t_{0}\right)}\left( \omega_{0}\, B_{0}\left(t_{0}\right) \overrightarrow{OP_{0}} + B_{1}\left(t_{0}\right) \overrightarrow{P_{1}}+ \omega_2\, B_{2}\left(t_{0}\right) \overrightarrow{OP_{2}}\right),\;\; t_0\in\left[0,1\right] +\label{eq:ellipse} +\end{equation} +and the tangent vector to the curve at $P_0$ or $P_2$ is parallel to $\overrightarrow{P_1}$. + +\subsection{Syntax} + +\begin{BDef} +\Lcs{psRQBCmasse}\OptArgs\Largr{$x_0,y_0$}\Largr{$x_1,y_1$}\Largr{$x_2,y_2$}\Largb{$w_0,w_1,w_2$} +\end{BDef} + +For the coordinates of the points all possible kinds of coordinates are possible, like polar, PostScript, nodes, \ldots + +\subsection{Three weighted orthogonal points} +\begin{LTXexample}[pos=t] +\begin{pspicture}[showgrid](-6,-6.4)(3,3) +\psclip{\psframe(-6,-6)(3,3)} + \psRQBCmasse[linecolor=blue](2,0)(2,2)(0,2){1,-1,1} + \psRQBCmasse[linecolor=navy,autoTrace](2,0)(2,2)(0,2){1,1,1} + \rput(P0){$P_0$}\uput[r](P1){$P_1$}\uput[r](P2){$P_2$} +\endpsclip% +\end{pspicture} +\end{LTXexample} + + + +\subsection{Half-ellipse} +\begin{LTXexample}[pos=t] +\begin{pspicture}[showgrid](-3,-2.4)(3,2) +\psframe(-3,-2)(3,2) +\psRQBCmasse[linecolor=red,autoTrace](2,0)(0,1)(-2,0){1,0,1} +\uput[r](P0P1){$\overrightarrow{P_1}$} \uput[r](P2){$P_2$} +\rput(P1P2){$\overrightarrow{P_{1}}$} \uput[r](P0){$P_0$} +\psRQBCmasse[linecolor=orange,autoTrace=false](2,0)(0,-1)(-2,0){1,0,1} +\end{pspicture} +\end{LTXexample} + + +\clearpage + +\subsection{Half-parabola} +\subsubsection{Point $P_2$ and two vectors} + +\begin{LTXexample}[pos=t] +\begin{pspicture}[showgrid](-3,-3.4)(3,3) +\psclip{\psframe(-3,-3)(3,3)} + \psRQBCmasse[linecolor=red,autoTrace](2,0)(0,1)(-1,0){0,0,1} + \uput[r](P1P2){$\overrightarrow{P_1}$} \uput[r](P2){$P_2$} + \uput[r](P0P2){$\overrightarrow{P_0}$} + \psRQBCmasse[linecolor=orange,autoTrace=false](2,0)(0,-1)(-1,0){0,0,1} + \uput[r](P1P2){$\overrightarrow{P_1}$} \uput[r](P2){$P_2$} + \uput[r](P0P2){$\overrightarrow{P_0}$} +\endpsclip +\end{pspicture} +\end{LTXexample} + +\subsubsection{Point $P_0$ and two vectors} + +\begin{LTXexample}[pos=t] +\begin{pspicture}[showgrid](-3,-3.4)(3,3) +\psclip{\psframe(-3,-3)(3,3)} + \psRQBCmasse[linecolor=red,autoTrace](2,0)(0,1)(-1,0){1,0,0} + \uput[r](P0P1){$\overrightarrow{P_1}$} \uput[r](P0){$P_0$} + \uput[r](P0P2){$\overrightarrow{P_2}$} + \psRQBCmasse[linecolor=orange,autoTrace=false](2,0)(0,-1)(-1,0){1,0,0} +\endpsclip% +\end{pspicture} +\end{LTXexample} + +\clearpage + +\subsection{Branch of a hyperbola} +\begin{LTXexample}[pos=t] +\begin{pspicture}[showgrid](-3,-3.4)(3,3) +\psclip{\psframe(-3,-3)(3,3)} + \psRQBCmasse[linecolor=red,autoTrace](1,1)(0,0)(-1,1){0,1,0} + \uput[r](P0){$\overrightarrow{P_0}$} \uput[r](0,-0.5){$P_1$} + \uput[r](P2){$\overrightarrow{P_2}$} + \psRQBCmasse[linecolor=orange,autoTrace=false](1,1)(0,0)(-1,1){0,-1,0} +\endpsclip% +\end{pspicture} +\end{LTXexample} + +\subsection{Parabola} +\begin{LTXexample}[pos=t] +\psset{unit=0.5} +\begin{pspicture}(-14,-3.4)(15,10) +\psclip{\psframe(-14,-3)(15,10)} + \psRQBCmasse[linecolor=red,autoTrace](0,6)(-13,0)(-1,-1){1,1,1} + \psRQBCmasse[linecolor=orange](0,6)(-13,0)(-1,-1){1,-1,1} + \uput[u](P0){$P_0$}\uput[l](P1){$P_1$}\uput[d](P2){$P_2$} +\endpsclip +\end{pspicture} +\end{LTXexample} + + +\clearpage + +\subsection{Ellipse} +\begin{LTXexample}[pos=t] +\psset{unit=0.5} +\begin{pspicture}(-14,-3.4)(15,10) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=5,gridlabels=0pt] +%\psplotImp[linewidth=0.5pt,linecolor=blue,algebraic](-6,-3)(15,10)% + %{ -0.044*x^2-0.161*y^2 + 0.075*x*y + 0.074*x + 0.797*y + 1} +\psRQBCmasse[nPoints=20,autoTrace,showpoints](0,6)(-13,0)(-1,-1){1,0.5,1} +\psRQBCmasse[nPoints=40,linecolor=red,showpoints](0,6)(-13,0)(-1,-1){1,-0.5,1} +\psaxes[labelFontSize=\scriptscriptstyle]{->}(0,0)(-14,-3)(15,10) +\end{pspicture} +\end{LTXexample} + + +\subsection{Complete circle} +\begin{LTXexample}[pos=t] +\psset{unit=1} +\begin{pspicture}(-4,-4.4)(4,4) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=5,gridlabels=0pt] +\psRQBCmasse[autoTrace](0,3)(3,3)(3,0){1,1,2} +\psRQBCmasse[linecolor=red](0,3)(3,3)(3,0){1,-1,2} +\psaxes[labelFontSize=\scriptscriptstyle]{->}(0,0)(-4,-4)(4,4) +\end{pspicture} +\end{LTXexample} + + +\begin{LTXexample}[pos=t] +\psset{unit=1.5} +\begin{pspicture}(-4,-4.4)(4,4) +\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=5,gridlabels=0pt] +\psRQBCmasse[autoTrace](0,3)(3,0)(0,-3){1,0,1} +\uput[u](-0.25,3){$P_0$} +\uput[u](-0.25,-3.5){$P_2$} +\uput[u](3,3){$\overrightarrow{P_1}$} +\uput[u](3,-3.5){$\overrightarrow{P_1}$} +\uput[u](2.5,0){$\overrightarrow{P_1}$} +\psRQBCmasse[linecolor=red](0,3)(-3,0)(0,-3){1,0,1} +\psaxes[labelFontSize=\scriptscriptstyle,linewidth=0.01]{->}(0,0)(-4,-4)(4,4) +\end{pspicture} +\end{LTXexample} +We get a circle because we have + +\begin{equation} +\left\lbrace +\begin{array}{rcl} +\omega_0\times\omega_2\times P_0 P_2^2 &= &4\times\overrightarrow{P_1}^2 \\[0.2cm] +\overrightarrow{P_0 P_2} &\perp & \overrightarrow{P_1} +\end{array} +\right. +\end{equation} + +\clearpage + + +\subsection{Animations} + +\subsubsection{$w_0=1$, $w_2=1$ and a variable $w_1$} + +With the beginning of $w_1=0$ +the curves are swapped. In the case of Bezier curves $w_1 = 0$ gives only +the $[P_0 P_2]$ segment. Using the mass points, the point $P_1$ no longer exists but we get the vector $\overrightarrow{P_1}$. + + +\bigskip +\begin{center} +\begin{animateinline}[controls,loop,palindrome, + begin={\begin{pspicture}(-4,-4)(10,4)}, + end={\end{pspicture}}]{3}% 3 images/s +\multiframe{40}{rA=2.0+-0.1,rB=-2.0+0.1}{% + \psgrid[subgriddiv=0,gridcolor=lightgray,griddots=5,gridlabels=0pt] + \psclip{\psframe(-4,-4)(10,4)} + \psRQBCmasse[autoTrace,linewidth=1.5pt](0,-1)(1,0)(0,1){1,\rA,1} + \uput[u](P2){$P_2$}\uput[l](P1){$P_1$}\uput[d](P0){$P_0$} + \psRQBCmasse[linecolor=red,linewidth=1.5pt](0,-1)(1,0)(0,1){1,\rB,1} + \psaxes[labelFontSize=\scriptscriptstyle,linewidth=0.01]{->}(0,0)(-4,-4)(10,4) + \rput(8,3){$w_1=\rA$}% + \endpsclip +} +\end{animateinline} +\end{center} + +\begin{lstlisting} +\begin{animateinline}[controls,loop,palindrome, + begin={\begin{pspicture}(-4,-4)(10,4)}, + end={\end{pspicture}}]{3}% 3 images/s +\multiframe{40}{rA=2.0+-0.1,rB=-2.0+0.1}{% + \psgrid[subgriddiv=0,gridcolor=lightgray,griddots=5,gridlabels=0pt] + \psclip{\psframe(-4,-4)(10,4)} + \psRQBCmasse[autoTrace,linewidth=1.5pt](0,-1)(1,0)(0,1){1,\rA,1} + \uput[u](P2){$P_2$}\uput[l](P1){$P_1$}\uput[d](P0){$P_0$} + \psRQBCmasse[linecolor=red,linewidth=1.5pt](0,-1)(1,0)(0,1){1,\rB,1} + \psaxes[labelFontSize=\scriptscriptstyle,linewidth=0.01]{->}(0,0)(-4,-4)(10,4) + \rput(8,3){$w_1=\rA$}% + \endpsclip +} +\end{animateinline} +\end{lstlisting} + + + +\clearpage + +\subsubsection{$w_0=1$, $\left |w_1\right|=1$ and a variable $w_2$} + +%L'utilisation de $\left |w_1\right|$ permet d'obtenir les deux arcs et donc toute la conique. +The use of $\left |w_1\right|$ provides both arcs and the whole cone. + +\bigskip +\begin{center} +\begin{animateinline}[controls,loop,palindrome, + begin={\begin{pspicture}(-8,-4)(4,4)}, + end={\end{pspicture}}]{3}% 3 images/s +\multiframe{80}{rA=4.0+-0.1}{% + \psgrid[subgriddiv=0,gridcolor=lightgray,griddots=5,gridlabels=0pt] + \psclip{\psframe(-8,-4)(4,4)} + \psRQBCmasse[autoTrace,linewidth=1.5pt](0,-1)(1,0)(0,1){1,1,\rA} + \uput[u](P2){$P_2$}\uput[l](P1){$P_1$}\uput[d](P0){$P_0$} + \psRQBCmasse[linecolor=red,linewidth=1.5pt](0,-1)(1,0)(0,1){1,-1,\rA} + \psaxes[labelFontSize=\scriptscriptstyle,linewidth=0.01]{->}(0,0)(-8,-4)(4,4) + \rput[rb](3.5,3){$w_2=\rA$}% + \endpsclip +} +\end{animateinline} +\end{center} + +\begin{lstlisting} +\begin{animateinline}[controls,loop,palindrome, + begin={\begin{pspicture}(-8,-4)(4,4)}, + end={\end{pspicture}}]{3}% 3 images/s +\multiframe{80}{rA=4.0+-0.1}{% + \psgrid[subgriddiv=0,gridcolor=lightgray,griddots=5,gridlabels=0pt] + \psclip{\psframe(-8,-4)(4,4)} + \psRQBCmasse[autoTrace,linewidth=1.5pt](0,-1)(1,0)(0,1){1,1,\rA} + \uput[u](P2){$P_2$}\uput[l](P1){$P_1$}\uput[d](P0){$P_0$} + \psRQBCmasse[linecolor=red,linewidth=1.5pt](0,-1)(1,0)(0,1){1,-1,\rA} + \psaxes[labelFontSize=\scriptscriptstyle,linewidth=0.01]{->}(0,0)(-8,-4)(4,4) + \rput[rb](3.5,3){$w_2=\rA$}% + \endpsclip +} +\end{animateinline} +\end{lstlisting} + + +\clearpage + \section{List of all optional arguments for \texttt{pst-bezier}} @@ -355,11 +734,13 @@ there are many things that do not work. \bgroup \raggedright \nocite{*} -\bibliographystyle{plain} -\bibliography{pst-bezier-doc} +\printbibliography \egroup \printindex \end{document} + + +Moreover, we can choose a non Euclidean metric. The use of mass points, Bézier curves, conics and the space of spheres in the Minkowski-Lorentz space permits to realise G1-continous blend between Dupin cyclides : to blend surfaces in R3, we blend Bézier curves in R5. For example, we can build a seahorse (see 09_LorentzHippocampeComplet.png), the article (in French) is here: diff --git a/Master/texmf-dist/dvips/pst-bezier/pst-bezier.pro b/Master/texmf-dist/dvips/pst-bezier/pst-bezier.pro index 560d027a807..72980006e21 100644 --- a/Master/texmf-dist/dvips/pst-bezier/pst-bezier.pro +++ b/Master/texmf-dist/dvips/pst-bezier/pst-bezier.pro @@ -1,17 +1,16 @@ -%% $Id: pst-bezier.pro 87 2009-01-29 10:37:06Z herbert $ -%% PostScript prologue for pstricks-add.tex. +%% $Id: pst-bezier.pro 323 2016-08-20 17:57:28Z herbert $ +%% PostScript prologue for pst-bezier.tex. %% -%% Version 0.01, 2009/01/29 +%% Version 0.02, 2016/08/19 %% %% For distribution, see pst-bezier.tex. %% %% tx@Dict begin - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Auxiliary routines: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - +% %% [x1 y1] [x2 y2] -> [ x1+y1 x2+y2 ] /AddArrays2d { [ 3 1 roll %% Get the operands @@ -40,8 +39,7 @@ tx@Dict begin 3 1 roll 1 get mul ] } bind def - - +% %% << [Array of Bezier splines] /K 1 >> -> empty stack %% Thereby, a Bezier spline is described by an array: %% [x0 y0 x1 y1 x2 y2 x3 y3 sl sr] @@ -71,7 +69,6 @@ begin %% LaTeX provides the dictionary (see above comments) Splines K 1 sub get 2 2 getinterval SubArrays2d putinterval %% } if - %% Second control point: Splines K get 2 get dup %% (cases /n and /s) /n eq { %% `not specified' -> automatically computed @@ -106,4 +103,134 @@ begin %% LaTeX provides the dictionary (see above comments) ] end def %% Put points in the top dictionary } bind def +% +/tx@RQBCmasse { + /P0P1{ + xP0 xP1 add + yP0 yP1 add + } def + /P0P2{ + xP0 xP2 add + yP0 yP2 add + } def + /P1P2{ + xP2 xP1 add + yP2 yP1 add + } def + /B0 { 1 t sub dup mul } def + /B1 {2 t mul 1 t sub mul }def + /B2 { t dup mul }def +% +% w0 abs 1e-6 gt {1}{0} ifelse /choixw0 exch def +% w1 abs 1e-6 gt {1}{0} ifelse /choixw1 exch def +% w2 abs 1e-6 gt {1}{0} ifelse /choixw2 exch def +% /choix choixw2 4 mul choixw1 2 mul add choixw0 add def + choix 1 eq { + /den { w0 B0 mul }def % + /RQBCmasse1 { + 0 1 nB {/t exch nB div def + den 0 ne { + w0 B0 mul xP0 mul B1 xP1 mul add B2 xP2 mul add den div + w0 B0 mul yP0 mul B1 yP1 mul add B2 yP2 mul add den div + } if + } for + } def + /RQBCmasse2 {} def + } if % fin choix 1 + choix 2 eq { + /den {w1 B1 mul } def % + /RQBCmasse1 { + 1 1 nB {/t exch nB div def + den 0 ne {% B0*P0+w1*B1*P1+B2*P2 + B0 xP0 mul w1 B1 mul xP1 mul add B2 xP2 mul add den div + B0 yP0 mul w1 B1 mul yP1 mul add B2 yP2 mul add den div + } if + } for + } def + /RQBCmasse2 {} def + } if % fin choix 2 + choix 3 eq { + /den { w0 B0 mul w1 B1 mul add } def % w0*B0+w1*B1 + /RQBCmasse1 { + 0 1 nB {/t exch nB div def + den 1e-6 gt { % w0*B0*P0+w1*B1*P1+B2*P2 + w0 B0 mul xP0 mul w1 B1 mul xP1 mul add B2 xP2 mul add den div + w0 B0 mul yP0 mul w1 B1 mul yP1 mul add B2 yP2 mul add den div + } if + } for + } def + /RQBCmasse2 { + 0 1 nB {/t exch nB div def + den -1e-6 lt { % w0*B0*P0+w1*B1*P1+B2*P2 + w0 B0 mul xP0 mul w1 B1 mul xP1 mul add B2 xP2 mul add den div + w0 B0 mul yP0 mul w1 B1 mul yP1 mul add B2 yP2 mul add den div + } if + } for + } def + } if % fin choix 3 + choix 4 eq { + /den { w2 B2 mul } def % w2*B2 + /RQBCmasse1 { + 0 1 nB {/t exch nB div def + den 0 ne { % B0*P0+B1*P1+w2*B2*P2 + B0 xP0 mul B1 xP1 mul add w2 B2 mul xP2 mul add den div + B0 yP0 mul B1 yP1 mul add w2 B2 mul yP2 mul add den div + } if + } for + } def + /RQBCmasse2 {} def + } if % fin choix 4 + choix 5 eq { + /den {w0 B0 mul w2 B2 mul add} def % w0*B0+w2*B2 + /RQBCmasse1 { + 1 1 nB {/t exch nB div def + den 0 ne { % w0*B0*P0+B1*P1+w2*B2*P2 + w0 B0 mul xP0 mul B1 xP1 mul add w2 B2 mul xP2 mul add den div + w0 B0 mul yP0 mul B1 yP1 mul add w2 B2 mul yP2 mul add den div + } if + } for + } def + /RQBCmasse2 {} def + } if % fin choix 5 + choix 6 eq { + /den { w1 B1 mul w2 B2 mul add } def % w1*B1+w2*B2 + /RQBCmasse1 { + 0 1 nB {/t exch nB div def + den 1e-6 gt { % B0*P0+w1*B1*P1+w2*B2*P2 + B0 xP0 mul w1 B1 mul xP1 mul add w2 B2 mul xP2 mul add den div + B0 yP0 mul w1 B1 mul yP1 mul add w2 B2 mul yP2 mul add den div + } if + } for + } def + /RQBCmasse2 { + 0 1 nB {/t exch nB div def + den -1e-6 lt { % B0*P0+w1*B1*P1+w2*B2*P2 + B0 xP0 mul w1 B1 mul xP1 mul add w2 B2 mul xP2 mul add den div + B0 yP0 mul w1 B1 mul yP1 mul add w2 B2 mul yP2 mul add den div + } if + } for + } def + } if % fin choix 6 + choix 7 eq { + /den { w0 B0 mul w1 B1 mul add w2 B2 mul add } def +% tableau de pointslist[(w0-w1+sqrt(-w0*w2+w1^2))/(w0-2*w1+w2),(w0-w1-sqrt(-w0*w2+w1^2))/(w0-2*w1+w2)] + /RQBCmasse1 { + 0 1 nB {/t exch nB div def + den 1e-6 gt { % w0*B0*P0+w1*B1*P1+w2*B2*P2 + w0 B0 mul xP0 mul B1 w1 mul xP1 mul add w2 B2 mul xP2 mul add den div % xP + w0 B0 mul yP0 mul B1 w1 mul yP1 mul add w2 B2 mul yP2 mul add den div % yP + } if + } for + } def + /RQBCmasse2 { + 0 1 nB {/t exch nB div def + den -1e-6 lt { + w0 B0 mul xP0 mul B1 w1 mul xP1 mul add w2 B2 mul xP2 mul add den div % xP + w0 B0 mul yP0 mul B1 w1 mul yP1 mul add w2 B2 mul yP2 mul add den div % yP + } if + } for + } def + } if % fin du choix 7 +} def +% end %% tx@Dict diff --git a/Master/texmf-dist/source/generic/pst-bezier/Makefile b/Master/texmf-dist/source/generic/pst-bezier/Makefile deleted file mode 100644 index ff81d4e1edb..00000000000 --- a/Master/texmf-dist/source/generic/pst-bezier/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# `Makefile' for `pst-circ.pdf', hv, 2007/03/17 - -.SUFFIXES : .tex .ltx .dvi .ps .pdf .eps - -PACKAGE = pst-bezier - -MAIN = $(PACKAGE)-doc - -LATEX = latex - -ARCHNAME = $(MAIN)-$(shell date +%y%m%d) - -ARCHFILES = $(PACKAGE).sty $(PACKAGE).tex $(PACKAGE).pro $(MAIN).tex README Changes Makefile - -TDS = ~/PSTricks/PSTricks-TDS - -all : doc clean tds -doc: $(MAIN).pdf - -$(MAIN).pdf : $(MAIN).ps - GS_OPTIONS=-dAutoRotatePages=/None ps2pdf $< - -$(MAIN).ps : $(MAIN).dvi - dvips $< - -$(MAIN).dvi : $(MAIN).tex - $(LATEX) $< - $(LATEX) $< - if ! test -f $(basename $<).glo ; then touch $(basename $<).glo; fi - 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 \ - $(basename $<).idx - bibtex $(basename $<) - $(LATEX) $< - $(LATEX) $< - -clean : - $(RM) $(addprefix $(MAIN), .log .aux .glg .glo .gls .ilg .idx .ind .tmp .toc .out .blg .Roessler .bbl ) - $(RM) $(addprefix $(MAIN), .dvi .ps) - -veryclean : clean - $(RM) $(addprefix $(MAIN), .pdf .bbl .blg) - -arch : - zip $(ARCHNAME).zip $(ARCHFILES) - -tds: - cp -u Changes $(TDS)/doc/generic/$(PACKAGE)/ - cp -u README $(TDS)/doc/generic/$(PACKAGE)/ - cp -u $(MAIN).pdf $(TDS)/doc/generic/$(PACKAGE)/ -# - cp -u Changes $(TDS)/tex/latex/$(PACKAGE)/ - cp -u $(PACKAGE).sty $(TDS)/tex/latex/$(PACKAGE)/ -# - cp -u Changes $(TDS)/tex/generic/$(PACKAGE)/ - cp -u $(PACKAGE).tex $(TDS)/tex/generic/$(PACKAGE)/ -# - cp -u Changes $(TDS)/dvips/$(PACKAGE)/ - cp -u $(PACKAGE).pro $(TDS)/dvips/$(PACKAGE)/ -# - cp -u Changes $(TDS)/source/$(PACKAGE)/ - cp -u $(MAIN).tex $(TDS)/source/$(PACKAGE)/ - cp -u $(MAIN).bib $(TDS)/source/$(PACKAGE)/ - cp -u Makefile $(TDS)/source/$(PACKAGE)/ - -# EOF diff --git a/Master/texmf-dist/tex/generic/pst-bezier/pst-bezier.tex b/Master/texmf-dist/tex/generic/pst-bezier/pst-bezier.tex index a13a8fb239c..36659287d1f 100644 --- a/Master/texmf-dist/tex/generic/pst-bezier/pst-bezier.tex +++ b/Master/texmf-dist/tex/generic/pst-bezier/pst-bezier.tex @@ -6,8 +6,8 @@ %% %% Package `pst-bezier.tex' %% -%% Tobias Nähring (www.tn-home.de) -%% Herbert Voss <voss@PSTricks.de> +%% Tobias Nähring (www.tn-home.de) (inactive) +%% Herbert Voss <hvoss@tug.org> %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN archives @@ -20,12 +20,14 @@ \csname PSTbezierLoaded\endcsname \let\PSTbezierLoaded\endinput -\def\fileversion{0.01} -\def\filedate{2009/01/29} -\message{ v\fileversion, \filedate} - \ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi -\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi +\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi +\ifx\PSTplotLoaded\endinput\else \input pst-plot \fi +\ifx\PSTnodesLoaded\endinput\else\input pst-node \fi + +\def\fileversion{0.02} +\def\filedate{2016/08/19} +\message{ v\fileversion, \filedate} \edef\TheAtCode{\the\catcode`\@}\catcode`\@=11 @@ -329,6 +331,82 @@ t,\psbcurve@tension,% T,\psbcurve@Tension,% \relax,\psbcurve@end}% } +% +\define@key[psset]{pst-bezier}{nPoints}{\def\psk@nPoints{#1 }} +\define@boolkey[psset]{pst-bezier}[Pst@]{showPolygon}[true]{} +\define@boolkey[psset]{pst-bezier}[Pst@]{autoTrace}[true]{} +% valeurs par défaut +% les coordonnées des points de contrôle P0= x0 y0, etc. +%\psset[pst-RQBC]{P0=2 0,P1=2 2,P2=0 2,w=1 0.707 1,n=400,showPoints=true,showPolygon=false} +\psset{nPoints=400,showPolygon=false,autoTrace=false} +% +\def\pst@get@w#1,#2,#3\@nil{% + \def\pst@@w{#1 #2 #3 }% + \def\psk@wZero{#1 }% + \def\psk@wUn{#2 }% + \def\psk@wDeux{#3 }} +% +\def\psRQBCmasse{\def\pst@par{}\pst@object{psRQBCmasse}} +\def\psRQBCmasse@i(#1)(#2)(#3)#4{{% +% \addbefore@par{showpoints=false}% + \begin@SpecialObj + \pst@get@w#4\@nil + \pst@getcoor{#1}\pst@tempA + \pst@getcoor{#2}\pst@tempB + \pst@getcoor{#3}\pst@tempC + \pst@cntm=\pscalculate{abs(\psk@wZero)<1e-6 ? 0 : 1}% + \pst@cntn=\pscalculate{abs(\psk@wUn)<1e-6 ? 0 : 2}% + \pst@cnto=\pscalculate{abs(\psk@wDeux)<1e-6 ? 0 : 4}% + \edef\ps@choix{\the\numexpr\pst@cntm+\pst@cntn+\pst@cnto}% +% \typeout{>>pst-bezier: ps@choix=\ps@choix}% + \pstVerb{ +% \addto@pscode{ + tx@Dict begin + /nB \psk@nPoints def + \pst@tempA \tx@UserCoor /yP0 exch def /xP0 exch def + \pst@tempB \tx@UserCoor /yP1 exch def /xP1 exch def + \pst@tempC \tx@UserCoor /yP2 exch def /xP2 exch def + \pst@@w /w2 exch def /w1 exch def /w0 exch def + /choix \ps@choix\space def + tx@RQBCmasse + end + } % fin pstVerb + \pnodes(#1){P0}(#2){P1}(#3){P2} + \pnode(!P0P1){P0P1} + %\pnode(!P1P0){P1P0} + \pnode(!P1P2){P1P2} + \pnode(!P0P2){P0P2} + \pslistplot{RQBCmasse1}\pslistplot[showpoints=false]{RQBCmasse2}% + \ifPst@autoTrace + \ifcase\ps@choix + \or %1 + \psline[linestyle=dashed,linecolor=black,arrowinset=0.1,arrowsize=0.2]{->}(#1)(P0P1) + \psline[linestyle=dashed,linecolor=green,arrowinset=0.1,arrowsize=0.2]{->}(#1)(P0P2) + %\psline[linestyle=dashed,linecolor=magenta,arrowinset=0.1,arrowsize=0.2]{->}(P1) + \psdots(#1)%(P1)(P2) + \or %2 + \psline[linestyle=dashed,linecolor=black,arrowinset=0.1,arrowsize=0.2]{->}(#2)(P0P1) + \psline[linestyle=dashed,linecolor=green,arrowinset=0.1,arrowsize=0.2]{->}(#2)(P1P2) + %\psline[linestyle=dashed,linecolor=magenta,arrowinset=0.1,arrowsize=0.2]{->}(P1) + \psdots(#2)%(P1)(P2) + \or %3 + \or %4 + \psline[linestyle=dashed,linecolor=black,arrowinset=0.1,arrowsize=0.2]{->}(#3)(P1P2) + \psline[linestyle=dashed,linecolor=green,arrowinset=0.1,arrowsize=0.2]{->}(#3)(P0P2) + %\psline[linestyle=dashed,linecolor=magenta,arrowinset=0.1,arrowsize=0.2]{->}(P1) + \psdots(#3)%(P1)(P2) + \or % 5 + \psline[linestyle=dashed,linecolor=black,arrowinset=0.1,arrowsize=0.2]{->}(#1)(P0P1) + \psline[linestyle=dashed,linecolor=green,arrowinset=0.1,arrowsize=0.2]{->}(#3)(P1P2) + \psline[linestyle=dashed,linecolor=magenta,arrowinset=0.1,arrowsize=0.2]{->}(#2) + \psdots(#1)(#2)(#3) + \or %6 + \or %7 + \psline(#1)(#2)(#3)\psdots(#1)(#2)(#3) + \fi + \fi + \end@SpecialObj}\ignorespaces} + \catcode`\@=\TheAtCode\relax \endinput diff --git a/Master/texmf-dist/tex/latex/pst-bezier/pst-bezier.sty b/Master/texmf-dist/tex/latex/pst-bezier/pst-bezier.sty index b92dfac4721..7eac6b24ae7 100644 --- a/Master/texmf-dist/tex/latex/pst-bezier/pst-bezier.sty +++ b/Master/texmf-dist/tex/latex/pst-bezier/pst-bezier.sty @@ -1,13 +1,18 @@ -%% $Id: pst-bezier.sty 86 2009-01-29 10:34:00Z herbert $ +%% $Id: pst-bezier.sty 321 2016-08-20 07:45:01Z herbert $ % \RequirePackage{pstricks} -\ProvidesPackage{pst-bezier}[2009/01/29 v. 0.01 package wrapper for +\RequirePackage{expl3} +\ExplSyntaxOn + \cs_new_eq:NN \pscalculate \fp_eval:n +\ExplSyntaxOff +% +\ProvidesPackage{pst-bezier}[2016/08/19 v. 0.02 package wrapper for pst-bezier.tex (hv)] \input{pst-bezier.tex} \ProvidesFile{pst-bezier.tex} [\filedate\space v\fileversion\space `PST-bezier' (tn,hv)] \IfFileExists{pst-bezier.pro}{% \ProvidesFile{pst-bezier.pro} - [2009/01/29 v. 0.01, PostScript prologue file (tn,hv)] + [2016/08/19 v. 0.02, PostScript prologue file (tn,hv)] \@addtofilelist{pst-bezier.pro}}{}% \endinput |