texlive[49223] Master/texmf-dist: pst-moire (22nov18)

commits+karl at tug.org commits+karl at tug.org
Thu Nov 22 22:48:30 CET 2018


Revision: 49223
          http://tug.org/svn/texlive?view=revision&revision=49223
Author:   karl
Date:     2018-11-22 22:48:30 +0100 (Thu, 22 Nov 2018)
Log Message:
-----------
pst-moire (22nov18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/pst-moire/README.md
    trunk/Master/texmf-dist/doc/generic/pst-moire/pst-moire-doc.pdf
    trunk/Master/texmf-dist/doc/generic/pst-moire/pst-moire-doc.tex
    trunk/Master/texmf-dist/tex/generic/pst-moire/pst-moire.tex
    trunk/Master/texmf-dist/tex/latex/pst-moire/pst-moire.sty

Modified: trunk/Master/texmf-dist/doc/generic/pst-moire/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-moire/README.md	2018-11-22 21:48:15 UTC (rev 49222)
+++ trunk/Master/texmf-dist/doc/generic/pst-moire/README.md	2018-11-22 21:48:30 UTC (rev 49223)
@@ -1,6 +1,6 @@
 # **README** #
-# pst-moire v. 2.0 #
-# 2018/11/16 #
+# pst-moire v. 2.1 #
+# 2018/11/22 #
 
     Source:      pst-moire.tex, pst-moire.sty, pst-moire.pro
     Authors:     Jürgen Gilg, Manuel Luque, Jean-Michel Sarlat
@@ -65,5 +65,9 @@
 Adding a new section: **Glass-patterns**
 
 Adding a new command **\\psGlassPattern**
+
+# **CHANGES COMPARED TO VERSION 2.0** #
+
+Adding a new command **\\psRandomDotPatterns**
  
 

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

Modified: trunk/Master/texmf-dist/doc/generic/pst-moire/pst-moire-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-moire/pst-moire-doc.tex	2018-11-22 21:48:15 UTC (rev 49222)
+++ trunk/Master/texmf-dist/doc/generic/pst-moire/pst-moire-doc.tex	2018-11-22 21:48:30 UTC (rev 49223)
@@ -50,6 +50,7 @@
 \usepackage{pstricks,pst-moire,pst-plot,pst-func,pst-lens,pstricks-add}
 \usepackage{amsmath,amssymb,animate}
 
+
 \definecolor{moire1}{rgb}{0.98,0.89,0.56}
 \definecolor{moire2}{rgb}{0.357,0.525,0.13}
 \definecolor{moire3}{rgb}{0.2,0.05,0.015}
@@ -84,9 +85,12 @@
 \pstheader{pst-cosine.pro}
 \addtomoirelisttype{cosine}
 
+
+
+
 \begin{document}
 
-\title{pst-moire v. 2.0}
+\title{pst-moire v. 2.1}
 \subtitle{A PSTricks package to draw moiré patterns}
 \author{%
     Jürgen \textsc{Gilg}\\
@@ -1207,101 +1211,111 @@
 
 \section{Random moirés}
 
-\subsection{The command \Lcs{psRandom} (from \texttt{pstricks-add})}
+\begin{figure}[h]
+  \caption{Circular: a=1, b=1 $\theta=5$}
+  \centering
+\begin{pspicture}(-5.5,-5.5)(5.5,5.5)
+\psRandomDotPatterns[coefficients=1 1 5,linecolor=red,fillcolor=blue]
+\end{pspicture}
+\label{circular}
+\end{figure}
+\begin{quote}\itshape
+``The moiré patterns are formed from the superimposition of two random dot patterns: an original and a second pattern generated following a linear or nonlinear transformation of the original. Though each set is random, a variety of different spatial patterns such as circles, spirals, hyperbolae, can be generated by introducing correlations between the two sets of dots. In this image~\ref{circular}, for each dot there is a corresponding ``partner'' dot that lies along the circumference of a circle centered at the point of rotation of the two images. The visual system is able to decode these correlations, thereby perceiving the underlying global transformation.''
+\end{quote}
+\begin{center}
+\url{http://www.scholarpedia.org/article/Glass_patterns}
+\end{center}
+The article mentioned above contains a history of the physiological interpretations of the perception of moiré patterns and we reproduced the beginning of the paragraph.
 
-See the impressing examples of Emin Gabrielyan:
+The authors Leon Glass and Matthew A. Smith propose the following transformations:
+\begin{align*}
+x'&= ax \cos \theta - by\sin \theta\\
+y'&= ax \sin \theta + by\cos \theta
+\end{align*}
+which give the following Eigenvalues:
+\begin{equation*}
+\lambda_\pm = \frac{(a+b)\cos\theta\pm\sqrt{(a-b)^2-(a+b)^2 \sin^2\theta}}{2}
+\end{equation*}
+Another article of Leon Glass:
 \begin{center}
-\url{https://docs.switzernet.com/people/emin-gabrielyan/070212-random-moire}
+\url{http://www.medicine.mcgill.ca/physio/glasslab/pub_pdf/dots_mi_2002.pdf}
 \end{center}
-Here we present his first example the PSTricks way and some other random moirés as well---the package \texttt{pstricks-add} is required however:
+We added the terms $(x_0,y_0)$ to be able to also illustrate translations:
+\begin{align*}
+x' &= ax \cos \theta - by\sin \theta +x_0 \\
+y' &= ax \sin \theta + by\cos \theta +y_0
+\end{align*}
+$\theta$ is the angle of rotation between the two layers. The values of $a$ and $b$ are scaling factors respectively for $x$ and $y$.
 
-\bigskip
 
-\textbf{Example 1: Concentric circles}
+\subsection{The command \Lcs{psRandomDotPatterns}}
 
+\begin{BDef}
+\Lcs{psRandomDotPatterns}\OptArgs
+\end{BDef}
+
+The command \Lcs{psRandomDotPatterns} contains the options \nxLkeyword{NumberDots=}, \nxLkeyword{coefficients=}, \nxLkeyword{srand=}, \nxLkeyword{layer=} and \nxLkeyword{revlayer=}.
+
+\medskip
+
+\begin{quote}
+\begin{tabularx}{\linewidth}{ @{} l >{\ttfamily}l X @{} }\toprule
+\textbf{Name}      & \textbf{Default} & \textbf{Meaning}\\\midrule
+\Lkeyword{NumberDots}    & 2000  & Number of randomly arranged dots.\\
+%%
+\Lkeyword{coefficients}  & 1.05 1.05 0 0 0  & $a$  $b$ $\theta$ $x_0$ $y_0$. If the two last values are omitted (they are responsible for an eventual translation), they are automatically set to 0.\\
+%%
+\Lkeyword{srand}      & 10        & Random seed of PostScipt for the randomly arranged dots.\\
+%%
+\Lkeyword{layer}      & true      & If set to \texttt{false}, the first layer is hidden.\\
+%%
+\Lkeyword{revlayer}   & true      & If set to \texttt{false}, the second layer is hidden.\\
+\bottomrule
+\end{tabularx}
+\end{quote}
+
+\textbf{Note:} We can draw superposed layers within a given square of 10 cm length. We can scale the image with the PSTricks key \verb+unit=+.
+
+The radius of the dots is random, it is between 0 and 2 pt. The color of the points of the first layer is fixed with the PSTricks key \verb+linecolor=+ and the color of the second layer with the PSTricks key \verb+fillcolor=+.
+
+
+\newpage
+
+
+\textbf{Example 1: Translation} ($a=1$, $b=1$, $\theta=0$, $x_0=5$, $y_0=5$)
+
 \begin{minipage}[t]{9cm}\kern0pt
 \begin{pspicture}(-4.5,-4.5)(4.5,4.5)
-\def\myWidth{1pt}
-\def\myPattern{%
-\psRandom[%
-randInit=42,
-dotstyle=o,
-fillstyle=solid,
-fillcolor=red,
-linecolor=red,
-randomPoints=4200,
-dotsize=\myWidth
-](-4,-4)(4,4){\psframe(-4,-4)(4,4)}
-}
-\rput{0}(0,0){\myPattern}
-\rput{4}(0,0){\myPattern}
+\psRandomDotPatterns[coefficients=1 1 0 5 5,unit=0.9]
 \end{pspicture}
 \end{minipage}
 \hfill
 \begin{minipage}[t]{7.5cm}\kern0pt
 {\small\begin{verbatim}
-\begin{pspicture}(-4.5,-4.5)(4.5,4.5)
-\def\myWidth{1pt}
-\psRandom[%
-randInit=42,
-dotstyle=o,
-fillstyle=solid,
-fillcolor=red,
-linecolor=red,
-randomPoints=4200,
-dotsize=\myWidth
-](-4,-4)(4,4){\psframe(-4,-4)(4,4)}
-}
-\rput{0}(0,0){\myPattern}
-\rput{4}(0,0){\myPattern}
+\begin{pspicture}(-5.5,-5.5)(5.5,5.5)
+\psRandomDotPatterns[%
+coefficients=1 1 0 5 5
+]
 \end{pspicture}
 \end{verbatim}}
 \end{minipage}
 
 \bigskip
+\bigskip
 
-\textbf{Example 2: Spiral}
+\textbf{Example 2: Radial} ($a=1.05$, $b=1.05$, $\theta=0$)
 
 \begin{minipage}[t]{9cm}\kern0pt
 \begin{pspicture}(-4.5,-4.5)(4.5,4.5)
-\def\myWidth{1pt}
-\def\myPattern{%
-\psRandom[%
-randInit=42,
-dotstyle=o,
-fillstyle=solid,
-fillcolor=blue,
-linecolor=blue,
-randomPoints=4200,
-dotsize=\myWidth
-](-4,-4)(4,4){\psframe(-4,-4)(4,4)}
-}
-\rput{0}(0,0){\myPattern}
-\rput{4}(0,0){\psset{xunit=1.05,yunit=1.05}\myPattern}
+  \psRandomDotPatterns[unit=0.9]
 \end{pspicture}
 \end{minipage}
 \hfill
 \begin{minipage}[t]{7.5cm}\kern0pt
 {\small\begin{verbatim}
-\begin{pspicture}(-4.5,-4.5)(4.5,4.5)
-\def\myWidth{1pt}
-\def\myPattern{%
-\psRandom[%
-randInit=42,
-dotstyle=o,
-fillstyle=solid,
-fillcolor=blue,
-linecolor=blue,
-randomPoints=4200,
-dotsize=\myWidth
-](-4,-4)(4,4){\psframe(-4,-4)(4,4)}
-}
-\rput{0}(0,0){\myPattern}
-\rput{4}(0,0){%
-\psset{xunit=1.05,yunit=1.05}
-\myPattern}
-\end{pspicture
-}
+\begin{pspicture}(-5.5,-5.5)(5.5,5.5)
+  \psRandomDotPatterns
+\end{pspicture}
 \end{verbatim}}
 \end{minipage}
 
@@ -1309,109 +1323,147 @@
 \newpage
 
 
-\textbf{Example 3: Radial}
+\textbf{Example 3: Elliptic} ($a=1.05$, $b=0.95$, $\theta=5$)
 
 \begin{minipage}[t]{9cm}\kern0pt
 \begin{pspicture}(-4.5,-4.5)(4.5,4.5)
-\def\myWidth{1pt}
-\def\myPattern{%
-\psRandom[%
-randInit=42,
-dotstyle=o,
-fillstyle=solid,
-fillcolor=green,
-linecolor=green,
-randomPoints=4200,
-dotsize=\myWidth
-](-4,-4)(4,4){\psframe(-4,-4)(4,4)}
-}
-\rput{0}(0,0){\myPattern}
-\rput{0}(0,0){\psset{xunit=1.05,yunit=1.05}\myPattern}
+\psRandomDotPatterns[coefficients=1.05 0.95 5,unit=0.9]
 \end{pspicture}
 \end{minipage}
 \hfill
 \begin{minipage}[t]{7.5cm}\kern0pt
 {\small\begin{verbatim}
-\begin{pspicture}(-4.5,-4.5)(4.5,4.5)
-\def\myWidth{1pt}
-\def\myPattern{%
-\psRandom[%
-randInit=42,
-dotstyle=o,
-fillstyle=solid,
-fillcolor=green,
-linecolor=green,
-randomPoints=4200,
-dotsize=\myWidth
-](-4,-4)(4,4){\psframe(-4,-4)(4,4)}
-}
-\rput{0}(0,0){\myPattern}
-\rput{0}(0,0){%
-\psset{xunit=1.05,yunit=1.05}
-\myPattern
-}
+\begin{pspicture}(-5.5,-5.5)(5.5,5.5)
+\psRandomDotPatterns[coefficients=1.05 0.95 5]
 \end{pspicture}
 \end{verbatim}}
 \end{minipage}
 
 \bigskip
+\bigskip
 
-\textbf{Example 4: Hyperbolic}
+\textbf{Example 4: Spiral} ($a=1$, $b=1.05$, $\theta=5$)
 
 \begin{minipage}[t]{9cm}\kern0pt
 \begin{pspicture}(-4.5,-4.5)(4.5,4.5)
-\def\myWidth{1pt}
-\def\myPattern{%
-\psRandom[%
-randInit=42,
-dotstyle=o,
-fillstyle=solid,
-fillcolor=brown,
-linecolor=brown,
-randomPoints=4200,
-dotsize=\myWidth
-](-4,-4)(4,4){\psframe(-4,-4)(4,4)}
-}
-\rput{0}(0,0){\psset{xunit=0.95,yunit=1.05}\myPattern}
-\rput{0}(0,0){\myPattern}
+\psframe*(-4.5,-4.5)(4.5,4.5)
+\psRandomDotPatterns[coefficients=1 1.05 5,linecolor=white,fillcolor=white,unit=0.9]
 \end{pspicture}
 \end{minipage}
 \hfill
 \begin{minipage}[t]{7.5cm}\kern0pt
 {\small\begin{verbatim}
+\begin{pspicture}(-5.5,-5.5)(5.5,5.5)
+\psframe*(-5.5,-5.5)(5.5,5.5)
+\psRandomDotPatterns[%
+coefficients=1 1.05 5,
+linecolor=white,
+fillcolor=white
+]
+\end{pspicture}
+\end{verbatim}}
+\end{minipage}
+
+
+\newpage
+
+
+\textbf{Example 5: Hyperbolic} ($a=0.95$, $b=1.05$, $\theta=0$)
+
+\begin{minipage}[t]{9cm}\kern0pt
 \begin{pspicture}(-4.5,-4.5)(4.5,4.5)
-\def\myWidth{1pt}
-\def\myPattern{%
-\psRandom[%
-randInit=42,
-dotstyle=o,
-fillstyle=solid,
-fillcolor=brwon,
-linecolor=brown,
-randomPoints=4200,
-dotsize=\myWidth
-](-4,-4)(4,4){\psframe(-4,-4)(4,4)}
-}
-\rput{0}(0,0){%
-\psset{xunit=0.95,yunit=1.05}
-\myPattern
-}
-\rput{0}(0,0){\myPattern}
+\psRandomDotPatterns[coefficients=0.95 1.05 0,unit=0.9]
 \end{pspicture}
+\end{minipage}
+\hfill
+\begin{minipage}[t]{7.5cm}\kern0pt
+{\small\begin{verbatim}
+\begin{pspicture}(-5.5,-5.5)(5.5,5.5)
+\psRandomDotPatterns[coefficients=0.95 1.05 0]
+\end{pspicture}
 \end{verbatim}}
 \end{minipage}
 
-\bigskip
 
-\textbf{Remark:} For some more explanations of the so-called \emph{Glass patterns}, see:
-\begin{center}
-\url{http://www.scholarpedia.org/article/Glass_patterns}
-\end{center}
+\subsubsection{The keys \texttt{layer} and \texttt{revlayer}}
 
+\begin{minipage}[t]{0.45\linewidth}\kern0pt
+\begin{pspicture}(-3.5,-4.5)(3.5,3.5)
+\psframe*[linecolor=yellow](-3.5,-3.5)(3.5,3.5)
+\psRandomDotPatterns[%
+unit=0.7,
+revlayer=false,
+coefficients=1 1.05 5,
+linecolor=red]
+\rput(0,-4){coefficients=1 1.05 5, \textbf{revlayer=false}}
+\end{pspicture}
+{\footnotesize\begin{verbatim}
+\begin{pspicture}(-3.5,-4.5)(3.5,3.5)
+\psframe*[linecolor=yellow](-3.5,-3.5)(3.5,3.5)
+\psRandomDotPatterns[%
+unit=0.7,
+revlayer=false,
+coefficients=1 1.05 5,
+linecolor=red]
+\rput(0,-4){%
+coefficients=1 1.05 5, 
+\textbf{revlayer=false}}
+\end{pspicture}
+\end{verbatim}}
+\end{minipage}
+\hfill
+\begin{minipage}[t]{0.45\linewidth}\kern0pt
+\begin{pspicture}(-3.5,-4.5)(3.5,3.5)
+\psframe*[linecolor=yellow](-3.5,-3.5)(3.5,3.5)
+\psRandomDotPatterns[%
+unit=0.7,
+layer=false,
+coefficients=1 1.05 5,
+fillcolor=red]
+\rput(0,-4){coefficients=1 1.05 5, \textbf{layer=false}}
+\end{pspicture}
+{\footnotesize\begin{verbatim}
+\begin{pspicture}(-3.5,-4.5)(3.5,3.5)
+\psframe*[linecolor=yellow](-3.5,-3.5)(3.5,3.5)
+\psRandomDotPatterns[%
+unit=0.7,
+layer=false,
+coefficients=1 1.05 5,
+fillcolor=red]
+\rput(0,-4){%
+coefficients=1 1.05 5, 
+\textbf{layer=false}}
+\end{pspicture}
+\end{verbatim}}
+\end{minipage}
 
+
 \newpage
 
 
+Both layers superposed.
+
+\begin{pspicture}(-5.5,-7)(5.5,6)
+\psframe*[linecolor=yellow](-5.5,-5.5)(5.5,5.5)
+\psRandomDotPatterns[linecolor=red,fillcolor=red,coefficients=1 1.05 5]
+\rput(0,-5.75){coefficients=1 1.05 5}
+\end{pspicture}
+{\small\begin{verbatim}
+\begin{pspicture}(-5.5,-5.5)(5.5,6)
+\psframe*[linecolor=yellow](-5.5,-5.5)(5.5,5.5)
+\psRandomDotPatterns[%
+coefficients=1 1.05 5
+linecolor=red,
+fillcolor=red]
+\rput(0,-6){coefficients=1 1.05 5}
+\end{pspicture}
+\end{verbatim}
+
+
+
+\newpage
+
+
 \subsection{The command \Lcs{psRandomDot}}
 
 Emin Gabrielyan presents on
@@ -1568,7 +1620,7 @@
 \Lcs{psGlassPattern}\OptArgs
 \end{BDef}
 
-The command \Lcs{psGlassPattern} contains the options \nxLkeyword{function=} and \nxLkeyword{layer=true/false}.
+The command \Lcs{psGlassPattern} contains the options \nxLkeyword{function=} and \nxLkeyword{layers=true/false}.
 
 \medskip
 
@@ -1580,7 +1632,7 @@
                        && \texttt{r} and \texttt{t} are the variables of the function in polar coordinates\\
                        && \verb-r=sqrt(x^2+y^2)-, \verb+t=theta+\\
 %%
-\Lkeyword{layer}    & true  & Both layers are shown. If set to \texttt{false}, only the layer with the hidden shape of the function is shown.\\
+\Lkeyword{layers}    & true  & Both layers are shown. If set to \texttt{false}, only the revealing layer with the hidden shape of the function is shown.\\
 \bottomrule
 \end{tabularx}
 \end{quote}
@@ -1598,7 +1650,7 @@
     \texttt{r=z/(1-0.5*cos(theta))}
 
     The equation of a function can either be entered with RVN (Reverse Polish Notation = PostScript notation) or when the PSTricks key \texttt{algebraic=true} is set, it is possible to enter the equation in algebraic notation (therefore we need to transform the variable \texttt{t} from degrees into radians which can be done with the substitution \texttt{t -> t*Pi/180}.
-\item If the key \texttt{layer=false} is set to false, only the layer with the hidden shape of the function is shown.
+\item If the key \texttt{layers=false} is set to false, only the layer with the hidden shape of the function is shown.
 \item The colors of the randomly arranged dots can be chosen with the PSTricks keys \texttt{linecolor=} (for the first layer) and \texttt{fillcolor=} (for the second layer).
 \item The size and shape of the dots can be setup with the PSTricks keys \texttt{dotsize=} and \texttt{dotstyle=}.
 \end{itemize}

Modified: trunk/Master/texmf-dist/tex/generic/pst-moire/pst-moire.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pst-moire/pst-moire.tex	2018-11-22 21:48:15 UTC (rev 49222)
+++ trunk/Master/texmf-dist/tex/generic/pst-moire/pst-moire.tex	2018-11-22 21:48:30 UTC (rev 49223)
@@ -20,8 +20,8 @@
 %%   `pst-moire' is a PSTricks package to draw moire patterns        %%
 %%                                                                   %%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\fileversion{2.0}%
-\def\filedate{2018/11/16}%
+\def\fileversion{2.1}%
+\def\filedate{2018/11/22}%
 \message{`PST-MOIRE v\fileversion, \filedate\space (ML)}%
 \csname PSTMoireLoaded\endcsname
 % Requires PSTricks, pst-xkey and pst-node packages
@@ -53,7 +53,7 @@
 \define at key[psset]{pst-moire}{hole}{\def\pst at moirage@hole{#1}}
 %
 \psset[pst-moire]{Rmax=6,scale=1,Alpha=70,rotate=0,E=0.25,n=30,T=2}
-\psset[pst-moire]{r=0.5,p=4,k=0.2,symbole=2,rotate=-1,PSfont=Helvetica-Bold,fontsize=4.7,vadjust=-1.5,hadjust=0,hole=round}
+\psset[pst-moire]{r=0.5,p=4,k=0.2,symbole=2,rotate=0,PSfont=Helvetica-Bold,fontsize=4.7,vadjust=-1.5,hadjust=0,hole=round}
 %
 \def\variablesMoirages{%
  /R \psk at moire@R\space def
@@ -345,6 +345,66 @@
  }% fin du code ps
  \end at SpecialObj
  }% % fin de la commande PSTricks
+%
+\define at key[psset]{pst-moire}{NumberDots}{\edef\psk at moire@NumberDots{#1 }} %  Number of dots
+\define at key[psset]{pst-moire}{coefficients}{\edef\psk at moire@coefficients{#1 }} % [a b theta tx ty]
+\define at key[psset]{pst-moire}{srand}{\edef\psk at moire@srand{#1 }} % graine al\xE9atoire pour postscript
+\define at boolkey[psset]{pst-moire}[Pst at moire@]{revlayer}[true]{}
+\define at boolkey[psset]{pst-moire}[Pst at moire@]{layer}[true]{}
+% Default values
+\psset{NumberDots=2000,coefficients=1.05 1.05 0 0 0,revlayer=true,layer=true,srand=10}
+%
+\def\psRandomDotPatterns{\def\pst at par{}\pst at object{psRandomDotPatterns}}
+\def\psRandomDotPatterns at i{%
+\addbefore at par{dotsize=2pt,fillcolor=black}
+\begin at SpecialObj
+\addto at pscode{%
+  /N_ \psk at moire@NumberDots def
+  \psk at dotsize
+  \@nameuse{psds@\psk at dotstyle}
+  /dotcolor {\pst at usecolor\pslinecolor } def
+  /dotcolor2  {\pst at usecolor\psfillcolor} def
+  /DOT {r 0 360 arc fill} def
+\ifPst at moire@revlayer /revealinglayer true def \else /revealinglayer false def \fi
+\ifPst at moire@layer /layer true def \else /layer false def \fi
+/cm {\pst at number\psunit mul} bind def
+/xmax 5 cm round cvi def
+/ymax xmax def
+/GlassPattern {
+7 dict begin
+/ty exch def
+/tx exch def
+/t exch def % theta degrees
+/b exch def
+/a exch def
+layer {
+\psk at moire@srand srand
+N_ {
+    /x rand 2 xmax mul mod xmax sub def % -xmax<x<xmax
+    /y rand 2 ymax mul mod ymax sub def % -ymax<y<ymax
+    /r rand 2147483647 div 2 mul def
+ dotcolor x y DOT
+   } repeat
+ } if
+% transformation
+a b scale t rotate tx ty translate
+\psk at moire@srand srand
+revealinglayer {
+N_{
+    /x rand 2 xmax mul mod xmax sub def % -xmax<x<xmax
+    /y rand 2 ymax mul mod ymax sub def % -ymax<y<ymax
+    /r rand 2147483647 div 2 mul def
+ dotcolor2 x y DOT
+    } repeat
+ } if
+grestore
+end
+ } def
+[\psk at moire@coefficients] length 3 eq {\psk at moire@coefficients 0 0} {\psk at moire@coefficients} ifelse
+GlassPattern
+ }% fin du code ps
+ \end at SpecialObj
+ }% % fin de la commande PSTricks
  \catcode`\@=\PstAtCode\relax
 %% END: pst-moire.tex
 \endinput

Modified: trunk/Master/texmf-dist/tex/latex/pst-moire/pst-moire.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pst-moire/pst-moire.sty	2018-11-22 21:48:15 UTC (rev 49222)
+++ trunk/Master/texmf-dist/tex/latex/pst-moire/pst-moire.sty	2018-11-22 21:48:30 UTC (rev 49223)
@@ -21,7 +21,7 @@
 %%                                                                   %%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \RequirePackage{pstricks}
-\ProvidesPackage{pst-moire}[2018/11/16 package wrapper for
+\ProvidesPackage{pst-moire}[2018/11/22 package wrapper for
   pst-moire]
 \input{pst-moire.tex}
 \ProvidesFile{pst-moire.tex}
@@ -28,6 +28,6 @@
   [\filedate\space v\fileversion\space `PST-moire']
 \IfFileExists{pst-moire.pro}{%
    \ProvidesFile{pst-moire.pro}
-     [2018/11/16 v. 2.0,  PostScript prologue file]
+     [2018/11/22 v. 2.1,  PostScript prologue file]
      \@addtofilelist{pst-moire.pro}}{}%
 \endinput



More information about the tex-live-commits mailing list