summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-moire/pst-moire-doc.tex
blob: 5e0facd85d41e44c2d4bdcbf1fc8f1a670020335 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                                                   %%
%% This is file `pst-moire-doc.tex'                                  %%
%%                                                                   %%
%% IMPORTANT NOTICE:                                                 %%
%%                                                                   %%
%% Package `pst-moire'                                               %%
%%                                                                   %%
%% Manuel Luque, Jürgen Gilg, 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        %%
%%                                                                   %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\listfiles

\documentclass[%
    11pt,
    english,
    BCOR10mm,
    DIV12,
    bibliography=totoc,
    parskip=false,
    fleqn,
    smallheadings,
    headexclude,
    footexclude,
    oneside,
    dvipsnames,
    svgnames,
    x11names
]{pst-doc}

\usepackage[autostyle]{csquotes}
\usepackage{biblatex}
%\usepackage[style=dtk]{biblatex}
\addbibresource{pst-marble-doc.bib}
\usepackage[utf8]{inputenc}
\let\pstpersFV\fileversion
\usepackage[nomessages]{fp}
\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}
\definecolor{moire4}{rgb}{0.070.41 0.255}
\definecolor{Beige} {rgb}{0.96,0.96,0.86}
\definecolor{GrisClair} {rgb}{0.8,0.8,0.8}
\definecolor{GrisTresClair} {rgb}{0.9,0.9,0.9}
\definecolor{OrangeTresPale}{cmyk}{0,0.1,0.3,0}
\definecolor{OrangePale}{cmyk}{0,0.2,0.4,0}
\definecolor{BleuClair}{cmyk}{0.2,0,0,0}
\definecolor{LightBlue}{rgb}{.68,.85,.9}
\definecolor{DarkGreen}{rgb}{0,.85,0}
\definecolor{Copper}{cmyk}{0,0.9,0.9,0.2}
\DeclareSymbolFont{grecquesdroites}{U}{eur}{m}{n}
\DeclareMathSymbol{\BETA}{\mathord}{grecquesdroites}{12}
\DeclareMathSymbol{\DELTA}{\mathord}{grecquesdroites}{14}
\DeclareMathSymbol{\EPSILON}{\mathord}{grecquesdroites}{15}
\DeclareMathSymbol{\THETA}{\mathord}{grecquesdroites}{18}
\DeclareMathSymbol{\ALPHA}{\mathord}{grecquesdroites}{11}
\DeclareMathSymbol{\GAMMA}{\mathord}{grecquesdroites}{13}
\DeclareMathSymbol{\RHO}{\mathord}{grecquesdroites}{26}
\DeclareMathSymbol{\PI}{\mathord}{grecquesdroites}{25}
\DeclareMathSymbol{\OMEGA}{\mathord}{grecquesdroites}{33}
\DeclareMathSymbol{\TAU}{\mathord}{grecquesdroites}{28}
\DeclareMathSymbol{\MU}{\mathord}{grecquesdroites}{22}
\DeclareMathSymbol{\PHI}{\mathord}{grecquesdroites}{39}

\renewcommand\bgImage{%
\begin{pspicture}(-3,-3)(3,4.5)
\psmoire[type=Gauss,rotate=-10,scale=0.6]
\psmoire[type=Gauss,linecolor=red,scale=0.6,rotate=-20]
\end{pspicture}}


\let\belowcaptionskip\abovecaptionskip
\parindent0pt

\begin{document}

\title{pst-moire v 1.0}
\subtitle{A PSTricks package to draw moiré patterns}
\author{%
    Jürgen \textsc{Gilg}\\
    Manuel \textsc{Luque}\\
    Jean-Michel \textsc{Sarlat}
}

\date{\today}
\maketitle
\tableofcontents
\psset{unit=1cm}


\clearpage

\begin{abstract}\parskip4pt\parindent0pt

The \texttt{pst-moire} package makes it possible to very simply create a variety of patterns obtained either by dragging one pattern on another, or by rotating one on the other. Moiré effects sometimes look very interesting. This document provides the necessary commands and divers examples.

For the interested user, we present a section \textbf{Theory} (see pages~\pageref{sec:theory}-\pageref{sec:theoryEnd}) for the mathematical background of moiré patterns.


\vfill
{\small This program can redistributed and/or modified under the terms of the LaTeX Project Public License Distributed from CTAN archives in directory \texttt{macros/latex/base/lppl.txt}; either version 1.3c of the License, or (at your option) any later version.}

\end{abstract}


\newpage


\section{The provided patterns}

\begin{center}
\psset{scale=0.4}
\begin{pspicture}(-3,-3)(3,4)
\rput(0,-3){\colorbox{black}{\textcolor{white}{\texttt{type=Fresnel}}}}
\rput(0,3){\texttt{Bands of Fresnel}}
\psmoire[linecolor=red,type=Fresnel]
\end{pspicture}
\hfill
\begin{pspicture}(-3,-3)(3,4)
\rput(0,-3){\colorbox{black}{\textcolor{white}{\texttt{type=linear}}}}
\rput(0,3){\texttt{Equidistant lines}}
\psmoire[linecolor=blue,type=linear]
\end{pspicture}

\begin{pspicture}(-3,-3)(3,4)
\rput(0,-3){\colorbox{black}{\textcolor{white}{\texttt{type=radial}}}}
\rput(0,3){\texttt{Radii with 3\textsuperscript{o}}}
\psmoire[linecolor=magenta,type=radial]
\end{pspicture}
\hfill
\begin{pspicture}(-3,-3)(3,4)
\rput(0,-3){\colorbox{black}{\textcolor{white}{\texttt{type=circle}}}}
\rput(0,3){\texttt{Concentric circles}}
\psmoire[linecolor=cyan,type=circle]
\end{pspicture}

\begin{pspicture}(-3,-3)(3,4)
\rput(0,-3){\colorbox{black}{\textcolor{white}{\texttt{type=square}}}}
\rput(0,3){\texttt{Squares}}
\psmoire[linecolor=yellow,type=square]
\end{pspicture}
\hfill
\begin{pspicture}(-3,-3)(3,4)
\rput(0,-3){\colorbox{black}{\textcolor{white}{\texttt{type=Newton}}}}
\rput(0,3){\texttt{Squares of Newton}}
\psmoire[type=Newton]
\end{pspicture}
\hfill
\begin{pspicture}(-3,-3)(3,4)
\rput(0,-3){\colorbox{black}{\textcolor{white}{\texttt{type=Bouasse}}}}
\rput(0,3){\texttt{The pattern of H. Bouasse}}
\psmoire[type=Bouasse]
\end{pspicture}
\hfill
\begin{pspicture}(-3,-3)(3,4)
\psmoire[linecolor=red,type=Gauss,scale=0.5,E=0.4]%
\rput(0,-3){\colorbox{black}{\textcolor{white}{\texttt{type=Gauss}}}}
\rput(0,3){\texttt{The pattern of Gauss}}
\end{pspicture}
\hfill
\begin{pspicture}(-3,-3)(3,4)
\psmoire[linecolor=red,type=dot,scale=0.5]%
\rput(0,-3){\colorbox{black}{\textcolor{white}{\texttt{type=dot}}}}
\rput(0,3){\texttt{Point pattern}}
\end{pspicture}
\hfill
\begin{pspicture}(-3,-3)(3,4)
\psmoire[linecolor={[cmyk]{0 0.81 1 0.6}},type=chess,dotstyle=square*,scale=0.5]%
\rput(0,-3){\colorbox{black}{\textcolor{white}{\texttt{type=chess}}}}
\rput(0,3){\texttt{Chess pattern}}
\end{pspicture}
\end{center}


\newpage


\section{The command \Lcs{psmoire}}

\begin{BDef}
\Lcs{psmoire}\OptArgs\Largr{x , y}
\end{BDef}

