diff options
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks-add/Changes | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf | bin | 5032958 -> 5069046 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex | 37 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex | 40 |
4 files changed, 76 insertions, 4 deletions
diff --git a/Master/texmf-dist/doc/generic/pstricks-add/Changes b/Master/texmf-dist/doc/generic/pstricks-add/Changes index f3719b89ceb..dd5c770fc84 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/Changes +++ b/Master/texmf-dist/doc/generic/pstricks-add/Changes @@ -1,4 +1,4 @@ -%% $Id: Changes 449 2017-05-10 14:34:18Z herbert $ +%% $Id: Changes 555 2017-09-18 06:19:41Z herbert $ %% pstricks-add.pro ----------- 0.23 2009-12-17 - add RGBtoGRAY and WavelengthToGRAY @@ -39,6 +39,7 @@ pstricks-add.sty ----------- (hv) pstricks-add.tex ----------- (hv) + v 3.84 2017-09-16 - added \psRandomPointsArea v 3.83a 2017-08-24 - updated documentation v 3.83 2017-05-10 - use the star version for \psChar if no extra linecolor present. diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf Binary files differindex 321a18a0079..dbf288aa51f 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf +++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex index 06dfc1adb02..10daa5f3f51 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex +++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex @@ -1027,11 +1027,16 @@ The syntax of the new macro \Lcs{psRandom} is: \begin{BDef} \Lcs{psRandom}\OptArgs\Largb{}\\ -\Lcs{psRandom}\OptArgs\OptArg*{\Largr{$x_{Min},y_{Min}$}}\OptArg*{\Largr{$x_{Max},y_{Max}$}}\Largb{clip path} %$ +\Lcs{psRandom}\OptArgs\OptArg*{\Largr{$x_{Min},y_{Min}$}}\OptArg*{\Largr{$x_{Max},y_{Max}$}}\Largb{clip path} %$ \\ +\Lcs{psRandomPointArea}\OptArgs\Largb{No dots}\Largb{function}\\ %\psRandom[<option>](<xMax,yMax>){<clip path>} %\psRandom[<option>](<xMin,yMin>)(<xMax,yMax>){<clip path>} \end{BDef} + +\subsection{Simple random dots} + + If there is no area for the dots defined, then \verb+(0,0)(1,1)+ in the current scale setting is used for placing the dots. If there is only one \Largr{$x_{Max},y_{Max}$} %$ defined, then \verb+(0,0)+ is used for the other point. @@ -1083,6 +1088,36 @@ name & default\\\hline \psset{unit=1cm} +\subsection{Simple random dots devided by a function} + +The predefined colors are blue (lower part) and red (upper part). +\begin{LTXexample}[pos=t] +\psset{unit=6cm} +\begin{pspicture}(-0.2,-0.1)(1.1,1.2) +\psaxes[linewidth=1.25pt,Dx=0.2,Dy=0.2, + labelFontSize=\scriptstyle,ticksize=0 1,subticks=2, + subticksize=1,tickwidth=1pt,tickcolor=black!30,subtickcolor=black!20](0,0)(1,1)% +\psRandomPointArea[radius=1.5pt,countDots,algebraic, + fillcolorA=black,fillcolorB=green]{30}{sqrt(1-x^2)}% +\psplot[plotpoints=200]{0}{1}{1 x dup mul sub sqrt} +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[pos=t] +\psset{unit=6cm} +\begin{pspicture}(-0.2,-0.1)(1.1,1.2) +\psaxes[linewidth=1.25pt,Dx=0.2,Dy=0.2, + labelFontSize=\scriptstyle,ticksize=0 1,subticks=2, + subticksize=1,tickwidth=1pt,tickcolor=black!30,subtickcolor=black!20](0,0)(1,1)% +\psRandomPointArea[algebraic]{300}{-4*(x^2-x)}% +\psplot[plotpoints=200,algebraic]{0}{1}{-4*(x^2-x)} +\end{pspicture} +\end{LTXexample} + + + + + \clearpage %-------------------------------------------------------------------------------------- \section{\nxLcs{psDice}} diff --git a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex index c9ae9dcc7c7..40326d63171 100644 --- a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex +++ b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex @@ -31,8 +31,8 @@ \ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi \ifx\PSTmathLoaded\endinput\else \input pst-math \fi % -\def\fileversion{3.83a} -\def\filedate{2017/08/24} +\def\fileversion{3.84} +\def\filedate{2017/09/16} \let\pstricksaddFV\fileversion \message{`pstricks-add' v\fileversion, \filedate\space (dr,hv)} % @@ -535,6 +535,42 @@ a add \ignorespaces } % +\define@key[psset]{pstricks-add}{fillcolorA}[blue]{\pst@getcolor{#1}\psk@fillcolorA} +\define@key[psset]{pstricks-add}{fillcolorB}[red]{\pst@getcolor{#1}\psk@fillcolorB} +\define@boolkey[psset]{pstricks-add}[Pst@]{countDots}[true]{} +\psset[pstricks-add]{countDots=false,fillcolorA=blue,fillcolorB=red} +% +\def\psRandomPointArea{\pst@object{psRandomPointArea}} +\def\psRandomPointArea@i#1#2{% + \pst@killglue + \addbefore@par{radius=2pt,fillcolorA=blue,fillcolorB=red}% + \begin@SpecialObj + \pssetlength\pst@dimc{\psk@radius} + \addto@pscode{ + realtime srand Rand pop + 4 dict begin + /Func \ifPst@algebraic (#2) tx@addDict begin AlgParser end cvx \else { #2 } \fi def + 1 1 #1 { + /i ED + Rand /x ED + Func /f ED % function value + Rand /y ED + gsave x y \tx@ScreenCoor \pst@number\pst@dimc 0 360 arc + y f lt { \pst@usecolor\psk@fillcolorA }{ \pst@usecolor\psk@fillcolorB } ifelse + fill grestore + \ifPst@countDots + x y \tx@ScreenCoor moveto i 4 string cvs + \ifpst@psfonts /Helvetica \else /NimbusSanL-Regu \fi + findfont 5 scalefont setfont show + \fi + } for + end + }% + \end@SpecialObj + \ignorespaces +} + +% \def\psComment{\def\pst@par{}\pst@object{psComment}} \def\psComment@i{\pst@getarrows\psComment@ii} \def\psComment@ii(#1)(#2)#3{\@ifnextchar[ |