summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-moire
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-11-22 21:48:30 +0000
committerKarl Berry <karl@freefriends.org>2018-11-22 21:48:30 +0000
commit390dbd0215f42f93d33b64df4798cef76f1ca336 (patch)
tree249a4567c005e94f446f701634f56c78ec88dbc8 /Master/texmf-dist/doc/generic/pst-moire
parentb5cc1664be99937d3d19c0f690271e201eae7779 (diff)
pst-moire (22nov18)
git-svn-id: svn://tug.org/texlive/trunk@49223 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/pst-moire')
-rw-r--r--Master/texmf-dist/doc/generic/pst-moire/README.md8
-rw-r--r--Master/texmf-dist/doc/generic/pst-moire/pst-moire-doc.pdfbin4864569 -> 6747848 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-moire/pst-moire-doc.tex336
3 files changed, 200 insertions, 144 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-moire/README.md b/Master/texmf-dist/doc/generic/pst-moire/README.md
index 41dfff0e5c6..a80a2464221 100644
--- a/Master/texmf-dist/doc/generic/pst-moire/README.md
+++ b/Master/texmf-dist/doc/generic/pst-moire/README.md
@@ -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 command **\\psRandomDot**
Adding a new section: **Glass-patterns**
Adding a new command **\\psGlassPattern**
+
+# **CHANGES COMPARED TO VERSION 2.0** #
+
+Adding a new command **\\psRandomDotPatterns**
diff --git a/Master/texmf-dist/doc/generic/pst-moire/pst-moire-doc.pdf b/Master/texmf-dist/doc/generic/pst-moire/pst-moire-doc.pdf
index b3b31618533..2e9cd75c9d2 100644
--- a/Master/texmf-dist/doc/generic/pst-moire/pst-moire-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pst-moire/pst-moire-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-moire/pst-moire-doc.tex b/Master/texmf-dist/doc/generic/pst-moire/pst-moire-doc.tex
index 40601c8e130..49f807f5e46 100644
--- a/Master/texmf-dist/doc/generic/pst-moire/pst-moire-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-moire/pst-moire-doc.tex
@@ -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 @@ These following rotating moirés were obtained with the use of the \texttt{pst-l
\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,104 +1323,142 @@ dotsize=\myWidth
\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
@@ -1568,7 +1620,7 @@ These patterns received their names from Leon Glass.
\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 @@ The command \Lcs{psGlassPattern} contains the options \nxLkeyword{function=} and
&& \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 @@ The command \Lcs{psGlassPattern} contains the options \nxLkeyword{function=} and
\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}