summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-10-28 21:07:41 +0000
committerKarl Berry <karl@freefriends.org>2018-10-28 21:07:41 +0000
commitbc9c08f557acfd4ea175640b453d93e803b6c73e (patch)
tree50722f01df24b0ffa1372662d26c9f39a379a54f /Master/texmf-dist/tex
parentbf3f53c013740ce1d4544104167f312ec3ea11d9 (diff)
pst-moire (28oct18)
git-svn-id: svn://tug.org/texlive/trunk@49014 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/generic/pst-moire/pst-moire.tex111
-rw-r--r--Master/texmf-dist/tex/latex/pst-moire/pst-moire.sty33
2 files changed, 144 insertions, 0 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
new file mode 100644
index 00000000000..452f616976e
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pst-moire/pst-moire.tex
@@ -0,0 +1,111 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% %%
+%% This is file `pst-moire.tex' %%
+%% %%
+%% IMPORTANT NOTICE: %%
+%% %%
+%% Package `pst-moire' %%
+%% %%
+%% Jürgen Gilg, Manuel Luque, Jean-Michel Sarlat %%
+%% %%
+%% Copyright (C) 2018 %%
+%% %%
+%% This program can redistributed and/or modified under %%
+%% the terms of the LaTeX Project Public License %%
+%% Distributed from CTAN archives in directory %%
+%% macros/latex/base/lppl.txt; either version 1.3c of %%
+%% the License, or (at your option) any later version. %%
+%% %%
+%% DESCRIPTION: %%
+%% `pst-moire' is a PSTricks package to draw moire patterns %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\fileversion{1.0}%
+\def\filedate{2018/10/28}%
+\message{`PST-MOIRE v\fileversion, \filedate\space (ML)}%
+\csname PSTMoireLoaded\endcsname
+% Requires PSTricks, pst-xkey and pst-node packages
+\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi
+\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi
+\ifx\MultidoLoaded\endinput\else\input multido.tex \fi
+%
+\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
+%
+\pstheader{pst-moire.pro}
+%
+\pst@addfams{pst-moire}
+\define@key[psset]{pst-moire}{Rmax}{\edef\psk@moirage@R{#1}} % en cm
+\define@key[psset]{pst-moire}{scale}{\edef\psk@moirage@scale{#1}} % echelle
+\define@key[psset]{pst-moire}{Alpha}{\edef\psk@moirage@Alpha{#1}} % pente des traits pour Gauss en degrés
+\define@key[psset]{pst-moire}{rotate}{\edef\psk@moirage@rot{#1 }} % rotation de la grille
+\define@key[psset]{pst-moire}{E}{\edef\psk@moirage@E{#1 }} % espacement entre 2 traits de Gauss
+%
+\psset{Rmax=6,scale=1,Alpha=70,rotate=0,E=0.25}
+%
+\def\variablesMoirages{%
+ /R \psk@moirage@R\space def
+ /reduction {\psk@moirage@scale\space mul} def
+ /unit {\pst@number\psunit mul reduction} def
+ /moire {\psk@moire@type} def
+ /rot \psk@moirage@rot def
+ /Runit R unit def
+ /E1 \psk@moirage@E def
+ /circle { newpath 0 0 radius 0 360 arc closepath} def
+ /NombreTraits Runit \pst@number\psrunit div 10 mul cvi def
+ /NombreTraitsLinear Runit 2.845 div cvi def
+ /reduc \psk@moirage@scale\space def
+ /Alpha \psk@moirage@Alpha\space def
+ /m Alpha dup sin exch cos div def % tan(Alpha)
+ /linecolor {\pst@usecolor\pslinecolor} def
+ /linewidth {\pst@number\pslinewidth SLW} def
+ /mm {\pst@number\psunit 10 div} bind def % le millimetre
+ /DotSize {\psk@dotsize} def
+ /DotStyle {\@nameuse{psds@\psk@dotstyle}} def
+ }
+%% Reservation des noms de macros
+% adaptation de la macro de pst-solides3d
+% #1=type de reservation associee a une liste qui
+% doit forcement etre du type pst@moire@list@#1
+\def\pst@moire@reservednames#1{%
+\edef\@tempa{\csname pst@moire@list@#1\endcsname}
+\@for \name:=\@tempa\do{%
+ \expandafter\def\csname pst@moire@#1@\name\endcsname{}%
+}}
+% nature de l'anamorphose
+\def\pst@moire@list@type{%
+ circle,Fresnel,radial,square,Gauss,Newton,Bouasse,linear,dot,chess}
+%
+%% Reservation de macros correspondants aux types
+\pst@moire@reservednames{type}
+\define@key[psset]{pst-moire}{type}{%
+ \ifcsname pst@moire@type@#1\endcsname
+ \def\psk@moire@type{pst-#1}%
+ \else
+ \@pstrickserr{The moire #1 is not defined, the moire by default is
+ drawn}{}%
+ \fi}
+% anamorphose par defaut
+\psset[pst-moire]{type=Fresnel}%
+%
+\def\psmoire{\def\pst@par{}\pst@object{psmoire}}
+\def\psmoire@i{\@ifnextchar({\psmoire@do}{\psmoire@do(0,0)}}
+\def\psmoire@do(#1){%
+\begingroup%
+\use@par%
+ \begin@SpecialObj%
+ \pst@@getcoor{#1}%
+ \addto@pscode{
+ moireDict begin
+ \variablesMoirages
+ \pst@coor translate
+ rot rotate
+ \psk@moire@type\space
+ end
+ }%
+ \end@SpecialObj%
+\endgroup%
+}
+\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
new file mode 100644
index 00000000000..e61db1f03cd
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/pst-moire/pst-moire.sty
@@ -0,0 +1,33 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% %%
+%% This is file `pst-moire.sty' %%
+%% %%
+%% IMPORTANT NOTICE: %%
+%% %%
+%% Package `pst-moire' %%
+%% %%
+%% Jürgen Gilg, Manuel Luque, Jean-Michel Sarlat %%
+%% %%
+%% Copyright (C) 2018 %%
+%% %%
+%% This program can redistributed and/or modified under %%
+%% the terms of the LaTeX Project Public License %%
+%% Distributed from CTAN archives in directory %%
+%% macros/latex/base/lppl.txt; either version 1.3c of %%
+%% the License, or (at your option) any later version. %%
+%% %%
+%% DESCRIPTION: %%
+%% `pst-moire' is a PSTricks package to draw moire patterns %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\RequirePackage{pstricks}
+\ProvidesPackage{pst-moire}[2018/10/28 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/10/28 v. 1.0, PostScript prologue file]
+ \@addtofilelist{pst-moire.pro}}{}%
+\endinput