The command \Lcs{psmoire} contains the options \nxLkeyword{type=}, \nxLkeyword{Rmax=}, \nxLkeyword{scale=}, \nxLkeyword{Alpha=}, \nxLkeyword{rotate=}, and \nxLkeyword{E=}.

The optional argument \Largr{x , y} gives the \texttt{x} and \texttt{y} center of the image. If not chosen $(0,0)$ is taken by default.

\medskip

\begin{quote}
\begin{tabularx}{\linewidth}{ @{} l >{\ttfamily}l X @{} }\toprule
\textbf{Name}      & \textbf{Default}  & \textbf{Meaning} \\\midrule
\Lkeyword{type}    & Fresnel  & The type of pattern\\
\Lkeyword{Rmax}    & 6  & The largest radius of the circles (in cm)\\
\Lkeyword{scale}   & 1  & Scaling factor for the image\\
\Lkeyword{Alpha}   & 70 & Slope of the lines for \verb+[type=Gauss]+\\
\Lkeyword{rotate}  & 0  & Rotation of the figure in degrees.\\
\Lkeyword{E}       & 0.25& Distance between two lines for \verb+[type=Gauss]+\\
\bottomrule
\end{tabularx}
\end{quote}

\textbf{Note:}
\begin{itemize}
  \item Thickness of the lines/circles: done with the usual PSTricks key \verb+linewidth=1mm+ (for example).
  \item Color of the lines/circles: done with the usual PSTricks key \verb+linecolor=red+ (for example).
\end{itemize}
We set the type of pattern like: \texttt{type=Gauss} (for example).
{\small\begin{verbatim}
\psmoire[options,type=Gauss](x,y)
\end{verbatim}}

If no position coordinate is specified, the center of the image is placed at $(0,0)$. The thickness parameter does not effect the following types:
\verb+Fresnel+, \verb+Newton+ and \verb+radial+


\newpage


\section{Opacity and Blendmodes}

If we want to highlight the color of the intersecting area of the lines of two or more overlapping moiré patterns differently, we can either use \emph{opacity} or \emph{blendmodes}.

\subsection{Opacity}

In case we want to add some opacity to the lines of the moiré patterns, we just set, i. e.
\begin{verbatim}
\pstVerb{%
0.45 .setopacityalpha
}
\end{verbatim}
within the \verb+\pspicture+ environment.

Distiller users set:
\begin{verbatim}
\pstVerb{%
[ /ca 0.45 /CA 0.45 /SetTransparency pdfmark
}
\end{verbatim}

\textbf{Note:} The value of the opacity needs to be between 0 and 1.

\begin{center}
\begin{pspicture}(-6,-6)(6,6)
\pstVerb{%
0.45 .setopacityalpha
}
\psmoire[type=linear,linecolor=blue,linewidth=3pt]
\psmoire[type=linear,linecolor=green,linewidth=3pt,rotate=90]
\end{pspicture}
\end{center}
{\tiny\begin{verbatim}
\begin{pspicture}(-6,-6)(6,6)
\pstVerb{%
0.45 .setopacityalpha
}
\psmoire[type=linear,linecolor=blue,linewidth=3pt]
\psmoire[type=linear,linecolor=green,linewidth=3pt,rotate=90]
\end{pspicture}
\end{verbatim}}


\newpage


\subsection{Blendmodes}

In case we want to overlap various moiré patterns we can use the following blendmodes:
\begin{quote}
\texttt{/Lighten}, \texttt{/Darken}, \texttt{/Normal}, \texttt{/Multiply}, \texttt{/Screen}, \texttt{/Overlay}, \texttt{/ColorDodge},\\ \texttt{/ColorBurn}, \texttt{/HardLight}, \texttt{/SoftLight}, \texttt{/Difference}, \texttt{/Exclusion}, \texttt{/Saturation}, \\
\texttt{/Color}, \texttt{/Luminosity}.
\end{quote}
We just set, i. e.
\begin{verbatim}
\pstVerb{%
/Darken .setblendmode
}
\end{verbatim}
within the \verb+\pspicture+ environment.

Distiller users set:
\begin{verbatim}
\pstVerb{%
[ /BM /Darken /ca 1 /CA 1 /SetTransparency pdfmark
}
\end{verbatim}

\begin{center}
\begin{pspicture}(-6,-6)(6,6)
\pstVerb{%
/Darken .setblendmode
}
\psmoire[type=linear,linecolor=blue,linewidth=3pt]
\psmoire[type=linear,linecolor=green,linewidth=3pt,rotate=90]
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-6,-6)(6,6)
\pstVerb{%
/Darken .setblendmode
}
\psmoire[type=linear,linecolor=blue,linewidth=3pt]
\psmoire[type=linear,linecolor=green,linewidth=3pt,rotate=90]
\end{pspicture}
\end{verbatim}}


\newpage


\section{Examples}

\begin{center}
\begin{pspicture}(-4,-4)(4,4)
\rput(0,4){\textsf{Bands of Fresnel 1}}
\psmoire[linecolor=red,scale=0.5](-0.2,0)
\psmoire[linecolor=red,scale=0.5](0.2,0)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-4,-4)(4,4)
\psmoire[linecolor=red,scale=0.5](-0.2,0)
\psmoire[linecolor=red,scale=0.5](0.2,0)
\end{pspicture}
\end{verbatim}}
%
\begin{center}
\begin{pspicture}(-5,-4)(5,4)
\rput(0,4){\textsf{Bands of Fresnel 2}}
\psmoire[linecolor={[rgb]{0.15 0.75 0.15}},scale=0.5](-1.5,0)
\psmoire[linecolor={[rgb]{0.15 0.75 0.15}},scale=0.5](1.5,0)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-4,-4)(4,4)
\psmoire[linecolor=green,scale=0.5](-1.5,0)
\psmoire[linecolor=green,scale=0.5](1.5,0)
\end{pspicture}
\end{verbatim}}


\newpage


\begin{center}
\begin{pspicture}(-4,-4)(4,4)
\rput(0,4){\textsf{Lines}}
\psmoire[scale=0.5,type=linear,rotate=5,linewidth=0.1]
\psmoire[scale=0.5,type=linear,rotate=-5,linewidth=0.1]
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-4,-4)(4,4)
\psmoire[scale=0.5,type=linear,rotate=5,linewidth=0.1]
\psmoire[scale=0.5,type=linear,rotate=-5,linewidth=0.1]
\end{pspicture}
\end{verbatim}}
%
\begin{center}
\begin{pspicture}(-4,-4)(4,4.5)
\rput(0,4.25){\textsf{Radii}}
\psmoire[Rmax=4,type=radial](-0.25,0)
\psmoire[Rmax=4,type=radial](0.25,0)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-4,-4)(4,4)
\psmoire[Rmax=4,type=radial](-0.25,0)
\psmoire[Rmax=4,type=radial](0.25,0)
\end{pspicture}
\end{verbatim}}


\newpage


\begin{center}
\psset{scale=0.7,linewidth=0.75mm}
\begin{pspicture}(-6,-5)(6,5)
\rput(0,5.25){\textsf{Bouasse}}
\psmoire[type=Bouasse,rotate=10,Rmax=5]
\psmoire[type=Bouasse,rotate=170,Rmax=5]
%\psline[linecolor=red,linewidth=0.25mm](0,-6)(0,6)
\end{pspicture}

\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-6,-6)(6,6)
\psmoire[type=Bouasse,rotate=10]
\psmoire[type=Bouasse,rotate=170]
\end{pspicture}
\end{verbatim}}
%
\begin{center}
\psset{linewidth=1mm}
\begin{pspicture}(-6,-4)(6,4)
\rput(0,4.25){\textsf{Concentric circles}}
\psmoire[Rmax=4,type=circle](-0.5,0)
\psmoire[Rmax=4,type=circle](0.5,0)
\end{pspicture}

