texlive[45346] Master/texmf-dist: pstricks-add (18sep17)

commits+karl at tug.org commits+karl at tug.org
Wed Sep 20 00:22:09 CEST 2017


Revision: 45346
          http://tug.org/svn/texlive?view=revision&revision=45346
Author:   karl
Date:     2017-09-20 00:22:09 +0200 (Wed, 20 Sep 2017)
Log Message:
-----------
pstricks-add (18sep17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/pstricks-add/Changes
    trunk/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf
    trunk/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex
    trunk/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex

Modified: trunk/Master/texmf-dist/doc/generic/pstricks-add/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pstricks-add/Changes	2017-09-19 22:08:09 UTC (rev 45345)
+++ trunk/Master/texmf-dist/doc/generic/pstricks-add/Changes	2017-09-19 22:22:09 UTC (rev 45346)
@@ -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.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.

Modified: trunk/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex	2017-09-19 22:08:09 UTC (rev 45345)
+++ trunk/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex	2017-09-19 22:22:09 UTC (rev 45346)
@@ -1027,11 +1027,16 @@
 
 \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 @@
 \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}}

Modified: trunk/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex	2017-09-19 22:08:09 UTC (rev 45345)
+++ trunk/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex	2017-09-19 22:22:09 UTC (rev 45346)
@@ -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 @@
   \ignorespaces
 }
 %
+\define at key[psset]{pstricks-add}{fillcolorA}[blue]{\pst at getcolor{#1}\psk at fillcolorA}
+\define at key[psset]{pstricks-add}{fillcolorB}[red]{\pst at getcolor{#1}\psk at fillcolorB}
+\define at boolkey[psset]{pstricks-add}[Pst@]{countDots}[true]{}
+\psset[pstricks-add]{countDots=false,fillcolorA=blue,fillcolorB=red}
+%
+\def\psRandomPointArea{\pst at object{psRandomPointArea}}
+\def\psRandomPointArea at i#1#2{%
+  \pst at killglue
+  \addbefore at par{radius=2pt,fillcolorA=blue,fillcolorB=red}%
+  \begin at SpecialObj
+  \pssetlength\pst at dimc{\psk at radius}
+  \addto at pscode{
+    realtime srand Rand pop
+    4 dict begin
+    /Func \ifPst at algebraic (#2) tx at 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 at ScreenCoor \pst at number\pst at dimc 0 360 arc 
+      y f lt { \pst at usecolor\psk at fillcolorA }{ \pst at usecolor\psk at fillcolorB } ifelse 
+      fill grestore
+      \ifPst at countDots
+        x y \tx at ScreenCoor moveto i 4 string cvs 
+        \ifpst at psfonts /Helvetica \else /NimbusSanL-Regu \fi 
+          findfont 5 scalefont setfont show
+      \fi
+    } for  
+    end
+  }%
+  \end at SpecialObj
+  \ignorespaces
+}
+
+%
 \def\psComment{\def\pst at par{}\pst at object{psComment}}
 \def\psComment at i{\pst at getarrows\psComment at ii}
 \def\psComment at ii(#1)(#2)#3{\@ifnextchar[



More information about the tex-live-commits mailing list