summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
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/tex
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/tex')
-rw-r--r--Master/texmf-dist/tex/generic/pst-moire/pst-moire.tex66
-rw-r--r--Master/texmf-dist/tex/latex/pst-moire/pst-moire.sty4
2 files changed, 65 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-moire/pst-moire.tex b/Master/texmf-dist/tex/generic/pst-moire/pst-moire.tex
index 0962bd35cf2..4bf117ec4df 100644
--- a/Master/texmf-dist/tex/generic/pst-moire/pst-moire.tex
+++ b/Master/texmf-dist/tex/generic/pst-moire/pst-moire.tex
@@ -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@key[psset]{pst-moire}{hole}{\def\pst@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@moire@R\space def
@@ -345,6 +345,66 @@ star-shapped
}% fin du code ps
\end@SpecialObj
}% % fin de la commande PSTricks
+%
+\define@key[psset]{pst-moire}{NumberDots}{\edef\psk@moire@NumberDots{#1 }} % Number of dots
+\define@key[psset]{pst-moire}{coefficients}{\edef\psk@moire@coefficients{#1 }} % [a b theta tx ty]
+\define@key[psset]{pst-moire}{srand}{\edef\psk@moire@srand{#1 }} % graine aléatoire pour postscript
+\define@boolkey[psset]{pst-moire}[Pst@moire@]{revlayer}[true]{}
+\define@boolkey[psset]{pst-moire}[Pst@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@par{}\pst@object{psRandomDotPatterns}}
+\def\psRandomDotPatterns@i{%
+\addbefore@par{dotsize=2pt,fillcolor=black}
+\begin@SpecialObj
+\addto@pscode{%
+ /N_ \psk@moire@NumberDots def
+ \psk@dotsize
+ \@nameuse{psds@\psk@dotstyle}
+ /dotcolor {\pst@usecolor\pslinecolor } def
+ /dotcolor2 {\pst@usecolor\psfillcolor} def
+ /DOT {r 0 360 arc fill} def
+\ifPst@moire@revlayer /revealinglayer true def \else /revealinglayer false def \fi
+\ifPst@moire@layer /layer true def \else /layer false def \fi
+/cm {\pst@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@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@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@moire@coefficients] length 3 eq {\psk@moire@coefficients 0 0} {\psk@moire@coefficients} ifelse
+GlassPattern
+ }% fin du code ps
+ \end@SpecialObj
+ }% % fin de la commande PSTricks
\catcode`\@=\PstAtCode\relax
%% END: pst-moire.tex
\endinput
diff --git a/Master/texmf-dist/tex/latex/pst-moire/pst-moire.sty b/Master/texmf-dist/tex/latex/pst-moire/pst-moire.sty
index 9903bd70c23..f9cd5921c0d 100644
--- a/Master/texmf-dist/tex/latex/pst-moire/pst-moire.sty
+++ b/Master/texmf-dist/tex/latex/pst-moire/pst-moire.sty
@@ -21,13 +21,13 @@
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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}
[\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