\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psmoire[Rmax=5,type=circle](-0.2,0)
\psmoire[Rmax=5,type=circle](0.2,0)
\end{pspicture}
\end{verbatim}}


\newpage


%
\begin{center}
\psset{linewidth=0.5mm,Rmax=4}
\begin{pspicture}(-5,-5)(5,5)
\rput(0,4.5){\textsf{Gauss}}
\psmoire[type=Gauss,rotate=-5,linecolor=red]
\psmoire[type=Gauss,rotate=5]
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psmoire[type=Gauss,rotate=-10]
\psmoire[type=Gauss]
\end{pspicture}
\end{verbatim}}
%
\begin{center}
\psset{linewidth=1mm,scale=0.6}
\begin{pspicture}(-4,-4)(4,4)
\rput(0,4){\textsf{Squares}}
\psmoire[type=square,rotate=-5]
\psmoire[type=square,rotate=5]
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\psmoire[type=square,rotate=-5]
\psmoire[type=square,rotate=5]
\end{verbatim}}
%


\newpage


\begin{center}
\psset{linewidth=0.5mm,scale=0.5}
\begin{pspicture}(-4,-4)(4,4)
\rput(0,3.75){\textsf{Squares of Newton}}
\psmoire[type=Newton,rotate=-2.5]
\psmoire[type=Newton,rotate=2.5]
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-4,-4)(4,4)
\psmoire[type=Newton,rotate=-2.5]
\psmoire[type=Newton,rotate=2.5]
\end{pspicture}
\end{verbatim}}
%
\begin{center}
\psset{Rmax=4}
\begin{pspicture}(-4,-4)(4,5)
\rput(0,4.75){\textsf{Point pattern}}
\psmoire[type=dot,linecolor=blue,rotate=-2.5]
\psmoire[type=dot,rotate=2.5,linecolor=red]
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psmoire[type=dot,linecolor=blue,rotate=-2.5]
\psmoire[type=dot,rotate=2.5,linecolor=red]
\end{pspicture}
\end{verbatim}}


\newpage


\begin{center}
\psset{Rmax=4,dotstyle=square*,dotsize=0.25cm,linecolor={[cmyk]{0 0.81 1 0.6}}}
\begin{pspicture}(-4,-4)(4,5)
\rput(0,4.5){\textsf{Chess pattern}}
\psmoire[type=chess,rotate=-5]
\psmoire[type=chess,rotate=5]
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\psset{Rmax=4,dotstyle=square*,dotsize=0.25cm}
\begin{pspicture}(-4,-4)(4,5)
\psmoire[type=chess,rotate=-5]
\psmoire[type=chess,rotate=5]
\end{pspicture}
\end{verbatim}}
%
\begin{center}
\psset{Rmax=8,linewidth=0.5mm,scale=0.5,linecolor={[rgb]{0.15 0.55 0.15}}}
\begin{pspicture}(-5,-4)(5,5)
\rput(0,4.75){\textsf{Bands of Fresnel + lines}}
\psmoire[type=Fresnel]
\psmoire[type=linear]
\psmoire[type=linear](-0.1,0)
% et, \'{e}ventuellement, pour avoir le trait vertical qui manque \`{a} droite
%\psmoire[type=linear,linewidth=0.2mm](0.1,0)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-4,-4)(4,4)
\psmoire[type=Fresnel]
\psmoire[type=linear]
\psmoire[type=linear](-0.1,0)
\end{pspicture}
\end{verbatim}}


\newpage

These rotating moirés were obtained with the use of the \texttt{pst-lens} package. It is the reproduction, with the tools of PSTricks, of the photograph 6, page 137 of the book ``\textit{Les phénomènes naturels}'' of the Library \textbf{Pour la Science}, Berlin (1978). This photograph is accompanied by the following comment:
\begin{quote}\itshape
<<~Ces moirés tournants apparaissent quand les lentilles placées sur une trame et observées avec une autre trame identique à la première. La grosse lentille(convergente) réduit la trame inférieure, tandis que la petite lentille (divergente) la grossit. En conséquence, les moirés obtenus ont des sens de rotation opposés. Une figure de moiré ondulée traduit la présence d'aberrations optiques dans la lentille.~>>
\end{quote}
\textbf{Animation:} Big lens: magnification of 1.2, small lens: magnification of 0.8
\begin{center}
\psset{unit=0.5}
\begin{animateinline}[controls,palindrome,
                     begin={\begin{pspicture}(-8.5,-8.5)(8.5,8.5)},
                     end={\end{pspicture}}]{10}% 10 image/s
\multiframe{20}{i=-10+1}{%
\psset{LensHandle=false,LensShadow=false}
\psset{linecolor=red,linewidth=0.1,type=linear}
\psmoire%
\PstLens[LensMagnification=1.2,LensSize=2](1,1.5){\psmoire}
\PstLens[LensMagnification=0.8,LensSize=1.5](-2,-2){\psmoire}
\psmoire[linecolor=black,rotate=\i]}
\end{animateinline}
\end{center}
{\tiny\begin{verbatim}
\psset{unit=0.5}
\begin{animateinline}[controls,palindrome,
                     begin={\begin{pspicture}(-8.5,-8.5)(8.5,8.5)},
                     end={\end{pspicture}}]{10}% 10 image/s
\multiframe{20}{i=-10+1}{%
\psset{LensHandle=false,LensShadow=false}
\psset{linecolor=red,linewidth=0.1,type=linear}
\psmoire%
\PstLens[LensMagnification=1.2,LensSize=2](1,1.5){\psmoire}
\PstLens[LensMagnification=0.8,LensSize=1.5](-2,-2){\psmoire}
\psmoire[linecolor=black,rotate=\i]}
\end{animateinline}
\end{verbatim}}


\newpage


\section{Animations}

Some interactive moiré JavaScript based applications can be found on:
\begin{center}
\url{https://melusine.eu.org/syracuse/G/pstricks/pst-moire/moirej/}
\end{center}

\textbf{Animation 1:}

\begin{center}
\begin{animateinline}[%
    controls,palindrome,
    begin={\begin{pspicture}(-6,-6)(6,6)},
    end={\end{pspicture}}
    ]{5}% 5 image/s
\multiframe{36}{i=0+1}{%
\psmoire[type=Newton,rotate=-\i]%
\psmoire[type=Newton,rotate=\i]%
}
\end{animateinline}
\end{center}
{\small\begin{verbatim}
\begin{animateinline}[%
    controls,palindrome,
    begin={\begin{pspicture}(-6,-6)(6,6)},
    end={\end{pspicture}}
    ]{5}% 5 image/s
\multiframe{36}{i=0+1}{%
\psmoire[type=Newton,rotate=-\i]%
\psmoire[type=Newton,rotate=\i]%
}
\end{animateinline}
\end{verbatim}


\newpage


\textbf{Animation 2:}

\begin{center}
\begin{animateinline}[%
    controls,palindrome,
    begin={\begin{pspicture}(-6,-6)(6,6)},
    end={\end{pspicture}}
    ]{10}% 10 image/s
\multiframe{36}{r=0+0.1}{%
\psmoire[scale=0.85,type=linear,rotate=-\r,linewidth=0.1,linecolor=red](0,0)%
\psmoire[scale=0.85,type=linear,rotate=\r,linewidth=0.1,linecolor=red](0,0)%
}
\end{animateinline}
\end{center}
{\small\begin{verbatim}
\begin{animateinline}[%
    controls,palindrome,
    begin={\begin{pspicture}(-6,-6)(6,6)},
    end={\end{pspicture}}
    ]{10}% 10 image/s
\multiframe{36}{r=0+0.1}{%
\psmoire[scale=0.85,type=linear,rotate=-\r,linewidth=0.1,linecolor=red](0,0)%
\psmoire[scale=0.85,type=linear,rotate=\r,linewidth=0.1,linecolor=red](0,0)%
}
\end{animateinline}
\end{verbatim}


\newpage


\textbf{Animation 3:}

\begin{center}
\begin{animateinline}[%
    controls,palindrome,
    begin={\begin{pspicture}(-6,-6)(6,6)},
    end={\end{pspicture}}
    ]{5}% 5 image/s
\multiframe{20}{r=0+0.025}{%
\psset{linewidth=2.5pt}
\psmoire[type=circle,linecolor=moire1](0,\r)
\psmoire[type=circle,linecolor=moire2](0,-\r)
\psmoire[type=circle,linecolor=moire3](\r,0)
\psmoire[type=circle,linecolor=moire4](-\r,0)
}
\end{animateinline}
\end{center}
{\small\begin{verbatim}
\begin{animateinline}[%
    controls,palindrome,
    begin={\begin{pspicture}(-6,-6)(6,6)},
    end={\end{pspicture}}
    ]{5}% 5 image/s
\multiframe{20}{r=0+0.025}{%
\psset{linewidth=2.5pt}
\psmoire[type=circle,linecolor=moire1](0,\r)
\psmoire[type=circle,linecolor=moire2](0,-\r)
\psmoire[type=circle,linecolor=moire3](\r,0)
\psmoire[type=circle,linecolor=moire4](-\r,0)
}
\end{animateinline}
\end{verbatim}}


\newpage


\textbf{Animation 4:}

\begin{center}
\begin{animateinline}[%
    controls,palindrome,
    begin={\begin{pspicture}(-6,-6)(6,6)},
    end={\end{pspicture}}
    ]{5}% 5 image/s
\multiframe{30}{r=0+0.025}{%
\psset{linewidth=1pt}
\psmoire[type=radial,linecolor=red](\r,0)
\psmoire[type=radial,linecolor=green](-\r,0)
\psmoire[type=radial,linecolor=blue](0,-\r)
}
\end{animateinline}
\end{center}
{\small\begin{verbatim}
\begin{animateinline}[%
    controls,palindrome,
    begin={\begin{pspicture}(-6,-6)(6,6)},
    end={\end{pspicture}}
    ]{5}% 5 image/s
\multiframe{30}{r=0+0.025}{%
\psset{linewidth=1pt}
\psmoire[type=radial,linecolor=red](\r,0)
\psmoire[type=radial,linecolor=green](-\r,0)
\psmoire[type=radial,linecolor=blue](0,-\r)
}
\end{animateinline}
\end{verbatim}}


\newpage


\textbf{Animation 5:}

This idea came from a post card ``\textbf{turn the top part}'', bought in a boutique of the centre Beaubourg in Paris, showing the phenomenon of the moiré effect and redesigned with PSTricks.

\begin{center}
\def\myMoire{%
\psset{dimen=inner,linewidth=0pt}
\def\carre{%
\pnodes{AL}(0,0)(-1.5,1.5)(-1.5,1.2)(-1.5,0.9)(-1.5,0.7)(-1.5,0.4)(-1.5,0.2)(-1.5,0)%
(-1.5,-0.2)(-1.5,-0.4)(-1.5,-0.6)(-1.5,-0.75)(-1.5,-0.9)(-1.5,-1.05)(-1.5,-1.15)%
(-1.5,-1.25)(-1.5,-1.3)(-1.5,-1.4)(-1.5,-1.45)
\pnodes{AR}(0,0)(1.5,-1.5)(1.5,-1.2)(1.5,-0.9)(1.5,-0.7)(1.5,-0.4)(1.5,-0.2)(1.5,0)%
(1.5,0.2)(1.5,0.4)(1.5,0.6)(1.5,0.75)(1.5,0.9)(1.5,1.05)(1.5,1.15)(1.5,1.25)%
(1.5,1.3)(1.5,1.4)(1.5,1.45)
\multido{\iA=1+2,\iB=2+2}{9}{\pspolygon*(AL\iA)(AR\iA)(AR\iB)(AL\iB)}%
\pnodes{BL}(0,0)(-1.2,1.5)(-0.9,1.5)(-0.7,1.5)(-0.4,1.5)(-0.2,1.5)(0.0,1.5)(0.2,1.5)%
(0.4,1.5)(0.6,1.5)(0.75,1.5)(0.9,1.5)(1.05,1.5)(1.15,1.5)(1.25,1.5)(1.3,1.5)%
(1.4,1.5)(1.45,1.5)(1.5,1.5)
\pnodes{BR}(0,0)(1.2,-1.5)(0.9,-1.5)(0.7,-1.5)(0.4,-1.5)(0.2,-1.5)(0,-1.5)(-0.2,-1.5)%
(-0.4,-1.5)(-0.6,-1.5)(-0.75,-1.5)(-0.9,-1.5)(-1.05,-1.5)(-1.15,-1.5)(-1.25,-1.5)%
(-1.3,-1.5)(-1.4,-1.5)(-1.45,-1.5)(-1.5,-1.5)
\multido{\iA=1+2,\iB=2+2}{9}{\pspolygon*(BL\iA)(BR\iA)(BR\iB)(BL\iB)}}%
\def\half{%
\rput(0,0){\carre}
\rput(-3,0){\psscalebox{-1 1}{\carre}}
}
\def\pattern{%
\rput(0,0){\half}
\rput(0,-3){\psscalebox{1 -1}{\half}}
}
\multido{\iA=0+6}{2}{\multido{\iB=0+-6}{3}{\rput(\iA,\iB){\pattern}}}}
\psset{unit=0.5}
\begin{animateinline}[controls,loop,
    begin={\begin{pspicture}(-7,-17)(10,3)},
    end={\end{pspicture}}]{10}% 10 frames/s (velocity of the animation)
\multiframe{11}{i=0+2}{% number of frames
\rput(0,0){\myMoire}
\psrotate(1.5,-7){\i}{\myMoire}
}
\multiframe{21}{i=20+-2}{%
\rput(0,0){\myMoire}
\psrotate(1.5,-7){\i}{\myMoire}
}
\multiframe{10}{i=-20+2}{%
\rput(0,0){\myMoire}
\psrotate(1.5,-7){\i}{\myMoire}
}
\end{animateinline}
\end{center}
{\tiny\begin{verbatim}
\def\myMoire{%
\psset{dimen=inner,linewidth=0pt}
\def\carre{%
\pnodes{AL}(0,0)(-1.5,1.5)(-1.5,1.2)(-1.5,0.9)(-1.5,0.7)(-1.5,0.4)(-1.5,0.2)(-1.5,0)%
(-1.5,-0.2)(-1.5,-0.4)(-1.5,-0.6)(-1.5,-0.75)(-1.5,-0.9)(-1.5,-1.05)(-1.5,-1.15)%
(-1.5,-1.25)(-1.5,-1.3)(-1.5,-1.4)(-1.5,-1.45)
\pnodes{AR}(0,0)(1.5,-1.5)(1.5,-1.2)(1.5,-0.9)(1.5,-0.7)(1.5,-0.4)(1.5,-0.2)(1.5,0)%
(1.5,0.2)(1.5,0.4)(1.5,0.6)(1.5,0.75)(1.5,0.9)(1.5,1.05)(1.5,1.15)(1.5,1.25)%
(1.5,1.3)(1.5,1.4)(1.5,1.45)
\multido{\iA=1+2,\iB=2+2}{9}{\pspolygon*(AL\iA)(AR\iA)(AR\iB)(AL\iB)}%
\pnodes{BL}(0,0)(-1.2,1.5)(-0.9,1.5)(-0.7,1.5)(-0.4,1.5)(-0.2,1.5)(0.0,1.5)(0.2,1.5)%
(0.4,1.5)(0.6,1.5)(0.75,1.5)(0.9,1.5)(1.05,1.5)(1.15,1.5)(1.25,1.5)(1.3,1.5)%
(1.4,1.5)(1.45,1.5)(1.5,1.5)
\pnodes{BR}(0,0)(1.2,-1.5)(0.9,-1.5)(0.7,-1.5)(0.4,-1.5)(0.2,-1.5)(0,-1.5)(-0.2,-1.5)%
(-0.4,-1.5)(-0.6,-1.5)(-0.75,-1.5)(-0.9,-1.5)(-1.05,-1.5)(-1.15,-1.5)(-1.25,-1.5)%
(-1.3,-1.5)(-1.4,-1.5)(-1.45,-1.5)(-1.5,-1.5)
\multido{\iA=1+2,\iB=2+2}{9}{\pspolygon*(BL\iA)(BR\iA)(BR\iB)(BL\iB)}}%
\def\half{%
\rput(0,0){\carre}
\rput(-3,0){\psscalebox{-1 1}{\carre}}
}
\def\pattern{%
\rput(0,0){\half}
\rput(0,-3){\psscalebox{1 -1}{\half}}
}
\multido{\iA=0+6}{2}{\multido{\iB=0+-6}{3}{\rput(\iA,\iB){\pattern}}}}

\psset{unit=0.75}
\begin{animateinline}[controls,loop,
    begin={\begin{pspicture}(-7,-19)(10,5)},
    end={\end{pspicture}}]{10}% 10 frames/s (velocity of the animation)
\multiframe{11}{i=0+2}{% number of frames
\rput(0,0){\myMoire}
\psrotate(1.5,-7){\i}{\myMoire}
}
\multiframe{21}{i=20+-2}{%
\rput(0,0){\myMoire}
\psrotate(1.5,-7){\i}{\myMoire}
}
\multiframe{10}{i=-20+2}{%
\rput(0,0){\myMoire}
\psrotate(1.5,-7){\i}{\myMoire}
}
\end{animateinline}
\end{verbatim}}


\newpage


\section{Theory---for the interested user}\label{sec:theory}

\subsection{The contribution of ``éditions Kangourou''}

``Le Kangourou des mathématiques'': \textcolor{orange}{\url{http://www.mathkang.org/}} published a revue in 2002, ``\textsl{Les malices du Kangourou}'' that contains a magnificent article from pages 18 to 26 titled ``\textsl{Mirifiques et mirobolants moirés}'' and on the back cover ``La règle à moirer'' (``The ruler''). The article and the ruler are available at the following addresses:
\begin{center}
\url{http://www.mathkang.org/cite/moires9p.pdf}
\\
\url{http://www.mathkang.org/cite/moirer.html}
\end{center}
The ruler can be purchased at the following address:
\begin{center}
\url{http://www.mathkang.org/catalogue/prodmoir.html}
\end{center}
In the article the sketches are very beautiful and the part ``\textit{Mathématisation du phénomène}'' is remarkable! It contains the following moirés:
\begin{itemize}
  \item a network of parallel straight lines superposed each with a rotation in different direction;
  \item shifted superposition of two networks consisting of radial rays (or rather sectors);
  \item shifted superposition of two frames of Fresnel rings, well known as Newton's rings observed in optics.
\end{itemize}


\newpage


\subsection{The contribution of Henri Bouasse}

\newcounter{boua}
\newcommand{\itemBoua}{\addtocounter{boua}{1}\strut\indent\textit{\theboua}\textsuperscript{o} ---
}

This is the chapter of his book \textit{Vision et reproduction des formes et des couleurs} published at Librairie Delagrave in Paris in 1917. His demonstration and the diagram within his book have been reproduced here:

\medskip

\psframebox[fillstyle=solid,fillcolor=gray,linestyle=none,framesep=1pt]{\centerline{\white
\Large \textbf{Parallel straight lines}}}

\hrule
\vskip2ex
\itemBoua
Consider two straight lines respectively parallel:
\begin{equation}
x\cos\THETA +y\sin\THETA=bt+ct^2\quad\quad x\cos\THETA -y\sin\THETA=b\TAU-c\TAU^2
\label{droites}
\end{equation}
\begin{figure}[h]
\begin{center}
\begin{pspicture}(-8,-6)(8,6)
\begin{psclip}{\psframe[linestyle=none](-6,-6)(6,6)}
\multido{\i=-10+1}{21}{%
    \parametricplot{-6}{6}{%
        /c 0.1 def
        /b 4.1 def
        /X t def
        /Y X 80 dup sin exch cos div mul
           b \i\space mul c \i\space dup mul mul sub
        sub
        def
        X Y}}
\multido{\i=-10+1}{21}{%
    \parametricplot{-6}{6}{%
        /c 0.1 def
        /b 4.1 def
        /X t def
        /Y X 80 dup sin exch cos div mul neg
           b \i\space mul c \i\space dup mul mul add
        add
        def
        X Y}}
% paraboles
\multido{\i=-4+1}{8}{%
 \parametricplot[linecolor=red]{-6}{6}{%
        /c 0.1 10 sin mul def
        /b 4.1 10 sin mul def
        /X t def
        /Y c X dup mul mul 10 cos dup mul mul
        b c \i\space mul add dup mul 10 sin mul div
        b \i\space mul 2 div 10 sin div
        add
        \i\space dup mul c mul 4 div 10 sin div
        add
        def
        X Y}}
\psline[linestyle=dashed,linecolor=blue](0,6)(0,-6)
\end{psclip}
\rput(-7.5,0){%
    \psline(0,-2)(0,4)
    \psline(-1,0)(1,0)
    \uput[90](0,4){$y$}
    \uput[90](1,0){$x$}
    \psline(4;80)
    \psline(4;100)
    \uput[0](4;80){$\mathrm{S_1}$}
    \uput[180](4;100){$\mathrm{S_2}$}
    \uput[225](0,0){O}
    \psarc(0,0){2}{80}{90}
    \psarc(0,0){1.8}{90}{100}
    \uput[85](2;85){$\THETA$}
    \uput[95](1.8;95){$\THETA$}
    }
\end{pspicture}
\end{center}
\caption{\label{fig169} Moiré: parallel lines}
\end{figure}
\indent For $t=\TAU=0$, we get the two lines $\mathrm{OS_2}$ and $\mathrm{OS_1}$; they obviously have the same angle $\THETA$ with the axis $\mathrm{O}y$.

The curves of the intersection points, which correspond to the small diagonals of the parallelograms, satisfy the following condition:
\begin{equation*}
t-\TAU=\MU=\mathrm{constant}
\end{equation*}
\indent Adding and reordering the equations~(\ref{fig169}):
\begin{align*}
2x\cos\THETA&=(b+c\MU)(t+\TAU)\\
2y\sin\THETA&=b\MU+c(t^2+\TAU^2)=b\MU+c(\MU^2+2t\TAU)
\end{align*}
\indent To complete the elimination, we will use the following relation:
\begin{equation*}
(t+\TAU)^2-4t\TAU=\MU^2
\end{equation*}
Thus:
\begin{equation}
\frac{4x^2\cos^2\THETA}{(b+c\MU)^2}-\frac{4y\sin\THETA}{c}+\frac{2b\MU}{c}+\MU^2=0\label{parabole}
\end{equation}
\indent The wanted curves are parabolas which have the O$y$ axis in common.

Its vertices are given by:
\begin{equation}
y=\frac{\MU(2b+c\MU)}{4\sin\THETA}
\label{sommets}
\end{equation}

\itemBoua The parameter $c$ is small compared to the parameter $b$, so the equations simplify.

The equation~(\ref{parabole}) becomes:
\begin{equation*}
\frac{4x^2\cos^2\THETA}{b^2}-4y\sin\THETA+2b\MU=0
\end{equation*}

\indent This is the same parabola for all the values of $\MU$ sliding parallely to O$y$. The vertices are given by:
\begin{equation}
y=\MU \frac{b}{2\sin\THETA}
\label{sommets2}
\end{equation}
The radius of curvature at the vertex of the parabola is:
\begin{equation*}
\mathrm{R}=\frac{b^2}{2c}\frac{\sin\THETA}{\cos^2\THETA}
\end{equation*}

\indent If the parallel straight lines are equidistant $(c=0)$, the parabolas degenerate to straight lines~(\ref{sommets2}); in other words, the radius of curvature becomes infinite.
\\
\itemBoua To make an experiment, we trace with ``China ink'' on a paper 51 parallel lines with a length of i. e. 20~cm, where the distance between two adjacent lines increases from 2~mm (between the first two lines) to 3~mm (between the last two lines), following the formula:
\begin{equation*}
s=2t+0.01t^2
\end{equation*}

\indent We take a photo by reducing to the half or a quarter. We generate two diapositives\footnote{spelling of the time.}. We realize the phenomenon when placing one over the other by rotating one of them.

We think that if you had followed the given instructions, you might be as well convinced---as we are---it would have been a pity to have left this beautiful demonstration ``of that time'' in oblivion!


\subsection{The humble contributions of our group}

These demonstrations contain:
\begin{enumerate}
\item the moirés of Newton. In fact it is a construction similar to that of the Fresnel rings. Here the progression of the squares is such that the areas between two consecutive squares are equal to the area of the central square. One out of every two intervals is made opaque. The resulting moiré figures are equilateral hyperbolas.
\item the moirés obtained by the superposition of Fresnel rings and a network of parallel lines result as well in Fresnel rings.
\end{enumerate}
The source files (\LaTeX) and pdf are found within the repository:
\begin{center}
\url{http://melusine.eu.org/syracuse/G/pstricks/pst-moire/moiredoc/}
\end{center}


\subsection{The construction of a Gauss network}

This method is discussed on page 136 of the book ``\textit{Les phénomènes naturels}'' edited in 1978 by the revue ``\textit{Pour la Science}'' and distributed by the Berlin editions.
\begin{quote}\itshape
<<~The Gauss network is obtained by drawing a series of equidistant vertical lines on a Gaussian curve, then by drawing parallel oblique lines passing through the points of intersection between the vertical lines and the Gaussian curve.~>>
\end{quote}


\subsubsection{Gaussian curve}

\begin{equation*}
y=a\mathrm{e}^{-(kx)^2}
\end{equation*}
\begin{center}
\begin{pspicture}(-6,-1)(6,3.5)
\psparametricplot[plotpoints=1000]{-6}{6}{%
                  t
                  3 2.71828 -0.5 t dup mul mul exp mul
                  }
\end{pspicture}
\end{center}


\subsubsection{Determination of the points of intersection}

The equidistant vertical line network has for equation: $x=ne$, $e$ is the spacing et $n$ an integer.

The ordinates of the intersection points are: $y_n=a\mathrm{e}^{-(kne)^2}$. Within the following figure, we set the spacing to 0.5.
\begin{center}
\begin{pspicture}(-6,-1)(6,3.5)
\parametricplot[plotpoints=1000]{-6}{6}{%
                  t
                  3 2.71828 0.5 t mul dup mul neg exp mul
                  }
\pstVerb{/A1 3 def
         /K1 0.5 def
         /E1 0.5 def
         /Alpha 70 def
         /m1 {Alpha dup sin exch cos div} bind def
}%
\multido{\n=-12+1}{25}{%
%\pstVerb{/B1 {A1 2.71828 K \n\space mul E1 mul dup mul neg exp \n\space E mul m1 mul sub} def}%
 \psdot(! \n\space E1 mul % x
         A1 2.71828 K1 \n\space E1 mul mul dup mul neg exp mul)
  }
\end{pspicture}
\end{center}


\subsubsection{Drawing the network of the stright lines}

We determine the equations of the straight lines passing through these points and which are inclined by an angle $\alpha$ with respect to the horizontal.

The general equation of such a line is given by: $y=x\tan(\alpha)+b$, we determine $b$ to go through one of the previous points.
\begin{equation*}
ne\tan(\alpha)+b=a\mathrm{e}^{-(kne)^2}
\end{equation*}
so we get $b$.
\begin{equation*}
b=a\mathrm{e}^{-(kne)^2}-ne\tan(\alpha)
\end{equation*}
For every value of $n$ we get a straight line.
\begin{equation*}
y=x\tan(\alpha)+a\mathrm{e}^{-(kne)^2}-ne\tan(\alpha)
\end{equation*}
Let's draw some of these straight lines. Setting $a=3$, $k=0.5$, $-20<n<+20$, $e=0.5$ and $\alpha=70^{\mathrm{o}}$

\begin{center}
\begin{pspicture*}(-6,-1)(6,10)
\parametricplot[plotpoints=1000,linecolor=red]{-6}{6}{%
                  t
                  3 2.71828 0.5 t mul dup mul neg exp mul}
\pstVerb{/A1 3 def
         /K1 0.5 def
         /E1 0.5 def
         /Alpha 70 def
         /m1 {Alpha dup sin exch cos div} bind def % pente de la droite
}%
\multido{\n=-20+1}{41}{%
\pnode(! \n\space E1 mul % x
         A1 2.71828 K1 \n\space E1 mul mul dup mul neg exp mul){A}
 \psdot(A)
\rput(A){\psline(! -4 -4 m1 mul)(! 4 4 m1 mul)}
  }
\end{pspicture*}
\end{center}
\begin{verbatim}
\begin{pspicture*}(-6,-1)(6,10)
\parametricplot[plotpoints=1000,linecolor=red]{-6}{6}{%
                  t
                  3 2.71828 0.5 t mul dup mul neg exp mul}
\pstVerb{/A 3 def
         /K 0.5 def
         /E 0.5 def
         /Alpha 70 def
         /m {Alpha dup sin exch cos div} bind def % pente de la droite
}%
\multido{\n=-20+1}{41}{%
\pnode(! \n\space E mul % x
         A 2.71828 K \n\space E mul mul dup mul neg exp mul){A}
 \psdot(A)
\rput(A){\psline(! -4 -4 m mul)(! 4 4 m mul)}
  }
\end{pspicture*}
\end{verbatim}
The last step is to translate these lines into PostScript code.


\subsection{Some moiré figures}

\subsubsection{Circles + Circles}

\begin{center}
\psscalebox{0.6}{%
\begin{pspicture*}(-6,-6)(6,6)
\psset{dimen=middle}
\multido{\rA=0.5+0.5}{11}{%
\pscircle(-2,0){!\rA\space}
\pscircle(2,0){!\rA\space}
}%
\end{pspicture*}
}
\hfill
\psscalebox{0.6}{%
\begin{pspicture*}(-6,-6)(6,6)
\psset{linecolor={[cmyk]{0.5 0 0 0.5}},dimen=middle}
\multido{\rA=0.5+0.5}{11}{%
\pscircle(-2,0){!\rA\space}
\pscircle(2,0){!\rA\space}
}%
\pstVerb{/C1 2 def
         /K1 0.5 def}%
\multido{\iH=-7+1,\iE=9+1}{15}{%
\pstVerb{/A1 K1 \iH\space mul 2 div def
         /B1 C1 dup mul A1 dup mul sub sqrt def}%
\parametricplot[linecolor=red]{-2}{2}{%
    A1 t COSH mul
    B1 t SINH mul}
\pstVerb{/A1 K1 \iE\space mul 2 div def
         /B1 A1 dup mul C1 dup mul sub sqrt def}
\parametricplot[linecolor=gray,linestyle=dashed]{0}{360}{%
    A1 t sin mul
    B1 t cos mul}}
\end{pspicture*}
}
\end{center}
\textbf{Mathematization}

Equidistant radii that increase like: $r_n=n\cdot a$, with $a>0$.

We have
\begin{align*}
(x-c)^2+y^2&=k^2p^2\\
(x+c)^2+y^2&=k^2q^2
\end{align*}
It is necessarily: $p-q=m\in\mathbb{Z}$, thus
\begin{align*}
p&=\frac{1}{k}\sqrt{(x-c)^2+y^2}\\
q&=\frac{1}{k}\sqrt{(x+c)^2+y^2}
\end{align*}
and $p-q=m$
\begin{gather*}
\sqrt{(x-c)^2+y^2}-\sqrt{(x+c)^2+y^2}= k m\\
r_p=p\cdot k\qquad r_q=q\cdot k\\
r_p-r_q=(p-q)\cdot k=m\cdot k
\end{gather*}
The points of the moiré curves are such that the difference in distances to the two centers is constant. The moiré curves are hyperbolas focussing the centers of circles.

We pose: $a=\frac{km}{2}$ and $b^2=c^2-a^2$. The equations of this family of hyperbolas are written like:
\begin{align*}
x&=a\cosh(t)\\
y&=b\sinh(t)
\end{align*}
or:
\begin{align*}
x&=\frac{a}{\cos(t)}\\
y&=b\tan(t)
\end{align*}
If we go from a point of intersection $(p,q)$ to a point $(p+1,q-1)$, the sum of the distances remains constant. As a result, we say:
\begin{equation*}
r_p+r_q=(p+q)\cdot k=n\cdot k
\end{equation*}
This family of moiré curves are ellipses with equations like:
\begin{equation*}
x=a\cos(t)\quad y=b\sin(t)
\end{equation*}
with:
\[
b^2=a^2-c^2
\]


\subsubsection{Squares + Fresnel rings}

\begin{center}
%\psset{scale=0.5,Rmax=7.5}
\psscalebox{0.6}{%
\begin{pspicture}(-6,-6)(6,6)
\psmoire[type=square]
\psmoire[type=Fresnel]
\end{pspicture}
}
\hfill
\psscalebox{0.6}{%
\begin{pspicture}(-6,-6)(6,6)
\psset{linecolor={[cmyk]{0.5 0 0 0.5}},dimen=middle}
\multido{\rA=1+1}{22}{%
\pscircle{!\rA\space sqrt}
}%
\multido{\ri=0.25+0.25}{18}{%
\psline(!\ri\space 5.8 neg)(!\ri\space 5.8)
}%
\multido{\iA=0+-1}{4}{%
\pscircle[linecolor=red](2,0){!4 \iA\space add sqrt}
}
\end{pspicture}
}
\end{center}

\textbf{Mathematization}

The abscissa of the edges of the square with $x>0$ increase with: $x_n=a\cdot n$, with $a>0$

The radii increase with: $r_n=\sqrt{n}$.

We have
\begin{align*}
x&=ap\\
x^2+y^2&=q
\end{align*}
\begin{align*}
p&=\frac{x}{a}\\
q&=x^2+y^2
\end{align*}
On a curve of moiré, we verify: $p-q=m\in\mathbb{Z}$:
\begin{equation*}
\left(x-\frac{1}{2a}\right)^2+y^2=m+\frac{1}{4a^2}
\end{equation*}
This family of moiré curves are circles with the center at $(\frac{1}{2a},0)$ and with a radius of $r_m=\sqrt{m+\frac{1}{4a^2}}$


\subsubsection{Circle + Squares of Newton}

\begin{center}
%\psset{scale=0.5,Rmax=7.5}
\psscalebox{0.6}{%
\begin{pspicture}(-6,-6)(6,6)
\psmoire[type=circle]
\psmoire[type=Newton]
\end{pspicture}
}
\hfill
\psscalebox{0.6}{%
\begin{pspicture}(-6,-6)(6,6)
\psset{linecolor={[cmyk]{0.5 0 0 0.5}},dimen=middle}
\multido{\rA=0.25+0.25}{22}{%
\pscircle{!\rA\space}
}%
\multido{\i=1+1}{33}{%
\psline(!\i\space sqrt 5.8 neg)(!\i\space sqrt 5.8)
}%
\psplotImp[algebraic,linecolor=red](1,-5)(5.8,5){x^2-4*sqrt(x^2+y^2)+7}
\psplotImp[algebraic,linecolor=red](1,-5)(5.8,5){x^2-4*sqrt(x^2+y^2)+6}
\psplotImp[algebraic,linecolor=red](1,-5)(5.8,5){x^2-4*sqrt(x^2+y^2)+5}
\psplotImp[algebraic,linecolor=red](1,-5)(5.8,5){x^2-4*sqrt(x^2+y^2)+4}
\psplotImp[algebraic,linecolor=red](1,-5)(5.8,5){x^2-4*sqrt(x^2+y^2)+3}
\psplotImp[algebraic,linecolor=red](1,-5)(5.8,5){x^2-4*sqrt(x^2+y^2)+2}
\psplotImp[algebraic,linecolor=red](1,-5)(5.8,5){x^2-4*sqrt(x^2+y^2)+1}
\psplotImp[algebraic,linecolor=red](1,-5)(5.8,5){x^2-4*sqrt(x^2+y^2)+0}
\end{pspicture}
}
\end{center}

\textbf{Mathematization}

The abscissa of the edges of the square with $x>0$ increase with: $x_n=\sqrt{n}$.

The radii increase with: $r_n=n\cdot a$, with $a>0$.

\begin{minipage}[t]{0.3\linewidth}\kern0pt
We have:
\begin{align*}
x&=\sqrt{p}\\
x^2+y^2&=a^2q^2
\end{align*}
It is necessarily: $p-q=m\in\mathbb{Z}$, thus
\begin{align*}
p&=x^2\\
q&=\frac{1}{a}\sqrt{x^2+y^2}
\end{align*}
and $p-q=m$
\begin{equation*}
x^2-\frac{1}{a}\sqrt{x^2+y^2}=m
\end{equation*}
In polar coordinates:
\begin{gather*}
\rho^2(\cos\theta)^2-\frac{\rho}{a}-m=0\\
\Delta=\left(\frac{-1}{a}\right)^2+4m(\cos\theta)^2\\
\rho=\frac{\frac{1}{a}\pm\sqrt{\Delta}}{2(\cos\theta)^2}
\end{gather*}
\end{minipage}
\hfill
\begin{minipage}[t]{0.65\linewidth}\kern0pt
\psscalebox{0.7}{%
\begin{pspicture*}(-6,-6)(6,6)
\psset{linecolor={[cmyk]{0.5 0 0 0.5}},dimen=middle}
\multido{\rA=0.25+0.25}{30}{%
\pscircle{!\rA\space}
}%
\multido{\i=1+1}{40}{%
\psline(!\i\space sqrt 6 neg)(!\i\space sqrt 6)
}%
\pstVerb{/A1 0.25 def % 1/0.25
         /A_1 1 A1 div def
         /Delta {A_1 dup mul 4 m neg mul x cos dup mul mul sub sqrt} def}%
\multido{\im=5+-1}{10}{%
\pstVerb{/m \im\space def}%
\psplot[polarplot=true,plotpoints=361,linecolor=red]{-89}{89}{%
          A_1 neg Delta add x cos dup mul 2 mul div neg }
\psplot[polarplot=true,plotpoints=361,linecolor=red]{-89}{89}{%
          A_1 neg Delta sub x cos dup mul 2 mul div abs }%
}
\end{pspicture*}
}
\end{minipage}



\subsubsection{Circles + Fresnel rings}

\begin{center}
%\psset{scale=0.5}
\psscalebox{0.6}{%
\begin{pspicture}(-6,-6)(6,6)
\psmoire[type=Fresnel](0.2,0)
\psmoire[type=circle](-0.2,0)
\end{pspicture}
}
\hfill
\psscalebox{0.6}{%
\begin{pspicture}(-6,-6)(6,6)
\psset{linecolor={[cmyk]{0.5 0 0 0.5}}}
\multido{\rA=0.25+0.25}{22}{%
\pscircle(-0.2,0){!\rA\space}
}%
\multido{\iA=1+1}{31}{%
\pscircle(0.2,0){!\iA\space sqrt}
}%
\psset{linewidth=1.5\pslinewidth}
\psplotImp[algebraic,linecolor=red](-5.8,-5)(5.8,5){(x-0.2)^2+y^2-4*sqrt((x+0.2)^2+y^2)+1}
\psplotImp[algebraic,linecolor=red](-5.8,-5)(5.8,5){(x-0.2)^2+y^2-4*sqrt((x+0.2)^2+y^2)+2}
\psplotImp[algebraic,linecolor=red](-5.8,-5)(5.8,5){(x-0.2)^2+y^2-4*sqrt((x+0.2)^2+y^2)+3}
\psplotImp[algebraic,linecolor=red](-5.8,-5)(5.8,5){(x-0.2)^2+y^2-4*sqrt((x+0.2)^2+y^2)+4}
\psplotImp[algebraic,linecolor=red](-5.8,-5)(5.8,5){(x-0.2)^2+y^2-4*sqrt((x+0.2)^2+y^2)+5}
\end{pspicture}
}
\end{center}

\textbf{Mathematization}

The radii of the Fresnel circles increase: $r_n=\sqrt{n}$.

The radii of the equidistant circles increase: $r_n=n\cdot a$, with $a>0$.

The centers of the circles are placed at $(x_M,0)$ and $(-x_M,0)$, we have $p$ and $q$ as integers:
\begin{align*}
(x-x_M)^2+y^2&=p\\
(x+x_M)^2+y^2&=a^2q^2\\
p&=(x-x_M)^2+y^2\\
q&=\frac{1}{a}\sqrt{(x+x_M)^2+y^2}
\end{align*}
One moiré curve line is determined by:  $p-q=m\in\mathbb{Z}$, thus:
\begin{equation*}
(x-x_M)^2+y^2-\frac{1}{a}\sqrt{(x+x_M)^2+y^2}=m
\end{equation*}
which is the implicit equation of a moiré curve line with $m$.


\subsubsection{Circles + Squares (both of increasing thickness)}

\begin{center}
\psscalebox{0.6}{%
\def\epaisseur{0.0075}
\begin{pspicture}(-6,-6)(6,6)
\psset{dimen=middle}
\pstVerb{/Radius 0.25 def}%
\multido{\i=1+1}{41}{%
\FPeval\epaisseur{1.08*(\epaisseur)}
\psset{linewidth=\epaisseur}
\pscircle{!Radius}
\pstVerb{/Radius Radius 1.08 mul def}%
}%
\pstVerb{/Radius 0.25 def}%
\multido{\i=1+1}{33}{%
\FPeval\epaisseur{1.1*(\epaisseur)}
\psset{linewidth=\epaisseur}
\psframe(!Radius neg Radius neg)(!Radius Radius)
\pstVerb{/Radius Radius 1.1 mul def}%
}%
\end{pspicture}
}
\hfill
\psscalebox{0.6}{%
\begin{pspicture}(-6,-6)(6,6)
\psset{linecolor={[cmyk]{0.5 0 0 0.5}},dimen=middle}
\pstVerb{/Radius 0.25 def}%
\multido{\i=1+1}{41}{%
\pscircle{!Radius}
\pstVerb{/Radius Radius 1.08 mul def}%
}%
\pstVerb{/Radius 0.25 def}%
\multido{\i=1+1}{33}{%
\psline(!Radius 5.8 neg)(!Radius 5.8)
\pstVerb{/Radius Radius 1.1 mul def}%
}%
\psplotImp[algebraic,linecolor=red](0,-6)(5,6){((4*x)^(1/ln(1.1)))/((16*(x^2+y^2))^(1/ln((1.08)^2)))-Euler^(-6)}
\psplotImp[algebraic,linecolor=red](0,-6)(5,6){((4*x)^(1/ln(1.1)))/((16*(x^2+y^2))^(1/ln((1.08)^2)))-Euler^(-5)}
\psplotImp[algebraic,linecolor=red](0,-6)(5,6){((4*x)^(1/ln(1.1)))/((16*(x^2+y^2))^(1/ln((1.08)^2)))-Euler^(-4)}
\end{pspicture}
}
\end{center}

\textbf{Mathematization}

The abscissa of the edges of the square with $x>0$ increase with: $x_n=\frac{1}{4}a^n$, with $a>1$.

The radii increase with: $r_n=\frac{1}{4}b^n$, with $b>1$.

We have
\begin{align*}
x_p&=\frac{1}{4}a^p\\
r_q^2&=x^2+y^2\\
x^2+y^2&=\frac{1}{16}b^{2q}
\end{align*}
If we consider the point determined by the intersection $p\cap q$, the next point will be $(p+1)\cap (q+1)$, the next one at $(p+2)\cap (q+2)$, etc., so that the difference between the indices remains constant. As a result, the moiré lines are characterized by the relation $p-q=m \in \mathbb{Z}$, $m$ determines a moiré curve.
\begin{align*}
p&=\frac{\ln(4x)}{\ln a}\\
q&=\frac{\ln[16(x^2+y^2)]}{2\ln b}
\end{align*}
and $p-q=m$
\begin{equation*}
\ln(4x)^{\frac{1}{\ln a}}-\ln[16(x^2+y^2)]^{\frac{1}{2\ln b}}=m
\end{equation*}
finally gives
\begin{equation*}
\frac{(4x)^{\frac{1}{\ln a}}}{[16(x^2+y^2)]^{\frac{1}{2\ln b}}}=\text{e}^m
\end{equation*}
We transform this implicit equation into a polar equation by setting $\rho^2=x^2+y^2$ and $x=\rho\cos\theta$.
%Remarquons que pour le point $(x=0,y=0)$ correspond à $\theta=\pi/2$.

Setting $\alpha=\frac{1}{\ln a}$ and $\beta=\frac{1}{2\ln b}$. The equation becomes:
\begin{gather*}
\frac{\rho^\alpha(\cos\theta)^\alpha\cdot 4^{\alpha}}{\rho^{2\beta}\cdot 4^{2\beta}}=\text{e}^m\\
\rho^{\alpha-2\beta}(\cos\theta)^\alpha=\text{e}^m\cdot 4^{2\beta-\alpha}\\
\rho=\frac{1}{4}\left(\frac{\mathrm{e}^m}{(\cos\theta)^{\alpha}}\right)^{\frac{1}{\alpha-2\beta}}
\end{gather*}
We can trace some elements of this family of curves:\label{sec:theoryEnd}
\begin{center}
\psscalebox{0.6}{%
\begin{pspicture*}(-6,-6)(6,6)
\psset{linecolor={[cmyk]{0.5 0 0 0.5}},dimen=middle}
\pstVerb{/Radius 0.25 def}%
\multido{\i=1+1}{41}{%
\pscircle{!Radius}
\pstVerb{/Radius Radius 1.08 mul def}%
}%
\pstVerb{/Radius 0.25 def}%
\multido{\i=1+1}{33}{%
\psline(!Radius 5.8 neg)(!Radius 5.8)
\pstVerb{/Radius Radius 1.1 mul def}%
}%
\pstVerb{/alpha 1 1.1 ln div def
         /beta 1 1.08 ln 2 mul div def
         /a_b 1 alpha 2 beta mul sub div def
         /A {2.718 m exp a_b exp 0.25 mul} def }%
\multido{\im=-14+1}{14}{%
\pstVerb{/m \im\space def}%
\psplot[polarplot=true,plotpoints=361,linecolor=red]{-89}{89}{%
          A x cos alpha neg a_b mul exp mul}%
}
\end{pspicture*}
}
\end{center}


\newpage


\section{List of all optional arguments for \texttt{pst-moire}}

\xkvview{family=pst-moire,columns={key,type,default}}

\clearpage

\nocite{*}
\bgroup
\RaggedRight
\printbibliography
\egroup

\printindex
\end{document}