summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.tex
blob: 40b3120a3ea21510ad2953377dec28936e08e951 (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
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                                                   %%
%% This is file `pst-marble-doc.tex'                                 %%
%%                                                                   %%
%% IMPORTANT NOTICE:                                                 %%
%%                                                                   %%
%% Package `pst-marble'                                              %%
%%                                                                   %%
%% Aubrey Jaffer with the help of Jürgen Gilg and Manuel Luque       %%
%% Email address: agj@alum.mit.edu                                   %%
%% Copyright (C) 2018-2019  Aubrey Jaffer                            %%
%%                                                                   %%
%% 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-marble' is a PSTricks package to draw marble-like patterns %%
%%                                                                   %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\listfiles

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

\usepackage[autostyle]{csquotes}
\usepackage{biblatex}
%\usepackage[style=dtk]{biblatex}
\addbibresource{pst-marble-doc.bib}
\usepackage[utf8]{inputenc}
\let\pstpersFV\fileversion
\usepackage{pst-marble,pst-lens,pstricks-add}
\usepackage{amsmath,amssymb,animate}

\let\belowcaptionskip\abovecaptionskip
\parindent0pt

\begin{document}

\title{pst-marble v 1.3a}
\subtitle{A PSTricks package to draw marble-like patterns}
\author{
    Aubrey \textsc{Jaffer}\\
    with the help of\\
    Jürgen \textsc{Gilg}\\
    Manuel \textsc{Luque}
}

\date{\today}
\maketitle
\tableofcontents

\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.}


\psset{unit=1cm}


\clearpage


\begin{abstract}
Marbling originated in Asia as a decorative art more than 800 years ago and spread to Europe in the 1500s where it was used for end-papers and book covers. 
The mathematical fascination with paint marbling is that while rakings across the tank stretch and deform the paint boundaries, they do not break or change the topology of the surface.  With mechanical guides, a raking can be undone by reversing the motion of the rake to its original position.  Raking is thus a physical manifestation of a homeomorphism, a continuous function between topological spaces (in this case between a topological space and itself) that has a continuous inverse function.

\begin{center}
\begin{pspicture}(-8,-6)(6,6)
  \psMarble[
    background={
      [1 1 1]
    },
    colors={
      [0.176 0.353 0.129]
      [0.635 0.008 0.094]
      [0.078 0.165 0.518]
      [0.824 0.592 0.031]
      [0.059 0.522 0.392]
      [0.816 0.333 0.475]
    },
    viscosity=1000,
    actions={
      0 0 24 colors 36 concentric-rings
      180 [ 20 50 25 tines ] 40 200 31 rake
      0 350 shift
      0 270 0 -120 wiggle
      180 [ 3 600 -150 tines ] 40 200 31 rake
      0 270 0 240 wiggle
      180 [ 3 600 150 tines ] 40 200 31 rake
      0 270 0 -120 wiggle
    }
  ](12,12)
\psframe(-8,-6)(6,6)
\rput{90}(-7,0){\parbox{10cm}{\centering\bf\Large Marbling effects by Aubrey Jaffer\\ and PSTricks}}
\end{pspicture}
\end{center}
{\tiny\begin{verbatim}
\begin{pspicture}(-8,-6)(6,6)
  \psMarble[background={[1 1 1]},
    colors={
      [0.176 0.353 0.129][0.635 0.008 0.094]
      [0.078 0.165 0.518][0.824 0.592 0.031]
      [0.059 0.522 0.392][0.816 0.333 0.475]
    },
    actions={
      0 0 24 colors 36 concentric-rings
      180 [ 20 50 25 tines ] 40 200 31 rake
      0 350 shift
      0 270 0 -120 wiggle
      180 [ 3 600 -150 tines ] 40 200 31 rake
      0 270 0 240 wiggle
      180 [ 3 600 150 tines ] 40 200 31 rake
      0 270 0 -120 wiggle
    }
  ](12,12)
\psframe(-8,-6)(6,6)
\rput{90}(-7,0){\parbox{10cm}{\centering\bf\Large Marbling effects by Aubrey Jaffer\\ and PSTricks}}
\end{pspicture}
\end{verbatim}}
\end{abstract}


\clearpage


\section{History and Introduction}

%Aubrey Jaffer finds a similarity between whirlwinds in the great spot of jupiter and those that appear in some marbled papers.
%\begin{center}
%\url{http://voluntocracy.blogspot.com/2018/08/}
%\end{center}
%You can see a swirl on a marbled paper at Wikipedia:
%\begin{center}
%\url{https://fr.wikipedia.org/wiki/Papier_marbr%C3%A9#/media/File:PaperMarbling003France1880Detail.jpg}
%\end{center}
%
%It is true that in both cases, although at very different scales, the laws of fluid mechanics apply.

Aubrey Jaffer's article on the physical and mathematical interpretation of the formation of various types of marbling:
\begin{center}
\url{https://arxiv.org/abs/1702.02106}
\end{center}
Aubrey Jaffer has improved the model shown in the previous version of \texttt{pst-marble}. Now it is closer to reality and more consistent in the choice of units. This version allows to perform more accurate simulations, however with some new parameters, which will be explained.

But then everything will depend on your patience, your talent so that we can exclaim looking at one of your achievements:
\begin{quote}\itshape
``Beautiful, it's a big piece of art that you have done!''
\end{quote}
Many articles deal with marbled paper techniques which are used to adorn bindings and book covers.

Here a link to an article devoted to it by the famous \emph{Encyclopaedia of Diderot and D'Alembert}.
\begin{center}
\url{https://fr.wikisource.org/wiki/L%E2%80%99Encyclop%C3%A9die/1re_%C3%A9dition/MARBREUR_DE_PAPIER}
\end{center}

Aubrey Jaffer and some computer scientists working with him or on their own, tried to understand and model marblings that appear when the artist uses a stylus which he moves the tip on a surface of liquid. As a result in its wake, the drops it encounters get deformed and will also influence the shape of their neighbors according to the properties of the medium (viscosity), the speed of the movement of the stylus, and the nature of its trajectory: line segment, line crossing the whole tank, bow on a circle, ripples, swirls, etc.

The artist can also use a comb (rake) whose spacing between teeth can be adjusted to make more complex figures. These studies follow the laws of fluid mechanics to model and thus be able to create realistic simulations of marbling.

On Aubrey Jaffer's website, we'll find many links concerning the theoretical studies.
\begin{center}
\url{http://people.csail.mit.edu/jaffer/Marbling/}
\end{center}
Compared to the previous version, Aubrey Jaffer has reviewed some parameters:

\texttt{vortex} now models a Lamb-Oseen vortex. We'll refer to the article he wrote to study the theory:
\begin{center}
\url{https://arxiv.org/abs/1810.04646}
\end{center}
The documentation illustrates the parameters that are now used:

Center coordinates in mm, circulation in $\mathrm{mm^2/s}$ and time in s.

The primitive \texttt{line} has now become \texttt{rake} and allows to represent the obtained image when the artist equips himself with a comb (rake) having a certain number of identical teeth of a given diameter. He places the comb perpendicularly to a direction fixed by the angle made with the $y$-axis (the angle is positive clockwise) and moves it with a speed of (\texttt{V}) along the indicated direction or contrary to it, depending on the sign of the parameter \texttt{tU}. The positions of the teeth are fixed by the distances (in mm) indicated within the list [between the brackets]---the comb/rake can also have only one tooth.

By default, the tank's dimensions are 1 m $\times$ 1 m. The scaling factor of the image is 0.1. All lengths are in mm, velocities (in mm/s), angles (in degrees), angular velocity (in degrees/s), and viscosity and circulation (in $\mathrm{mm^2/s}$).

For a convex stylus (or tine), \texttt{D} (in mm) is the ratio of its submerged volume to its wetted surface area. For a long cylinder it is its diameter.

Aubrey Jaffer retains 1 global parameter: the dynamic viscosity, see in particular the document ``Oseen Flow in Paint Marbling'':
\begin{center}
\url{https://arxiv.org/abs/1702.02106}
\end{center}
There are 13 types of actions defined and ready to use:
\begin{verbatim}
    drop
    line-drops
    serpentine-drops
    coil-drops
    Gaussian-drops
    uniform-drops
    concentric-rings
    rake
    stylus
    stir
    vortex
    wiggle
    shift
\end{verbatim}
They make it possible to create a very large variety of marblings with combinations of the various actions.

Initially there are drops of colors that the artist spreads with a brush on the surface (a bit of a hazard, even if they are located in a given region) and whose size depends on the brush. He performs the operation several times with other colors and also brushes of different sizes. These single drops, circular in shape, are placed with the following command
\begin{verbatim}
    0 0 100 [0 0 1] drop
\end{verbatim}
Note, that the coordinates (\texttt{cx, cy}) of the center of the drop and its radius \texttt{r} are in points, the colors need to be setup in the rgb-color-system: (values between 0 and 1). Details are given in the following sections. So this is the first phase: arrange the drops on the surface in several stages with different radii and colors. To facilitate the experimentation of different types of actions, Aubrey Jaffer imagined an initial background obtained by dropping (one after the other) drops of different colors (we can also differentiate their radii) at the same point, they all have the same center, we then obtain an initial background consisting of concentric rings, named ``concentric-rings''.

Aubrey Jaffer coded all the possible simulations with the expected deformations (rake, stylus, stir, wiggle, vortex) in pure PostScript and his new code, perfectly structured, and whose use is very simple, would be enough to itself, if it weren't necessary for each test, to add lines, delete others, save them within the original PostScript file \ldots

Therefore, Manuel Luque and Jürgen Gilg have decided to adapt that into PSTricks (with the agreement of Aubrey Jaffer). A \verb+\psMarble+ command to switch easily between the different types of actions and add a global viscosity parameter to the PostScript code. There are two ways to calculate and represent the drops.
\begin{itemize}
\item We are interested only in their contour whose transformation is calculated after each addition of a new drop and whose interior is colored with its color (each drop retains its color);
\item in the second case we consider the surface as a grid of points (square pixels of side 1 pt) and each drop is represented by the points situated between its edges.
\end{itemize}
When a new drop is placed, the points in that drop retain their color, the outer points are calculated before being assigned their initial color. This possibility is operational by taking a negative value for the viscosity.

The documentation contains, of course, some more other information than within this short introduction and is likely to be reworked and completed as well as the code.


\newpage


\section{Techniques}

\subsection{Drop paint}

The first drop of paint placed within water forms a circle with the area $a$. If a second drop with the area $b$ is placed within the center of the first drop, the total area increases from $a$ to $a+b$. For the first drop, points very close to the center will change from an infinitely small radius to a radius $\sqrt{b/\pi}$; and the points on the border of the circle will change from $\sqrt{a/\pi}$ to $\sqrt{(a+b)/\pi)} $. If we take 2 or more drops of different colors, this gives:
\begin{center}
\begin{pspicture}(-2,-2)(2,2)
\psMarble[viscosity=120,
   background={[1 1 1]},
   actions={
       0 0 100 [0 0 1] drop
           }
         ](4,4)
\psgrid[subgriddiv=0,gridcolor=red!30,subgridcolor=green,gridlabels=0pt,griddots=10]
\end{pspicture}
%\hfill
\begin{pspicture}(-2,-2)(2,2)
\psMarble[viscosity=120,
   background={[1 1 1]},
   actions={
       0 0 200 [0 0 1] drop
       0 0 150 [1 0 0] drop
           }
         ](4,4)
\psgrid[subgriddiv=0,gridcolor=red!30,subgridcolor=green,gridlabels=0pt,griddots=10]
\end{pspicture}
%\hfill
\begin{pspicture}(-2,-2)(2,2)
\psMarble[viscosity=120,
   background={[1 1 1]},
   actions={
       0 0 200 [0 0 1] drop
       0 0 150 [1 0 0] drop
       0 0 100 [0 1 0] drop
           }
         ](4,4)
\psgrid[subgriddiv=0,gridcolor=red!30,subgridcolor=green,gridlabels=0pt,griddots=10]
\end{pspicture}
\end{center}
The command to drop a drop is written as follows:
\begin{verbatim}
    0 0 100  [0 0 1] drop
\end{verbatim}
Note that the coordinates of the center of the drop and its radius are in points\footnote {There is a scaling. Example: if the largest dimension of the page is 4, 100 pts will be represented 0.4 cm} and its color is in the system rgb: (values between 0 and 1).

When we place the second drop of radius $r$ at the point $C(cx,cy)$, Aubrey Jaffer considers that this one remains round, intact, but that the first then undergoes the influence of the second and deforms according to the law:
\[
\vec P'=\vec C+\left(\vec P-\vec C\right)\sqrt{1+{r^2\over \left\|\vec P-\vec C\right\|^2}}
\]
$P(x,y)$ is a point of the first drop and $P'(x',y')$ the transformed point.
\begin{center}
\begin{pspicture}(-2,-2)(2,2)
\psMarble[viscosity=120,
   background={[1 1 1]},
   actions={
       0 0 150 [0 0 1] drop
           }
         ](4,4)
\rput(0,0){\white 1}
\psgrid[subgriddiv=0,gridcolor=red!30,subgridcolor=green,gridlabels=0pt,griddots=10]
\end{pspicture}
\hspace{1cm}
\begin{pspicture}(-2,-2)(2,2)
\psMarble[viscosity=120,
   background={[1 1 1]},
   actions={
       0 0 150 [0 0 1] drop
       -250 0 150 [1 0 0] drop
           }
         ](4,4)
\rput(0,0){\white 1}
\rput(!-250 0.004 mul 0){2}
\psgrid[subgriddiv=0,gridcolor=red!30,subgridcolor=green,gridlabels=0pt,griddots=10]
\end{pspicture}
\end{center}
If a third drop is placed, the two previous drops will then be influenced by the third, which remains intact.
\begin{center}
\begin{pspicture}(-2,-2)(2,2)
\psMarble[viscosity=120,
   background={[1 1 1]},
   actions={
       0 0 150 [0 0 1] drop
           }
         ](4,4)
\rput(0,0){\white 1}
\psgrid[subgriddiv=0,gridcolor=red!30,subgridcolor=green,gridlabels=0pt,griddots=10]
\end{pspicture}
\begin{pspicture}(-2,-2)(2,2)
\psMarble[viscosity=120,
   background={[1 1 1]},
   actions={
       0 0 150 [0 0 1] drop
       -250 0 150 [1 0 0] drop
           }
         ](4,4)
\rput(0,0){\white 1}
\rput(!-250 0.004 mul 0){2}
\psgrid[subgriddiv=0,gridcolor=red!30,subgridcolor=green,gridlabels=0pt,griddots=10]
\end{pspicture}
\begin{pspicture}(-2,-2)(2,2)
\psMarble[viscosity=120,
   background={[1 1 1]},
   actions={
       0 0 150 [0 0 1] drop
       -250 0 150 [1 0 0] drop
       250 0 150 [0 1 0] drop
           }
         ](4,4)
\rput(0,0){\white 1}
\rput(!-250 0.004 mul 0){2}
\rput(!250 0.004 mul 0){3}
\psgrid[subgriddiv=0,gridcolor=red!30,subgridcolor=green,gridlabels=0pt,griddots=10]
\end{pspicture}
\end{center}
All drops are influenced by the last drop deposited.


\subsection{Random drops}

One of the techniques is to project with a brush drops of color on the surface of the liquid in several stages by changing color. The position of the drops is therefore random. Each drop influences its neighbors and assuming that initially the drops would form a round spot on the surface, they will deform depending on the size and proximity of neighbors. The modeling of this phenomenon has been studied in the document ``\textit{Mathematical Marbling}'' by Shufang Lu, Aubrey Jaffer, Xiaogang Jin, Hanli Zhao and Xiaoyang Mao.
\begin{center}
\url{http://people.csail.mit.edu/jaffer/Marbling/Mathematics}
\end{center}
\begin{center}
\url{https://www.computer.org/csdl/mags/cg/2012/06/mcg2012060026-abs.html}
\end{center}
Then, with a fine stick, a comb one tries to draw the marbling.

The following example illustrates that technique. Three steps with drops of different size and color on which 2 swirls are applied.

\begin{minipage}[t]{6cm}\kern0pt
\begin{pspicture}(-3,-4)(3,4)
\psMarble[%
    actions={
    0 0 1000 1000 0 [0.960 0.764 0.576] 125 30 uniform-drops
    0 0 1000 1000 0 [0.270 0.035 0.058] 100 25 uniform-drops
    0 0 1000 1000 0 [0.866 0.353 0.000] 150 20 uniform-drops
    300 200 -32e2 750 vortex
    0 -300 32e2 750 vortex
 }](6,8)
\end{pspicture}
\end{minipage}
\hfill
\begin{minipage}[t]{11cm}\kern0pt
{\small\begin{verbatim}
\begin{pspicture}(-3,-4)(3,4)
\psMarble[%
    actions={
    0 0 1000 1000 0 [0.960 0.764 0.576] 125 30 uniform-drops
    0 0 1000 1000 0 [0.270 0.035 0.058] 100 25 uniform-drops
    0 0 1000 1000 0 [0.866 0.353 0.000] 150 20 uniform-drops
    300 200 -32e2 750 vortex
    0 -300 32e2 750 vortex
 }](6,8)
\end{pspicture}
\end{verbatim}}
\end{minipage}


\newpage


\subsection{Concentric rings}

Aubrey Jaffer describes the idea of ``concentric rings'' in:
\begin{center}
\url{http://people.csail.mit.edu/jaffer/Marbling/Mathematics}
\end{center}
\begin{quote}\itshape
``At the start of the real marbling process, paints are dropped from one or more locations to form expanding disks on a substrate. The mathematics is described in \href{http://people.csail.mit.edu/jaffer/Marbling/Dropping-Paint}{\emph{Dropping Paint}}. For now, we just want an paint pattern which shows subsequent displacements. In my first renderings, 5 virtual paints are dropped from the center to form 25 concentric rings of equal radial width.

The boundaries between virtual paint rings will be traversed using the Minsky circle algorithm; although walking the circles using coordinates generated by sin and cos would work as well. The angular step size is made inversely proportional to the ring radius, making the distance between successive points uniform.''
\end{quote}
\begin{center}
\begin{pspicture}(-4,-4)(4,4)
\psMarble(8,8)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-4,-4)(4,4)
\psMarble(8,8)
\end{pspicture}
\end{verbatim}}


\newpage


\section{The command \Lcs{psMarble}}

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

The command \Lcs{psMarble} contains the options \nxLkeyword{actions=}, \nxLkeyword{background=}, \nxLkeyword{seed=}, \nxLkeyword{oversample=}, \\ \nxLkeyword{bckg=true/false}, \nxLkeyword{viscosity=}, \nxLkeyword{drawcontours=true/false} and \nxLkeyword{colors=}.

The optional argument \Largr{x , y} gives the \texttt{x} and \texttt{y} dimension of the image---the default is \Largr{10,10}.

If the \verb!\begin{pspicture}! arguments do not match the optional argument \Largr{x , y}, then the image will be cropped or padded.

\medskip

\begin{quote}
\begin{tabularx}{\linewidth}{ @{} l >{\ttfamily}l X @{} }
\toprule
\textbf{Name}           & \textbf{Default}  & \textbf{Meaning} \\
\midrule
\Lkeyword{actions}      & 0 0 35 colors 35 concentric-rings  & The type of marbling action\\
\Lkeyword{background}   & [0 0 0]             & Background color to be used with rgb or RGB or hexadecimal notation\\
\Lkeyword{seed}         & Mathematical Marbling & Random seed to obtain the same arrangement of random drops within \texttt{Gaussian-drops} and \texttt{uniform-drops}\\
\Lkeyword{oversample} & 0 & This is a rendering option: \texttt{oversample=0} makes the image pixel free; \texttt{oversample>0}: the smaller the positive value, the larger the pixels.\\
\Lkeyword{bckg}         & true & Boolean: to turn on/off the background color\\
\Lkeyword{colors}       & \parbox{5cm}{
[0.275 0.569 0.796]
[0.965 0.882 0.302]
[0.176 0.353 0.129]
[0.635 0.008 0.094]
[0.078 0.165 0.518]
[0.824 0.592 0.031]
[0.059 0.522 0.392]
[0.816 0.333 0.475]
[0.365 0.153 0.435]
[0.624 0.588 0.439]
} & Colors of the marbling can be set within the rgb-color system or as hexadecimal color constants. Shown are rgb constants between 0 and 1.\\
\Lkeyword{drawcontours} & false   & Boolean: if set to \texttt{true}, it only draws the contours\\
\Lkeyword{viscosity}    & 1000    & Global primitive: viscosity of the system\\
\bottomrule
\end{tabularx}
\end{quote}

\medskip

\textbf{Notes:}

\begin{itemize}
\item If \texttt{oversample>0}, the image will be pixeled.
\item The Boolean option \texttt{drawcontours} is by default set to \texttt{false}. If set to \texttt{true}, only the contours are drawn within the image.
\item Sometimes it is quite helpful to be able to turn off the background color. This can be handled with the Boolean key \texttt{bckg}, which if set to \texttt{false} turns off the background color.
\item Colors can be setup within the rgb-color-system: \verb!colors={[0.1 0.4 0.9] [1 0 1] ... }! or \verb!colors={[255 0 0] [123 245 129] ... }!. As well can be entered hexadecimal color constants which are set up within parentheses like: \verb!colors={(e7cc9b) (c28847) (80410b) ... }! or with capital letters like: \verb!colors={(E7CC9B) (C28847) (80410B) ... }!
\item For the \texttt{background} color curly braces are needed: \texttt{background=\{[0.2 0.5 0.7]\}}\\
or \texttt{background=\{[2 255 2]\}}.
\item Following are introduced some basic actions, like \texttt{drop}, \texttt{line-drops}, \texttt{serpentine-drops},\texttt{coil-drops}, \texttt{Gaussian-drops}, \texttt{uniform-drops}, \texttt{concentric-rings}, \texttt{rake}, \texttt{stylus}, \texttt{stir}, \texttt{vortex}, \texttt{wiggle} and \texttt{shift}.

    Within the basic actions \texttt{stir} and \texttt{vortex}, there is defined each with a radius \texttt{r} parameter. If \texttt{r<0} is set, the deformation is counterclockwise, if set to positive values, the deformation is clockwise.
\end{itemize}


\newpage


\section{Rendering}

As designs get more complicated, hundreds of drops and styluses, reverse-rendering is the only practical way to render them.  As the number of strokes increases, the number of points in the contours needs to increase as well. As the number of drops increases, the time to compute each pixel becomes less than the time to compute each contour-point on the drops.

The reason that we don't always reverse-render is because its resolution is limited to the raster; forward-rendering designs remain crisp at any magnification.

\subsection{\texttt{oversample}}


\begin{itemize}
\item \texttt{oversample=0} is contour rendering (pixel-free).
\item \texttt{oversample>0} is raster rendering.
\item \texttt{oversample=0.5} is raster rendering at half resolution. It renders blocky images relatively quickly.
\item \texttt{oversample=1} is raster rendering; the same as negative \texttt{viscosity=} from v1.2.
\item \texttt{oversample>1} will take longer to render, the image produced by ghostscript will be no better than \texttt{oversample=1}.
\end{itemize}

\textbf{Note:} The smaller the \texttt{oversample=} value, the more blocky the image gets. Typical values might be: 0, 0.5, 1.



%\begin{itemize}
%\item To use forward-rendering (pixel-free) we choose the option \texttt{viscosity>0} with a positive value.
%\item To use reverse-rendering (pixeled) we choose the option \texttt{viscosity<0} with a negative value. When a new drop is placed, the points in that drop retain their color, the outer points are calculated before being assigned their initial color. This possibility is operational by taking for \texttt{viscosity} (characteristic constant) a negative value.
%\end{itemize}

\begin{minipage}[t]{6cm}\kern0pt
\begin{pspicture}(-3,-3)(3,3)
\psMarble[oversample=0.4](6,6)
\end{pspicture}
{\small\begin{verbatim}
\begin{pspicture}(-3,-3)(3,3)
\psMarble[oversample=0.4](6,6)
\end{pspicture}
\end{verbatim}}
\end{minipage}
\hfill
\begin{minipage}[t]{6cm}\kern0pt
\begin{pspicture}(-3,-3)(3,3)
\psMarble[oversample=1](6,6)
\end{pspicture}
{\small\begin{verbatim}
\begin{pspicture}(-3,-3)(3,3)
\psMarble[oversample=1](6,6)
\end{pspicture}
\end{verbatim}}
\end{minipage}


\newpage


\section{Colors}

All colors are setup within the rgb-color-system. Besides the preset \nxLkeyword{colors=} which are initially setup within the \texttt{pst-marble.pro}, we can change them within the concentric circles basic figure \texttt{concentric-rings} as follows:

\begin{minipage}[t]{6cm}\kern0pt
\begin{pspicture}(-3,-3)(3,3)
\psMarble(6,6)
\end{pspicture}
{\small\begin{verbatim}
\begin{pspicture}(-3,-3)(3,3)
\psMarble(6,6)
\end{pspicture}
\end{verbatim}}
\end{minipage}
\hfill
\begin{minipage}[t]{6cm}\kern0pt
\begin{pspicture}(-3,-3)(3,3)
\psMarble[colors={
[0.134 0.647 1.000]
[0.977 0.855 0.549]
[0.684 0.638 0.702]
[0.730 0.965 0.942]
[0.040 0.236 0.424]
}](6,6)
\end{pspicture}
{\small\begin{verbatim}
\begin{pspicture}(-3,-3)(3,3)
\psMarble[colors={
[0.134 0.647 1.000]
[0.977 0.855 0.549]
[0.684 0.638 0.702]
[0.730 0.965 0.942]
[0.040 0.236 0.424]
}](6,6)
\end{pspicture}
\end{verbatim}}
\end{minipage}

\bigskip

\textbf{Hint:} As experience tells, not all colors will print as well as shown within the PDF file, so one has to print the image to see if the colors are OK for a paper. Here a list of colors that print well:

\bigskip

\definecolor{printcolorA}{rgb}{0.275 0.569 0.796}
\definecolor{printcolorB}{rgb}{0.965 0.882 0.302}
\definecolor{printcolorC}{rgb}{0.176 0.353 0.129}
\definecolor{printcolorD}{rgb}{0.635 0.008 0.094}
\definecolor{printcolorE}{rgb}{0.078 0.165 0.518}
\definecolor{printcolorF}{rgb}{0.824 0.592 0.031}
\definecolor{printcolorG}{rgb}{0.059 0.522 0.392}
\definecolor{printcolorH}{rgb}{0.816 0.333 0.475}
\definecolor{printcolorI}{rgb}{0.365 0.153 0.435}
\definecolor{printcolorJ}{rgb}{0.624 0.588 0.439}

\newcommand{\myPrint}[2]{
\begin{pspicture}(-1.6,-1)(1.6,1)
\psframe[linecolor=#1,fillstyle=solid,fillcolor=#1](-1.6,-1)(1.6,1)
\rput(0,0){\footnotesize[#2]}
\end{pspicture}
}

\bigskip

{\renewcommand{\arraystretch}{2.75}
\begin{tabular}{ccccc}
\myPrint{printcolorA}{0.275 0.569 0.796} &
\myPrint{printcolorB}{0.965 0.882 0.302} &
\myPrint{printcolorC}{0.176 0.353 0.129} &
\myPrint{printcolorD}{0.635 0.008 0.094} &
\myPrint{printcolorE}{0.078 0.165 0.518} \\
\myPrint{printcolorF}{0.824 0.592 0.031} &
\myPrint{printcolorG}{0.059 0.522 0.392} &
\myPrint{printcolorH}{0.816 0.333 0.475} &
\myPrint{printcolorI}{0.365 0.153 0.435} &
\myPrint{printcolorJ}{0.624 0.588 0.439}
\end{tabular}}


\newpage


\section{Basic actions}

Some of the deformation \nxLkeyword{actions=} which are initially setup within the \texttt{pst-marble.pro} can be manually changed by its parameters:


\subsection{\texttt{drop}}

\texttt{drop} defines a single drop set on the surface of a liquid.
\begin{verbatim}
cx cy r [ rgb ] drop

cx, cy  Center coordinates
r       Radius of the paint drop
[rgb]   Color of paint drop
\end{verbatim}
This initially is a circle with its center at \texttt{(cx,cy)} and a radius \texttt{r}. The paint color is defined by the rgb-color-system.

In order to interpolate the color in reverse-rendering, the adjacent color must be known.
\begin{center}
\begin{pspicture}(-3,-3)(3,3)
\psMarble[background={[1 1 1]}, %white
actions={
0 0 50 [1 0 0] drop
-200 0 70 [0 1 0] drop
200 0 100 [0 0 1] drop
}](6,6)
\end{pspicture}
\end{center}
\begin{verbatim}
\begin{pspicture}(-3,-3)(3,3)
\psMarble[background={[1 1 1]}, %white
actions={
0 0 50 [1 0 0] drop
-200 0 70 [0 1 0] drop
200 0 100 [0 0 1] drop
}](6,6)
\end{pspicture}
\end{verbatim}
\textbf{Note:} The paint drop top most on the stack is left undeformed (intact), whereas all the others are influenced by each other, according to the system constant. There are 10 default colors.  Colors can be used like this:
\begin{verbatim}
0 0 50 colors 1 get drop
-200 0 70 colors 2 get drop
200 0 100 colors 3 get drop
\end{verbatim}


\newpage


\subsection{\texttt{line-drops}}

\begin{verbatim}
xc yc ang [ r ] [ rgb ] drad line-drops
\end{verbatim}

Drops color \texttt{[rgb]} or color series of radius \texttt{drad} in a line centered at \texttt{xc, yc }and \texttt{ang} degrees from vertical (clockwise). One drop is placed at each \texttt{r} distance from \texttt{xc, yc}.

For [r] we can use
\begin{verbatim}
[ cnt spacing ofst tines ]
\end{verbatim}
Returns \texttt{cnt} numbers \texttt{spacing} apart with middle element equal to \texttt{ofst}.

Used for \texttt{rake} and \texttt{line-drops} command.

\begin{center}
\begin{pspicture*}(-5,-5)(5,5)
\psgrid[subgriddiv=1,gridcolor=lightgray!10]
\psMarble[viscosity=1000,bckg=false,
actions={
0 250 90 [ 6 80 0 tines ] colors 4 get 20 line-drops
0 -250 90 [ 6 80 50 tines ] [[0.2 0.5 1][1 0 1]] 20 line-drops
}]
\rput(0,2.5){
\psdot[linecolor=red](0,0)
\uput[-90](0,0){\textcolor{red}{\texttt{xc,yc}}}
\psline[linecolor=red,linestyle=dashed](0,0)(0,2.5)
\psline[linecolor=red](-3,0)(3,0)
\psarcn[linecolor=red]{->}(0,0){2}{90}{0}
\uput{1cm}[45](0,0){\textcolor{red}{\texttt{ang}}}
\psline[linecolor=red]{|<->|}(-1.65,0.4)(-0.85,0.4)
\uput[90](-1.25,0.4){\textcolor{red}{\texttt{spacing}}}
}
\rput(0,-2.5){
\psdot[linecolor=red](0,0)
\uput[-90](0,0){\textcolor{red}{\texttt{xc,yc}}}
\psline[linecolor=red](-3,0)(3,0)
\psline[linecolor=red]{|<->|}(0,0.4)(0.5,0.4)
\uput[90](0.3,0.4){\textcolor{red}{\texttt{ofst>0}}}
}
\end{pspicture*}
\end{center}
{\tiny\begin{verbatim}
\begin{pspicture*}(-5,-5)(5,5)
\psgrid[subgriddiv=1,gridcolor=lightgray!10]
\psMarble[viscosity=1000,bckg=false,
actions={
0 250 90 [ 6 80 0 tines ] colors 4 get 20 line-drops
0 -250 90 [ 6 80 50 tines ] [[0.2 0.5 1][1 0 1]] 20 line-drops
}]
\rput(0,2.5){
\psdot[linecolor=red](0,0)
\uput[-90](0,0){\textcolor{red}{\texttt{xc,yc}}}
\psline[linecolor=red,linestyle=dashed](0,0)(0,2.5)
\psline[linecolor=red](-3,0)(3,0)
\psarcn[linecolor=red]{->}(0,0){2}{90}{0}
\uput{1cm}[45](0,0){\textcolor{red}{\texttt{ang}}}
\psline[linecolor=red]{|<->|}(-1.65,0.4)(-0.85,0.4)
\uput[90](-1.25,0.4){\textcolor{red}{\texttt{spacing}}}
}
\rput(0,-2.5){
\psdot[linecolor=red](0,0)
\uput[-90](0,0){\textcolor{red}{\texttt{xc,yc}}}
\psline[linecolor=red](-3,0)(3,0)
\psline[linecolor=red]{|<->|}(0,0.4)(0.5,0.4)
\uput[90](0.3,0.4){\textcolor{red}{\texttt{ofst>0}}}
}
\end{pspicture*}
\end{verbatim}}


\newpage


\subsection{\texttt{serpentine-drops}}

\texttt{serpentine-drops} deposits a series of drops on a
 user-specified ``grid'' in a serpentine sequence.
\begin{verbatim}
xc yc [ x-places ] [ y-places ] ang rgb drad serpentine-drops

xc, yc       Coordinates of the center
[ x-places ] x-coordinates for the x times y number of drops
[ y-places ] y-coordinates for the x times y number of drops
ang          Rotation angle from vertical (clockwise)
rgb          Color of the drops or color series (array)
drad         Radius of the drops
\end{verbatim}
Places drops of colors \texttt{[ rgb ]} of radius \texttt{drad} in a serpentine
pattern (starting lower left to right; right to left; left to right ...)
at coordinates \texttt{[ x-places ] x [ y-places ]} relative to
location \texttt{xc, yc} and rotated by \texttt{ang} degrees clockwise
from vertical.  The sequences \texttt{[ x-places ]} and \texttt{[ y-places ]}
determine the order in which drops are placed. The resulting grid will not
be square because each drop is moved by subsequent drops.
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
actions={
0 0 [-200 -100 0 100 200][-200 0 200 ] 0 colors 20 serpentine-drops
}
](10,10)
\multido{\iA=-2+1}{5}{
\psline[linecolor=red]{->}(\iA,-3.5)(\iA,-2.5)
}
\uput[-90](0,-3.5){\color{red}\texttt{x-places}}
\multido{\iA=-2+2}{3}{
\psline[linecolor=red]{->}(3.5,\iA)(2.5,\iA)
}
\rput{90}(3.9,0){\color{red}\texttt{y-places}}
\uput[-90](0,-3.5){\color{red}\texttt{x-places}}
\psdot[linecolor=red](0,0)
\uput[-90](0,0){\color{red}\texttt{xc,yc}}
\psline[linecolor=blue,linestyle=dashed]{->}(-2,-1.5)(2,-1.5)
\psline[linecolor=blue,linestyle=dashed]{<-}(-2,0.5)(2,0.5)
\psline[linecolor=blue,linestyle=dashed]{->}(-2,2.5)(2,2.5)
\end{pspicture}
\end{center}
{\tiny\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
actions={
0 0 [-200 -100 0 100 200][-200 0 200 ] 0 colors 20 serpentine-drops
}
](10,10)
\multido{\iA=-2+1}{5}{
\psline[linecolor=red]{->}(\iA,-3.5)(\iA,-2.5)
}
\uput[-90](0,-3.5){\color{red}\texttt{x-places}}
\multido{\iA=-2+2}{3}{
\psline[linecolor=red]{->}(3.5,\iA)(2.5,\iA)
}
\rput{90}(3.9,0){\color{red}\texttt{y-places}}
\uput[-90](0,-3.5){\color{red}\texttt{x-places}}
\psdot[linecolor=red](0,0)
\uput[-90](0,0){\color{red}\texttt{xc,yc}}
\psline[linecolor=blue,linestyle=dashed]{->}(-2,-1.5)(2,-1.5)
\psline[linecolor=blue,linestyle=dashed]{<-}(-2,0.5)(2,0.5)
\psline[linecolor=blue,linestyle=dashed]{->}(-2,2.5)(2,2.5)
\end{pspicture}
\end{verbatim}}


\newpage


\begin{verbatim}
[ cnt spacing ofst tines ]
\end{verbatim}
Returns \texttt{cnt} numbers \texttt{spacing} apart with middle element equal to \texttt{ofst}.

Used as well for the \texttt{rake} and \texttt{line-drops} command.

\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
actions={
0 0 [5 100 0 tines][6 75 20 tines] 30 colors 50 serpentine-drops
}
](10,10)
\psline[linecolor=red](0,0)(0,4)
\psline[linecolor=red](0,0)(4;60)
\psarcn[linecolor=red]{->}(0,0){3.7}{90}{60}
\uput{3.7}[75](0,0){\color{red}\texttt{ang}}
\end{pspicture}
\end{center}
\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
actions={
0 0 [5 100 0 tines][6 75 20 tines] 30 colors 50 serpentine-drops
}
](10,10)
\psline[linecolor=red](0,0)(0,4)
\psline[linecolor=red](0,0)(4;60)
\psarcn[linecolor=red]{->}(0,0){3.7}{90}{60}
\uput{3.7}[75](0,0){\color{red}\texttt{ang}}
\end{pspicture}
\end{verbatim}


\newpage


\subsection{\texttt{coil-drops}}

\texttt{coil-drops} defines a series of drops along a circle or spiral.
\begin{verbatim}
xc yc r ang-strt arcinc rinc [rgb] cnt drad coil-drops

xc, yc    Coordinates of the center
r         Radius of the circle where the drops will lay on
ang-str   Start angle from vertical (clockwise)
arcinc    Arc-length between the drops
rinc      Increment of r: if taken 0 it gives a circle,
                          if taken >0 it spirals outwards,
                          if taken <0 it spirals inwards.
rgb       Color of the drops or color series (array)
cnt       Number of drops
drad      Radius of the drops
\end{verbatim}
Drops \texttt{cnt} paint drops with radius \texttt{drad} in arc around \texttt{xc,yc} at radius \texttt{r} starting at \texttt{ang-strt} and spaced by \texttt{arcinc} distance.  \texttt{r} is incremented (or decremented if \texttt{rinc} is negative) by \texttt{rinc} after each drop.
\begin{center}
\begin{pspicture*}(-5,-5)(5,5)
\psgrid[subgriddiv=1,gridcolor=lightgray!10]
\psMarble[bckg=false,viscosity=1000,
actions={
0 0 400 30 95 0 [ 231 204 155 ] 20 25 coil-drops
0 0 300 180 35 -4 [[ 128 65 11 ][ 65 128 11 ]] 50 20 coil-drops
}]
\end{pspicture*}
\end{center}
{\tiny\begin{verbatim}
\begin{pspicture*}(-5,-5)(5,5)
\psgrid[subgriddiv=1,gridcolor=lightgray!10]
\psMarble[bckg=false,viscosity=1000,
actions={
0 0 400 30 95 0 [ 231 204 155 ] 20 25 coil-drops
0 0 300 180 35 -4 [[ 128 65 11 ][ 65 128 11 ]] 50 20 coil-drops
}]
\end{pspicture*}
\end{verbatim}}


\newpage


\subsection{\texttt{Gaussian-drops}}

\texttt{Gaussian-drops} defines a randomly calculated series of drops mostly within a circle/ellipse.
\begin{verbatim}
xc yc r ang eccentricity [ rgb ] cnt drad Gaussian-drops
\end{verbatim}

Drops \texttt{cnt} paint drops with radius \texttt{drad} in normal (Gaussian) distribution centered at\texttt{ xc, yc} with radius \texttt{r}, \texttt{ang} degrees from vertical (clockwise) and length to width ratio \texttt{eccentricity} (1 is circular).

\texttt{[rgb]} can be one color or a color series.

63\,\% of drops are centered within radius \texttt{r}, 87\,\% of drops are centered within radius \texttt{r*sqrt(2)}, 98\,\% of drops are centered within radius \texttt{r*2}. The \texttt{eccentricity} stretches and shrinks the target from a circle into an ellipse. If \texttt{eccentricity>1}, it stretches the circle in \emph{y}-direction and shrinks it in \emph{x}-direction. If 0<eccentricity<1, it stretches the circle in \emph{x}-direction and shrinks it in \emph{y}-direction. \texttt{eccentricity} is the ratio of the major axis to the minor axis. And the \texttt{ang} should be the major axis counter-clockwise from vertical.
\begin{center}
\begin{pspicture*}(-5,-5)(5,5)
\psgrid[subgriddiv=1,gridcolor=lightgray!10]
\psMarble[bckg=false,viscosity=1000,
colors={
[0.960 0.764 0.576][0.316 0.362 0.298]
[0.200 0.050 0.015][0.023 0.145 0.451]
[0.866 0.353 0.050][0.200 0.050 0.015]
},
actions={
200 0 100 0 1 colors 150 10 Gaussian-drops
-300 0 100 30 4 [190 195 9] 55 10 Gaussian-drops
}]
\pscircle[linecolor=red](2,0){!1}\pscircle[linecolor=red](2,0){!1 2 sqrt mul}
\pscircle[linecolor=red](2,0){!1 2 mul}
\rput{60}(-3,0){
\psellipse[linecolor=red](0,0)(!1 2 mul 1 2 div)
\psline[linestyle=dashed,linecolor=red](!1 2 mul neg 0)(!1 2 mul 0)
\psline[linestyle=dashed,linecolor=red](!0 1 2 div neg)(!0 1 2 div)
}
\psline[linecolor=red](-3,0)(-3,4)
\psarcn[linecolor=red]{->}(-3,0){2.5}{90}{60}
\uput{2cm}[75](-3,0){\textcolor{red}{\texttt{ang}}}
\end{pspicture*}
\end{center}
{\tiny\begin{verbatim}
\begin{pspicture*}(-5,-5)(5,5)
\psgrid[subgriddiv=1,gridcolor=lightgray!10]
\psMarble[bckg=false,viscosity=1000,
colors={
[0.960 0.764 0.576][0.316 0.362 0.298]
[0.200 0.050 0.015][0.023 0.145 0.451]
[0.866 0.353 0.050][0.200 0.050 0.015]
},
actions={
200 0 100 0 1 colors 150 10 Gaussian-drops
-300 0 100 30 4 [190 195 9] 55 10 Gaussian-drops
}]
\pscircle[linecolor=red](2,0){!1}\pscircle[linecolor=red](2,0){!1 2 sqrt mul}
\pscircle[linecolor=red](2,0){!1 2 mul}
\rput{60}(-3,0){
\psellipse[linecolor=red](0,0)(!1 2 mul 1 2 div)
\psline[linestyle=dashed,linecolor=red](!1 2 mul neg 0)(!1 2 mul 0)
\psline[linestyle=dashed,linecolor=red](!0 1 2 div neg)(!0 1 2 div)
}
\psline[linecolor=red](-3,0)(-3,4)
\psarcn[linecolor=red]{->}(-3,0){2.5}{90}{60}
\uput{2cm}[75](-3,0){\textcolor{red}{\texttt{ang}}}
\end{pspicture*}
\end{verbatim}}


\newpage


\subsection{\texttt{uniform-drops}}

\texttt{uniform-drops} defines a randomly calculated series of drops within a rectangled box.
\begin{verbatim}
xc yc xsid ysid angle [ rgb ] cnt drad uniform-drops
\end{verbatim}

Drops \texttt{cnt} paint drops with radius \texttt{drad} in a uniform distribution in a \texttt{xsid} by \texttt{ysid} box centered at \texttt{xc, yc} and rotated by \texttt{angle} from vertical (clockwise).

\texttt{[rgb]} can be one color or a color series.
\begin{center}
\begin{pspicture*}(-5,-5)(5,5)
\psgrid[subgriddiv=1,gridcolor=lightgray!10]
\psMarble[viscosity=1000,bckg=false,
    colors={[0.176 0.353 0.129][0.635 0.008 0.094][0.078 0.165 0.518]
            [0.824 0.592 0.031][0.059 0.522 0.392][0.816 0.333 0.475]},
actions={
0 0 200 200 0 [[0.176 0.353 0.129][0.635 0.008 0.094][0.078 0.165 0.518]] 65 10 uniform-drops
-300 -200 150 200 0 colors 4 get 25 12 uniform-drops
100 300 400 50 0 colors 3 get 30 8 uniform-drops
-200 300 50 400 45 colors 5 get 30 8 uniform-drops
}]
\rput(0,0){\psframe(-1,-1)(1,1)}
\psline[linecolor=red]{|<->|}(-1,-1.2)(1,-1.2)\uput[-90](0,-1.2){\textcolor{red}{200}}
\psline[linecolor=red]{|<->|}(1.2,-1)(1.2,1)\uput[0](1.2,0){\textcolor{red}{200}}
\psdot[linecolor=red](0,0)
\rput(-3,-2){\psframe(-0.75,-1)(0.75,1)}
\psline[linecolor=red]{|<->|}(-3.75,-3.2)(-2.25,-3.2)\uput[-90](-3,-3.2){\textcolor{red}{150}}
\psline[linecolor=red]{|<->|}(-2.05,-3)(-2.05,-1)\uput[0](-2.05,-2){\textcolor{red}{200}}
\psdot[linecolor=red](-3,-2)
\rput(1,3){\psframe(-2,-0.25)(2,0.25)}
\psline[linecolor=red]{|<->|}(-1,2.5)(3,2.5)\uput[-90](1,2.5){\textcolor{red}{400}}
\psline[linecolor=red]{|<->|}(3.25,2.75)(3.25,3.25)\uput[0](3.25,3){\textcolor{red}{50}}
\psdot[linecolor=red](1,3)
\rput{45}(-2,3){\psframe(-2,-0.25)(2,0.25)}
\end{pspicture*}
\end{center}
{\footnotesize\begin{verbatim}
\begin{pspicture*}(-5,-5)(5,5)
\psgrid[subgriddiv=1,gridcolor=lightgray!10]
\psMarble[viscosity=1000,bckg=false,
    colors={[0.176 0.353 0.129][0.635 0.008 0.094][0.078 0.165 0.518]
            [0.824 0.592 0.031][0.059 0.522 0.392][0.816 0.333 0.475]},
actions={
0 0 200 200 0 [[0.176 0.353 0.129][0.635 0.008 0.094][0.078 0.165 0.518]] 65 10 uniform-drops
-300 -200 150 200 0 colors 4 get 25 12 uniform-drops
100 300 400 50 0 colors 3 get 30 8 uniform-drops
-200 300 50 400 45 colors 5 get 30 8 uniform-drops
}]
\rput(0,0){\psframe(-1,-1)(1,1)}
\psline[linecolor=red]{|<->|}(-1,-1.2)(1,-1.2)\uput[-90](0,-1.2){\textcolor{red}{200}}
\psline[linecolor=red]{|<->|}(1.2,-1)(1.2,1)\uput[0](1.2,0){\textcolor{red}{200}}
\psdot[linecolor=red](0,0)
\rput(-3,-2){\psframe(-0.75,-1)(0.75,1)}
\psline[linecolor=red]{|<->|}(-3.75,-3.2)(-2.25,-3.2)\uput[-90](-3,-3.2){\textcolor{red}{150}}
\psline[linecolor=red]{|<->|}(-2.05,-3)(-2.05,-1)\uput[0](-2.05,-2){\textcolor{red}{200}}
\psdot[linecolor=red](-3,-2)
\rput(1,3){\psframe(-2,-0.25)(2,0.25)}
\psline[linecolor=red]{|<->|}(-1,2.5)(3,2.5)\uput[-90](1,2.5){\textcolor{red}{400}}
\psline[linecolor=red]{|<->|}(3.25,2.75)(3.25,3.25)\uput[0](3.25,3){\textcolor{red}{50}}
\psdot[linecolor=red](1,3)
\rput{45}(-2,3){\psframe(-2,-0.25)(2,0.25)}
\end{pspicture*}
\end{verbatim}}


\newpage


\subsection{\texttt{concentric-rings}}

With \texttt{concentric-rings}, we set the number of different colored concentric rings (\texttt{count}) (at center \texttt{cx,cy}) with a thickness of  \texttt{thick}.

%The original PostScript code we find within \texttt{pst-marble.pro} as:
%\begin{verbatim}
%/concentric-rings {		% xc yc thick [ color ] count
%    /cnt exch def
%    /clra exch def
%    /rinc exch def
%    /yc exch def
%    /xc exch def
%    /nclr clra length def
%    cnt 1 sub -1 0
%    {
%	/cnt exch def
%	cnt 0 eq
%	{ xc yc rinc 2 div clra 0 get drop }
%	{ xc yc cnt sqrt rinc mul clra cnt nclr mod get drop }
%	ifelse
%    } for
%} bind def
%\end{verbatim}

%\textbf{Explanation:}
%
%We have 11 sets of drops, within every set, the drops have the same radii and their radii will decrease with every step. The last set is given by the argument \texttt{rinc} and all the other radii are a function of this final radius.
%
%Within the first set of drops (with same radii), the number of drops is \texttt{nbands}---every drop of it has a color taken from the colors array and its radius values \texttt{sqrt(11)*rinc}.
%
%The sets go from 11 to 1 with a step of 1, meaning that the second set has a radius of \texttt{sqrt(10)*rinc} etc.
%
%The last set has a radius of \texttt{sqrt(1)*rinc=rinc}.
%
%A last single drop is then added with the radius of \texttt{r=rinc/2}.

To code it within the \LaTeX{} file we use the following syntax:
\begin{verbatim}
xc yc thick [ color ] count concentric-rings

cx, cy        Center coordinates
thick         Thickness of the rings
count         Number of rings
color         Array of colors: [[rgb][rgb]...[rgb]]
\end{verbatim}

\textbf{Example 1:}

\texttt{concentric-rings} is the default action of the \texttt{actions=\{...\}} key, meaning if \textbf{no} action is chosen, \texttt{concentric-rings} with its default thickness and its default color list is in effect.
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
    \psMarble(10,10)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
    \psMarble(10,10)
\end{pspicture}
\end{verbatim}}


\newpage


\textbf{Example 2:}

If we want to change \texttt{thick} and \texttt{count}, we do the following:

\medskip

\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
    actions={
% cx cy thick color count
  0 0 25 colors 40 concentric-rings
   }](10,10)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
    actions={
% cx cy thick color count
  0 0 25 colors 40 concentric-rings
   }](10,10)
\end{pspicture}
\end{verbatim}}

\medskip

\textbf{Note:} If one increases \texttt{thick} to large values $>100$ the area of the bands will increases by square, so not all bands will be shown within the image, however they are calculated, which leads to longer compilation times and increases the final file size.

Typical values are: $35<\text{\texttt{thick}}<50$


\newpage


\textbf{Example 3:}

If we like to change the colors as well, we do this with the \texttt{colors=\{...\}} key, as follows:

\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
    colors={
     [0.08 0.3 0.51]
     [0.18 0.76 1]
     [0.93 1 1]
     [0.08 0.3 0.51]
     [0.8 0.75 0.82]
     [1 0.99 0.65]
    },
     actions={
    0 0 35 colors 26 concentric-rings
   }](10,10)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
    colors={
     [0.08 0.3 0.51]
     [0.18 0.76 1]
     [0.93 1 1]
     [0.08 0.3 0.51]
     [0.8 0.75 0.82]
     [1 0.99 0.65]
    },
     actions={
   0 0 35 colors 26 concentric-rings
   }](10,10)
\end{pspicture}
\end{verbatim}}


\newpage


\subsection{\texttt{rake}}

This is to represent the image obtained when the artist is equipped with a comb (rake) containing a number of identical teeth of a given diameter. He places the comb perpendicularly to the direction fixed by the angle made with the axis $Oy$ (the angle is counted: if taken positive values---clockwise, if taken negative values---counterclockwise)  and moves it with a speed of \texttt{V} in the indicated direction or contrary to it, following the sign of the parameter \texttt{tU}. The positions of the teeth are set up by the distances (in mm) indicated [ between brackets ], the comb can also have only one tooth.

By default, the tank's dimensions are 1 m $\times$ 1 m. The scaling factor of the image is 0.1. All lengths are in mm, velocities (in mm/s), angles (in degrees), angular velocity (in degrees/s), and viscosity and circulation (in mm$^2$/s).

For a convex stylus or tine, \texttt{D} (in mm) is the ratio of its submerged volume to its wetted surface area. For a long cylinder it is its diameter.
\begin{verbatim}
angle [ r ] V tU D rake

angle   Angle from y-axis in degrees; 0 is up.
         - If angle positve: direction is north-east (>90 south-east).
         - If angle negative: direction is north-west (<-90 south-west).
[ r ]   List of distances to the teeth of the rake from its center.
         - If r positive: distance to tooth, right to the indicated direction.
         - If r positive: distance to tooth, left to the indicated direction.
V       Stylus velocity in mm/s
tU      Distance between the original points and the deformed points
        along the stylus track.
         - If tU positive: deformation in the indicated direction.
         - If tU negative: deformation contrary to the indicated direction.
D       Stylus diameter in mm.  Make larger to affect paint farther away.
\end{verbatim}
For the following examples \texttt{viscosity=1000} is set. This is a typical value (default value).


\newpage


\textbf{Explanations for the key \texttt{tU}:}

Setting: \verb! 45 [ 200 ] 20 -100 50 rake!

The orange circles are the ones without deformation. The black ones are the ones after deformation.
\begin{itemize}
\item Intersect orange outer circle with the yellow line $= P$ and $R$
\item Intersect the black outer circle with the yellow line $= Q$ and $S$
\end{itemize}
\begin{center}
\begin{pspicture*}(-5,-5)(5,5)
\psMarble[viscosity=1000,
linewidth=0.1,
drawcontours,
bckg=false,
actions={9 -2 2
    {
        /rad exch sqrt 50 mul def
          0  0 rad  [0 0 0] drop
    } for
% angle r    V   tU   D
 45 [ 200 ] 20 -100 50 rake
}]%
\psMarble[viscosity=1000,
bckg=false,
linewidth=0.1,
drawcontours,
actions={9 -2 2
    {
        /rad exch sqrt 50 mul def
         0  0  rad  [1 0.5 0] drop
    } for
}]%
\psline[linecolor=red](-5,-5)(5,5)
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=yellow](-5,-5)(5,5)}
\psarcn[linewidth=0.1]{->}(0,0){3}{90}{45}
\uput{3.1}[67.5](0,0){$\alpha=45^{\mathrm{o}}$}
\psline{->}(0,0)(!2 sqrt 2 sqrt neg)
\uput[45](!2 sqrt 2 div 2 sqrt 2 div neg){$r>0$}

\psdot[linecolor=blue,linewidth=0.2pt](2.43,-0.39)
\uput[0](2.43,-0.39){\textcolor{blue}{P}}
\psdot[linecolor=blue,linewidth=0.2pt](1.7,-1.165)
\uput[0](1.7,-1.165){\textcolor{blue}{Q}}
\psline[linecolor=blue,linewidth=1.5pt]{->}(2.43,-0.39)(1.7,-1.165)

\psdot[linecolor=blue,linewidth=0.2pt](0.4,-2.42)
\uput[0](0.4,-2.42){\textcolor{blue}{R}}
\psdot[linecolor=blue,linewidth=0.2pt](-0.3,-3.1)
\uput[0](-0.3,-3.1){\textcolor{blue}{S}}
\psline[linecolor=blue,linewidth=1.5pt]{->}(0.4,-2.42)(-0.3,-3.1)
\psgrid[subgriddiv=1]
\end{pspicture*}
\end{center}
\begin{itemize}
\item The distance between $P$ and $Q$ is $|\overrightarrow{PQ}|$:

$\text{\texttt{tU}}=|\overrightarrow{PQ}|=1\,\text{cm}$ with respect to the scaling factor 0.1 for the image, this gives \texttt{tU=100}, as it should.

\item The distance between $R$ and $S$ is $|\overrightarrow{RS}|$:

$\text{\texttt{tU}}=|\overrightarrow{RS}|=1\,\text{cm}$ with respect to the scaling factor 0.1 for the image, this gives \texttt{tU=100}, as it should.
\end{itemize}
\textbf{Note:} Within the given example \texttt{tU=-100} was chosen \textit{negative}. This indicates that the deformation is made contrary to the stylus track (set with \texttt{angle=45} (at a distance \texttt{[r=200]} from the red line) and drawn in yellow, so points to north-east, thus the deformation points move necessarily to south-west.


\newpage


\textbf{Example 1:} \verb+ 45 [ 200 ] 20 -100 50 rake+

The angle is \texttt{angle=45}, means the direction of the stylus track north-east. (If the angle would be chosen to \texttt{angle=-45}, the stylus track would move north-west.

The distance \texttt{[r=200]} (in mm) of one tooth from the center of the rake on the right side referred to the stylus track direction, if \texttt{r} is taken positive; to the left side to the stylus track direction, if \texttt{r} is taken negative.\\
\textbf{Note:} The scaling factor of the image is 0.1. Thus 200 mm $\times$ 0.1 = 2 cm within the image.

The stylus velocity is given with \texttt{V=20} (in mm/s).

The distance  \texttt{tU=-100} between the original points and the deformed points along the stylus track is set to negative (the deformation is made contrary to the to the direction of the stylus track). If taken a positive value for \texttt{tU}, the deformation is made in the direction of the stylus track.

The stylus parameter \texttt{D} (given in mm) is the ratio of its submerged volume to its wetted surface area. The bigger this value, the wider the area of points that are affected by the deformation.
\begin{center}
\psscalebox{0.8}{
\begin{pspicture*}(-5,-5)(5,5)
\psMarble[viscosity=1000,linewidth=0.1,bckg=false,drawcontours,
colors={[0 0 0]},
actions={
0 0 50 2 sqrt mul colors 9 concentric-rings
% angle r V tU D
45 [200] 20 -100 50 rake
}](10,10)%
\psline[linecolor=red](-5,-5)(5,5)
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=blue](-5,-5)(5,5)}
\psarcn[linewidth=0.1]{->}(0,0){2}{90}{45}
\uput{2.1}[67.5](0,0){$\alpha=45^{\mathrm{o}}$}
\psline{->}(0,0)(!2 sqrt 2 sqrt neg)
\uput[45](0.707,-0.707){$r>0$}
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=red,linewidth=0.1]{->}(0,0)(1.8;225)}
\rput(0.6,-1.7){\red tU}
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture*}}
\end{center}
{\small\begin{verbatim}
\begin{pspicture*}(-5,-5)(5,5)
\psMarble[viscosity=1000,linewidth=0.1,bckg=false,drawcontours,
colors={[0 0 0]},
actions={
0 0 50 2 sqrt mul colors 9 concentric-rings
% angle r V tU D
45 [200] 20 -100 50 rake
}](10,10)%
\psline[linecolor=red](-5,-5)(5,5)
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=blue](-5,-5)(5,5)}
\psarcn[linewidth=0.1]{->}(0,0){2}{90}{45}
\uput{2.1}[67.5](0,0){$\alpha=45^{\mathrm{o}}$}
\psline{->}(0,0)(!2 sqrt 2 sqrt neg)
\uput[45](0.707,-0.707){$r>0$}
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=red,linewidth=0.1]{->}(0,0)(1.8;225)}
\rput(0.6,-1.7){\red tU}
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture*}
\end{verbatim}}


\newpage


\textbf{Example 2:} \verb+ 45 [ 200 ] 20 100 50 rake+

The angle is \texttt{angle=45}, means the direction of the stylus track is north-east.

The distance \texttt{[r=200]} of one tooth from the center of the rake on the right side referred to the stylus track direction, if \texttt{r} is taken positive; to the left side to the stylus track direction, if \texttt{r} is taken negative.\\
\textbf{Note:} The scaling factor of the image is 0.1. Thus 200 mm $\times$ 0.1 = 2 cm within the image.

The stylus velocity is given with \texttt{V=20} (in mm/s).

The distance  \texttt{tU=100} between the original points and the deformed points along the stylus track is set to positive (the deformation is made to the direction of the stylus track).

The stylus parameter \texttt{D} (given in mm) is set to 50 mm.
\begin{center}
\psscalebox{0.8}{
\begin{pspicture*}(-5,-5)(5,5)
\psMarble[viscosity=1000,linewidth=0.1,bckg=false,drawcontours,
colors={[0 0 0]},
actions={
0 0 50 2 sqrt mul colors 9 concentric-rings
% angle r V tU D
 45 [200] 20 100 50 rake
}](10,10)%
\psline[linecolor=red](-5,-5)(5,5)
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=blue](-5,-5)(5,5)}
\psarcn[linewidth=0.1]{->}(0,0){2}{90}{45}
\uput{2.1}[67.5](0,0){$\alpha=45^{\mathrm{o}}$}
\psline{->}(0,0)(!2 sqrt 2 sqrt neg)
\uput[45](0.707,-0.707){$r>0$}
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=red,linewidth=0.1]{->}(0,0)(1.8;45)}
\rput(2.5,-0.9){\red tU}
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture*}}
\end{center}
{\small\begin{verbatim}
\begin{pspicture*}(-5,-5)(5,5)
\psMarble[viscosity=1000,linewidth=0.1,bckg=false,drawcontours,
colors={[0 0 0]},
actions={
0 0 50 2 sqrt mul colors 9 concentric-rings
% angle r V tU D
 45 [200] 20 100 50 rake
}](10,10)%
\psline[linecolor=red](-5,-5)(5,5)
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=blue](-5,-5)(5,5)}
\psarcn[linewidth=0.1]{->}(0,0){2}{90}{45}
\uput{2.1}[67.5](0,0){$\alpha=45^{\mathrm{o}}$}
\psline{->}(0,0)(!2 sqrt 2 sqrt neg)
\uput[45](0.707,-0.707){$r>0$}
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=red,linewidth=0.1]{->}(0,0)(1.8;45)}
\rput(2.5,-0.9){\red tU}
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture*}
\end{verbatim}}


\newpage


\textbf{Example 3:} \verb+ 0 [11 100 0 tines] 50 100 30 rake+

\begin{verbatim}
[ cnt spacing ofst tines ]

cnt       Number of teeth
spacing   Displacement between the teeth
ofst      Offset of the middle tooth
          to the left (negative),
          to the right (positive)
\end{verbatim}

The angle is \texttt{angle=0}, means the direction of the stylus track is north.

The distance \texttt{[r]} is a list of 11 teeth: \texttt{[11 100 0 tines]} meaning the distances of the teeth are: \texttt{-500, -400, -300, -200, -100, 0, 100, 200, 300, 400, 500}. Starting at \texttt{0} to the left and right in steps of \texttt{100} up to \texttt{11} teeth with offset \texttt{0} (the center). (5 to the left of the indicated direction (the ones with negative values) and 5 to the right of the indicated direction (the ones with the positive values) and one tooth within the center. If the offset is set to a negative value, the center tooth moves to the left if taken positive it moves the center tooth to the right.

The stylus velocity is given with \texttt{V=50} (in mm/s).

The distance  \texttt{tU=100} between the original points and the deformed points along the stylus track is set to positive (the deformation is made to the direction of the stylus track).

The stylus parameter \texttt{D} (given in mm) is set to 30 mm.

\begin{minipage}[t]{8cm}\kern0pt
\begin{center}
\begin{pspicture}(-4,-5)(4,5)
\psset{viscosity=1000}%
\psMarble[
colors={
  [0.176 0.353 0.129]
  [0.635 0.008 0.094]
  [0.078 0.165 0.518]
  [0.824 0.592 0.031]
  [0.059 0.522 0.392]
  [0.816 0.333 0.475]
},
actions={
  0 0 35 colors 32 concentric-rings
% rake with 11 teeth aligned 1 cm (= 100 pts) with no offset
0 [11 100 0 tines] 50 100 30 rake
}](8,10)%
\psMarble[
linewidth=0.05,
colors={[1 1 1]},
bckg=false,
drawcontours,
actions={
0 0 35 colors 32 concentric-rings
%% rake with 11 teeth aligned 1 cm (= 100 pts)
0 [11 100 0 tines] 50 100 30 rake
}](8,10)%
\end{pspicture}
\end{center}
\end{minipage}
\hfill
\begin{minipage}[t]{8cm}\kern0pt
{\small\begin{verbatim}
\begin{pspicture}(-4,-5)(4,5)
\psset{viscosity=1000}%
\psMarble[
colors={
  [0.176 0.353 0.129]
  [0.635 0.008 0.094]
  [0.078 0.165 0.518]
  [0.824 0.592 0.031]
  [0.059 0.522 0.392]
  [0.816 0.333 0.475]
},
actions={
  0 0 35 colors 32 concentric-rings
% rake with 11 teeth aligned 1 cm (= 100 pts) with no offset
0 [11 100 0 tines] 50 100 30 rake
}](8,10)%
\psMarble[
linewidth=0.05,
colors={[1 1 1]},
bckg=false,
drawcontours,
actions={
0 0 35 colors 32 concentric-rings
%% rake with 11 teeth aligned 1 cm (= 100 pts)
0 [11 100 0 tines] 50 100 30 rake
}](8,10)%
\end{pspicture}
\end{verbatim}}
\end{minipage}

\medskip

\textbf{Note:} Within this example two \verb+\psMarble+ commands are used! The second command of \verb+\psMarble+ is used to highlight the contours of the deformations in white color. Therefore it is needed to suppress the background color for this second command---which can be done with \texttt{bckg=false}.


\newpage


\subsection{\texttt{stylus}}

Parameters for \texttt{stylus}: \texttt{bx, by, ex, ey, V, D}
\begin{verbatim}
bx by ex ey V D stylus

bx, by   Beginning of stroke
ex, ey   End of stroke
V        Stylus velocity in mm/s
D        Stylus diameter in mm.  Make larger to affect paint farther away.
\end{verbatim}

\textbf{Example 1:}

\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=250,
actions={
0 0 35 colors 32 concentric-rings
% X1 begin Y1 begin X2 end Y2 end V D
30 sin 400 mul 30 cos 400 mul 30 sin 100 mul 30 cos 100 mul 50 10 stylus
}](10,10)
\psset{linecolor=red,linewidth=0.1}
\pstVerb{/scaleFactor 10 1000 div def
/X1 30 sin 400 mul scaleFactor mul def /Y1 30 cos 400 mul scaleFactor mul def
/X2 30 sin 100 mul scaleFactor mul def /Y2 30 cos 100 mul scaleFactor mul def
}%
\psdot(!X1 Y1)\psline{->}(!X1 Y1)(!X2 Y2)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=250,
actions={
0 0 35 colors 32 concentric-rings
% X1 begin Y1 begin X2 end Y2 end V D
30 sin 400 mul 30 cos 400 mul 30 sin 100 mul 30 cos 100 mul 50 10 stylus
}](10,10)
\psset{linecolor=red,linewidth=0.1}
\pstVerb{/scaleFactor 10 1000 div def
/X1 30 sin 400 mul scaleFactor mul def /Y1 30 cos 400 mul scaleFactor mul def
/X2 30 sin 100 mul scaleFactor mul def /Y2 30 cos 100 mul scaleFactor mul def
}%
\psdot(!X1 Y1)\psline{->}(!X1 Y1)(!X2 Y2)
\end{pspicture}
\end{verbatim}}


\newpage


\textbf{Example 2:}

\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=250,
actions={
  0 0 35 colors 32 concentric-rings
% X1 begin Y1 begin X2 end Y2 end V D
30 sin 400 mul 30 cos 400 mul 30 sin 100 mul 30 cos 100 mul 200 30 stylus
}](10,10)
\psset{linecolor=red,linewidth=0.1}
\pstVerb{/scaleFactor 10 1000 div def
/X1 30 sin 400 mul scaleFactor mul def
/Y1 30 cos 400 mul scaleFactor mul def
/X2 30 sin 100 mul scaleFactor mul def
/Y2 30 cos 100 mul scaleFactor mul def
}%
\psdot(!X1 Y1)%(!X2 Y2)
\psline{->}(!X1 Y1)(!X2 Y2)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=250,
actions={
  0 0 35 colors 32 concentric-rings
% X1 begin Y1 begin X2 end Y2 end V D
30 sin 400 mul 30 cos 400 mul 30 sin 100 mul 30 cos 100 mul 200 30 stylus
}](10,10)
\psset{linecolor=red,linewidth=0.1}
\pstVerb{/scaleFactor 10 1000 div def
/X1 30 sin 400 mul scaleFactor mul def
/Y1 30 cos 400 mul scaleFactor mul def
/X2 30 sin 100 mul scaleFactor mul def
/Y2 30 cos 100 mul scaleFactor mul def
}%
\psdot(!X1 Y1)%(!X2 Y2)
\psline{->}(!X1 Y1)(!X2 Y2)
\end{pspicture}
\end{verbatim}}


\newpage


\subsection{\texttt{stir}}

Consider a single stylus (a cylinder of diameter \texttt{D}) that is placed on the $y$-axis at a distance $r$ from the chosen center. In a circular motion, the artist rotates the stylus by an angle $\theta$. The angular velocity will influence the shape of the deformation. The direction of rotation is fixed by the sign of $\theta$. If $\theta>0$ the artist rotates clockwise \footnote{The sign of $r$ can also indicate the direction of rotation. If $r<0$ the direction of the rotation fixed by $\theta$ inverts.}.
\begin{verbatim}
cx cy [ r ] w th D stir

cx, cy      Center coordinates in mm.
[ r ]       List of radii in mm.
w           Angular velocity in degrees/s.
th          Angle displacement at tines in degrees (clockwise).
D           Tine diameter in mm.
\end{verbatim}

\medskip

\textbf{Explanations for the key \texttt{th}:}

Setting: \verb! 0 0 [ 350 ] 10 -70 10 stir !

\textbf{All} points on the circle are rotated by \texttt{th=70}.  There is \textbf{no} partial stir operation.
\begin{center}
\begin{pspicture*}(-5,-5)(5,5)
\psgrid[subgriddiv=1,gridcolor=lightgray!10]
\psdot[dotstyle=+](0,0)
\pscircle[linestyle=dashed]{3.5}
\psMarble[viscosity=20,bckg=false,
    actions={
    350 0 15 [0.22 0.27 0.4] drop
    350 20 cos mul 350 20 sin mul 15 [0.49 0.75 0.79] drop
    350 40 cos mul 350 40 sin mul 15 [0.9 0.8 0.47] drop
    350 60 cos mul 350 60 sin mul 15 [0.98 0.27 0.317] drop
    }]
\psMarble[viscosity=20,bckg=false,
    actions={
    350 0 15 [0.22 0.27 0.4] drop
    350 20 cos mul 350 20 sin mul 15 [0.49 0.75 0.79] drop
    350 40 cos mul 350 40 sin mul 15 [0.9 0.8 0.47] drop
    350 60 cos mul 350 60 sin mul 15 [0.98 0.27 0.317] drop
     0 0 [ 350 ] 10 -70 10 stir
    }]
\psarc[arrowinset=0]{->}(0,0){3.9}{0}{70}
\psline[linecolor=blue](0;0)(3.5;0)
\psline[linecolor=blue](0;0)(3.5;70)
\uput[30](3.9;35){$\theta=70^\mathrm{o}$}
\end{pspicture*}
\end{center}


\newpage


\textbf{Example 1:}

\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
    colors={
    [0.08 0.3 0.51]
    [0.18 0.76 1]
    [0.93 1 1]
    [0.08 0.3 0.51]
    [0.8 0.75 0.82]
    [1 0.99 0.65]
    },
    actions={
    0 0 35 colors 32 concentric-rings
    0 -100 [200] 10 60 30 stir
    }](10,10)
\psdot[dotstyle=+,linecolor=white,linewidth=2pt](0,-1)
\pscircle[linestyle=dashed,linecolor=white](0,-1){2}
\psarc[linewidth=0.05,linestyle=dashed]{->}(0,-1){2}{90}{150}
\psline[linecolor=white,linestyle=dashed](0,-1)(0,1)
\psline[linecolor=white,linestyle=dashed](0,-1)(-1.732,0)
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
    colors={
    [0.08 0.3 0.51]
    [0.18 0.76 1]
    [0.93 1 1]
    [0.08 0.3 0.51]
    [0.8 0.75 0.82]
    [1 0.99 0.65]
    },
    actions={
    0 0 35 colors 32 concentric-rings
    0 -100 [200] 10 60 30 stir
    }](10,10)
\psdot[dotstyle=+,linecolor=white,linewidth=2pt](0,-1)
\pscircle[linestyle=dashed,linecolor=white](0,-1){2}
\psarc[linewidth=0.05,linestyle=dashed]{->}(0,-1){2}{90}{150}
\psline[linecolor=white,linestyle=dashed](0,-1)(0,1)
\psline[linecolor=white,linestyle=dashed](0,-1)(-1.732,0)
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture}
\end{verbatim}}


\newpage


\textbf{Example 2:}

If the artist repeats the same gesture several times, a whirlwind effect is created:

\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
    colors={
    [0.08 0.3 0.51]
    [0.18 0.76 1]
    [0.93 1 1]
    [0.08 0.3 0.51]
    [0.8 0.75 0.82]
    [1 0.99 0.65]
    },
    actions={
    0 0 35 colors 32 concentric-rings
    0 -100 [200] 10 60 30 stir
    0 -100 [200] 10 60 30 stir % repeated action
    0 -100 [200] 10 60 30 stir % repeated action
    0 -100 [200] 10 60 30 stir % repeated action
    }](10,10)
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
    colors={
    [0.08 0.3 0.51]
    [0.18 0.76 1]
    [0.93 1 1]
    [0.08 0.3 0.51]
    [0.8 0.75 0.82]
    [1 0.99 0.65]
    },
    actions={
    0 0 35 colors 32 concentric-rings
    0 -100 [200] 10 60 30 stir
    0 -100 [200] 10 60 30 stir % repeated action
    0 -100 [200] 10 60 30 stir % repeated action
    0 -100 [200] 10 60 30 stir % repeated action
    }](10,10)
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture}
\end{verbatim}}


\newpage


\textbf{Example 3:}

The artist turns from two different centers, changing the direction of rotation.

\textbf{Note:} Doing multiple deformations, the order of them is of importance! See the following examples placed next to each other where only the order of deformations is changed.
\begin{center}
\begin{minipage}[t]{8cm}
\begin{pspicture}(-4,-5)(4,5)
\psMarble[
    colors={
    [0.08 0.3 0.51]
    [0.18 0.76 1]
    [0.93 1 1]
    [0.08 0.3 0.51]
    [0.8 0.75 0.82]
    [1 0.99 0.65]
    },
    actions={
    0 0 35 colors 32 concentric-rings
    0 200 [200] 10 60 30 stir
    0 -200 [200] -10 60 30 stir
    }](8,10)
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture}
{\small\begin{verbatim}
\begin{pspicture}(-4,-5)(4,5)
\psMarble[
    colors={
    [0.08 0.3 0.51]
    [0.18 0.76 1]
    [0.93 1 1]
    [0.08 0.3 0.51]
    [0.8 0.75 0.82]
    [1 0.99 0.65]
    },
    actions={
    0 0 35 colors 32 concentric-rings
    0 200 [200] 10 60 30 stir
    0 -200 [200] -10 60 30 stir
    }](8,10)
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture}
\end{verbatim}}
\end{minipage}
\hfill
\begin{minipage}[t]{8cm}
\begin{pspicture}(-4,-5)(4,5)
\psMarble[
    colors={
    [0.08 0.3 0.51]
    [0.18 0.76 1]
    [0.93 1 1]
    [0.08 0.3 0.51]
    [0.8 0.75 0.82]
    [1 0.99 0.65]
    },
    actions={
    0 0 35 colors 32 concentric-rings
    0 -200 [200] -10 60 30 stir
    0 200 [200] 10 60 30 stir
    }](8,10)
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture}
{\small\begin{verbatim}
\begin{pspicture}(-4,-5)(4,5)
\psMarble[
    colors={
    [0.08 0.3 0.51]
    [0.18 0.76 1]
    [0.93 1 1]
    [0.08 0.3 0.51]
    [0.8 0.75 0.82]
    [1 0.99 0.65]
    },
    actions={
    0 0 35 colors 32 concentric-rings
    0 -200 [200] -10 60 30 stir
    0 200 [200] 10 60 30 stir
    }](8,10)
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture}
\end{verbatim}}
\end{minipage}
\end{center}


\newpage


\subsection{\texttt{vortex}}

\begin{verbatim}
cx cy circ t vortex

cx, cy  Center coordinates in mm.
circ    Circulation (in mm^2/s) is a simple scale factor.
        Typical value: 30e3 mm^2/s.
t       Time after circulation impulse at center. As t gets very large, the
        whole surface returns to its original pattern, possibly with
        rigid rotation. Typical value 10 s.
\end{verbatim}

\texttt{/vortex} is modeled by a Lamb-Oseen vortex. We refer to the article written by Aubrey Jaffer:
\begin{center}
\url{https://arxiv.org/abs/1810.04646}
\end{center}
The documentation illustrates the used parameters:

center coordinates in mm, circulation $\mathrm{mm}^2$/s and the time s.

After a long enough time, the whole surface returns to its initial state. This can be easily proofed within an animation.

Here the animation code for the \texttt{animate} package by Alexander Grahn:

\begin{minipage}[t]{10cm}\kern0pt
\begin{animateinline}[%
    controls,loop,
    begin={\begin{pspicture}(-5,-5)(5,5)},
    end={\end{pspicture}}
    ]{5}% 5 image/s
\multiframe{20}{rA=-3+0.65}{
\psMarble[
    colors={
    (622e07)
    (c06d11)
    (8f6e1d)
    (56410d)
    (191504)
    },
     actions={
     0 0 40 colors 30 concentric-rings
     90 [3 400 24 tines] 40 200 31 rake
    -90 [3 400 24 tines] 40 200 31 rake
     0 0 -25200 5 \rA\space exp vortex
     }](10,10)
    }
\end{animateinline}
\end{minipage}
\begin{minipage}[t]{8cm}\kern0pt
{\footnotesize\begin{verbatim}
\begin{document}
\begin{animateinline}[%
controls,loop,
begin={\begin{pspicture}(-5,-5)(5,5)},
end={\end{pspicture}}
]{5}% 5 image/s
\multiframe{20}{rA=-3+0.65}{
\psMarble[
colors={
(622e07)
(c06d11)
(8f6e1d)
(56410d)
(191504)},
actions={
0 0 40 colors 30 concentric-rings
90 [3 400 24 tines] 40 200 31 rake
-90 [3 400 24 tines] 40 200 31 rake
0 0 -25200 5 \rA\space exp vortex
}](10,10)
}
\end{animateinline}
\end{document}
\end{verbatim}}
\end{minipage}

\bigskip

Animated gifs can be seen at:
\begin{center}
\url{http://people.csail.mit.edu/jaffer/Marbling/}
\end{center}


\newpage


\textbf{Example 1:}

\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=1000,background={[1 1 1]},
  colors={
   (622e07)
   (c06d11)
   (8f6e1d)
   (56410d)
   (191504)
   },
  actions={
   0 0 35 colors 33 concentric-rings
   90 100 shift
   0 0 -32e3 10 vortex
   }](10,10)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=1000,background={[1 1 1]},
  colors={
   (622e07)
   (c06d11)
   (8f6e1d)
   (56410d)
   (191504)
   },
  actions={
   0 0 35 colors 33 concentric-rings
   90 100 shift
   0 0 -32e3 10 vortex
   }](10,10)
\end{pspicture}
\end{verbatim}}


\newpage


\textbf{Example 2:}

\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=1000,drawcontours,
linewidth=0.1,
bckg=false,
colors={
(622e07)
(c06d11)
(8f6e1d)
(56410d)
(191504)
},
actions={
0 0 35 colors 33 concentric-rings
90 100 shift
-200 200 -32e3 10 vortex
-200 -200 32e3 10 vortex
}](10,10)
\psdot[dotstyle=+,dotsize=0.25,linecolor=red](-2,-2)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=1000,drawcontours,
linewidth=0.1,
bckg=false,
colors={
(622e07)
(c06d11)
(8f6e1d)
(56410d)
(191504)
},
actions={
0 0 35 colors 33 concentric-rings
90 100 shift
-200 200 -32e3 10 vortex
-200 -200 32e3 10 vortex
}](10,10)
\psdot[dotstyle=+,dotsize=0.25,linecolor=red](-2,-2)
\end{pspicture}
\end{verbatim}}


\newpage


\subsection{\texttt{wiggle}}

This instruction simulates the action of an artist who with the tip of the stylus draws undulations on the surface of the liquid.

\texttt{wiggle} affects the whole tank.  In order to trace a wiggly rake in part of the tank, wiggle, then rake in part of the tank, then unwiggle
(\texttt{wiggle} with negative depth).
\begin{center}
\url{http://people.csail.mit.edu/jaffer/Marbling/How-To}
\end{center}
demonstrates this.
\begin{verbatim}
angle period ofst depth wiggle

Applies sinsusoidal wiggle: y=depth*sin(360*x/period+ofst).

angle     Wiggle will be perpendicular to angle from y-axis up.
period    Period of the sinusoidal wiggle (in degrees)
depth     Amplitude of the sinusoidal wiggle
ofst      Displacement of the sinusoidal wiggle (phase)

\end{verbatim}
The direction is defined by the angle (we call it $\alpha=$ \texttt{angle}) with respect to the $y$-axis upwards; a positive value of $\alpha$ points clockwise.
\texttt{(dx, dy)} represents the unit vector in the desired deformation direction, $(u_x=\cos\alpha, u_y=\sin\alpha)$.
\[
a=f(y u_x -xu_y)\Longrightarrow x'=x+au_x;\ y'=y+au_y
\]


\newpage


\textbf{Example 1:}

If one wishes to obtain a sinusoidal undulation parallel to the axis $Oy$, we set $\alpha=0$. In this case $(u_x=1, u_y=0)$, and a function i. e., a sinusoidal function with amplitude 50 (\texttt{depth}) and angular velocity (\texttt{period}) $\omega=5$: $f(x,y)=50\sin(5y)$, we will have:

$x'=x+50\sin(5y); \ y'=y$.

It is recalled that the coordinates are in mm. If on the interval $-500 <x <500 $ we want 5 \textit{periods}, we will take as angular velocity (\texttt{period}): $\omega=5\times 360/1000 = 1.8$ and as we want it in degrees, we multiply by 360: $1.8\times 360=648$
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[drawcontours,bckg=false,
linewidth=0.2,
    actions={
    0 0 35 colors 33 concentric-rings
    -90 648 0 50 wiggle
    }](10,10)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[drawcontours,bckg=false,
linewidth=0.2,
    actions={
    0 0 35 colors 33 concentric-rings
    -90 648 0 50 wiggle
    }](10,10)
\end{pspicture}
\end{verbatim}}


\newpage


\textbf{Example 2:}

For a sinusoidal undulation parallel to the axis $Ox$, we set $\alpha=90$. In that case $(u_x=0,u_y=1)$, the function becomes $f(x,y)=50\sin(5x)$, thus:

$x'=x;\ y'=y+50\sin(5x)$.
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[drawcontours,bckg=false,
linewidth=0.2,
    actions={
    0 0 35 colors 33 concentric-rings
    0 648 0 50 wiggle
    }](10,10)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[drawcontours,bckg=false,
linewidth=0.2,
    actions={
    0 0 35 colors 33 concentric-rings
    0 648 0 50 wiggle
    }](10,10)
\end{pspicture}
\end{verbatim}}


\newpage


\textbf{Example 3:}

For a sinusoidal undulation in direction of the line $y=x$, we set $\alpha=45^\mathrm{o}$ :
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
    actions={
    0 0 35 colors 33 concentric-rings
    45 648 0 50 wiggle
    }](10,10)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
    actions={
    0 0 35 colors 33 concentric-rings
    45 648 0 50 wiggle
    }](10,10)
\end{pspicture}
\end{verbatim}}


\newpage


\textbf{Example 4:}

\textbf{Note:} These transformations can be combined and also be reversed, example:
\begin{center}
\begin{pspicture}(-4,-4)(4,4)
\psMarble[
actions={
0 0 50 colors 25 concentric-rings
0 1080 0 30 wiggle
0 1080 0 -30 wiggle % reverse action
}](8,8)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-4,-4)(4,4)
\psMarble[
actions={
0 0 50 colors 25 concentric-rings
0 1080 0 30 wiggle
0 1080 0 -30 wiggle % reverse action
}](8,8)
\end{pspicture}
\end{verbatim}}


\newpage


\subsection{\texttt{shift}}

\begin{verbatim}
angle rad shift

angle   Angle from vertical (clockwise)
rad     Length of displacement vector
\end{verbatim}
The choice of units was made, so that 100 pts correspond to 1 cm within the image. \texttt{rad} is the length shifted.
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=50,
colors={
[0.134 0.647 1.000]
[0.977 0.855 0.549]
[0.684 0.638 0.702]
[0.730 0.965 0.942]
[0.040 0.236 0.424]
},
actions={
0 0 43 colors 32 concentric-rings
30 300 shift}]
\pstVerb{
/scaleFactor 10 1000 div def
/xS1 30 sin 300 mul scaleFactor mul def
/yS1 30 cos 300 mul scaleFactor mul def
}%
\rput(!xS1 yS1){\psline(0.5,0)(-0.5,0)\psline(0,0.5)(0,-0.5)}
\psline[linestyle=dashed](-5,0)(5,0)
\psline[linestyle=dashed](0,-5)(0,5)
\psline[linecolor=red]{->}(0,0)(3;60)
\psarcn[linecolor=red]{->}(0,0){2.5}{90}{60}
\uput{1.7}[75](0,0){\color{red}angle}
\end{pspicture}
\end{center}
The displacement vector is given by its \texttt{angle} $\alpha$ and its length \texttt{rad} in pts.
{\tiny\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=50,
colors={
[0.134 0.647 1.000]
[0.977 0.855 0.549]
[0.684 0.638 0.702]
[0.730 0.965 0.942]
[0.040 0.236 0.424]
},
actions={
0 0 43 colors 32 concentric-rings
30 300 shift}]
\pstVerb{
/scaleFactor 10 1000 div def
/xS1 30 sin 300 mul scaleFactor mul def
/yS1 30 cos 300 mul scaleFactor mul def
}%
\rput(!xS1 yS1){\psline(0.5,0)(-0.5,0)\psline(0,0.5)(0,-0.5)}
\psline[linestyle=dashed](-5,0)(5,0)
\psline[linestyle=dashed](0,-5)(0,5)
\psline[linecolor=red]{->}(0,0)(3;60)
\psarcn[linecolor=red]{->}(0,0){2.5}{90}{60}
\uput{1.7}[75](0,0){\color{red}angle}
\end{pspicture}
\end{verbatim}}


\newpage


\section{Combined actions -- Gallery}

Note that \texttt{pst-marble} ships with an ``examples'' folder. Therein some example files contain some advanced PostScript techniques (for the interested PostScript user).

\textbf{Example 1:}

\begin{center}
\begin{pspicture*}(-4,-1)(4,12)
\psMarble[viscosity=1000,
colors={
(36462a)
(4f6335)
(5d723c)
(78965b)
(a6a780)
},
actions={
0 0 45 colors 26 concentric-rings
-30 150 shift
-100 20 140
{/idx exch def
-270 idx sub -30 idx 2 mul add [-270 idx 3 mul sub] 10 90 50 stir
} for
0 720 0 10 wiggle
}](8,24)
\end{pspicture*}
\end{center}
{\footnotesize\begin{verbatim}
\begin{pspicture*}(-4,-1)(4,12)
\psMarble[viscosity=1000,
colors={
(36462a)
(4f6335)
(5d723c)
(78965b)
(a6a780)
},
actions={
0 0 45 colors 26 concentric-rings
-30 150 shift
-100 20 140
{/idx exch def
-270 idx sub -30 idx 2 mul add [-270 idx 3 mul sub] 10 90 50 stir
} for
0 720 0 10 wiggle
}](8,24)
\end{pspicture*}
\end{verbatim}}


\newpage


\textbf{Example 2:}

\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=1000,
background={[0.9 0.9 0.9]},
actions={
  -400 200 400
  {/idx exch def
  0 idx 90 [ 5 200 0 tines ] [0.22 0.27 0.40] 80 line-drops
  } for
  -400 200 400
  {/idx exch def
  0 idx 90 [ 5 200 10 tines ] [0.49 0.75 0.79] 60 line-drops
  } for
  -400 200 400
  {/idx exch def
  0 idx 90 [ 5 200 -5 tines ] [0.90 0.80 0.47] 30 line-drops
  } for
  -400 200 400
  {/idx exch def
  0 idx 90 [ 5 200 -5 tines ] [0.98 0.27 0.32] 60 line-drops
  } for
180 [11 100 0 tines] 50 100 30 rake
}](10,10)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=1000,
background={[0.9 0.9 0.9]},
actions={
  -400 200 400
  {/idx exch def
  0 idx 90 [ 5 200 0 tines ] [0.22 0.27 0.40] 80 line-drops
  } for
  -400 200 400
  {/idx exch def
  0 idx 90 [ 5 200 10 tines ] [0.49 0.75 0.79] 60 line-drops
  } for
  -400 200 400
  {/idx exch def
  0 idx 90 [ 5 200 -5 tines ] [0.90 0.80 0.47] 30 line-drops
  } for
  -400 200 400
  {/idx exch def
  0 idx 90 [ 5 200 -5 tines ] [0.98 0.27 0.32] 60 line-drops
  } for
180 [11 100 0 tines] 50 100 30 rake
}](10,10)
\end{pspicture}
\end{verbatim}}


\newpage


\textbf{Example 3:}

\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
actions={
0 0 40 colors 26 concentric-rings
0 [0] 40 200 31 rake
0 0 -32e3 750 vortex
}](10,10)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
actions={
0 0 40 colors 26 concentric-rings
0 [0] 40 200 31 rake
0 0 -32e3 750 vortex
}](10,10)
\end{pspicture}
\end{verbatim}}


\newpage


\textbf{Example 4:}

\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=500,
actions={
 -500 100 500
 {
 /idy exch def
  -500 100 500
  {
  /idx exch def
  idx idy 55 [0.040 0.236 0.424] drop
  } for
 } for
0 0 1500 1500 0 [0.134 0.647 1] 250 18 uniform-drops
45 [6 200 0 tines] 40 200 31 rake
100 0 [-350] 30 30 15 stir
-90 [6 200 0 tines] 40 200 31 rake
0 0 [-150] 60 30 15 stir
}](10,10)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=500,
actions={
 -500 100 500
 {
 /idy exch def
  -500 100 500
  {
  /idx exch def
  idx idy 55 [0.040 0.236 0.424] drop
  } for
 } for
0 0 1500 1500 0 [0.134 0.647 1] 250 18 uniform-drops
45 [6 200 0 tines] 40 200 31 rake
100 0 [-350] 30 30 15 stir
-90 [6 200 0 tines] 40 200 31 rake
0 0 [-150] 60 30 15 stir
}](10,10)
\end{pspicture}
\end{verbatim}}


\newpage


\textbf{Example 5:}

\begin{center}
\newpsstyle{YellowGlass}{linecolor=gray,linewidth=0.1}
\newpsstyle{LensStyleHandle}{
fillstyle=gradient,framearc=0.6,linewidth=0.5\pslinewidth,
gradmidpoint=0.5,gradangle=45,gradbegin=white,gradend=gray}
\begin{pspicture}(-5,-5)(5,5)
\psset{viscosity=500,background={[1 1 1]},
colors={
[0.27 0.01 0.02]
[0.78 0.02 0.10]
[0.77 0.92 0.47]
[0.11 0.18 0.07]
[0.96 0.85 0.10]
},
actions={
    0 0 25 colors 15 concentric-rings
    0 0 100 [0.78 0.02 0.10] drop
    0 0 50 [0.77 0.92 0.47] drop
    0 0 20 [0.11 0.18 0.00] drop
     0 72 359
   {
       /a exch 2 mul def
       a sin 400 mul a cos 400 mul a sin 100 mul a cos 100 mul 10 50 stylus
    } for
    }}%
\psMarble(10,10)
\PstLens[LensMagnification=2,LensRotation=50,LensSize=2,LensShadow=false,%
LensStyleGlass=YellowGlass](1,-1){
\psMarble(10,10)}
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\newpsstyle{YellowGlass}{linecolor=gray,linewidth=0.1}
\newpsstyle{LensStyleHandle}{
fillstyle=gradient,framearc=0.6,linewidth=0.5\pslinewidth,
gradmidpoint=0.5,gradangle=45,gradbegin=white,gradend=gray}
\begin{pspicture}(-5,-5)(5,5)
\psset{viscosity=500,background={[1 1 1]},
colors={
[0.27 0.01 0.02]
[0.78 0.02 0.10]
[0.77 0.92 0.47]
[0.11 0.18 0.07]
[0.96 0.85 0.10]
},
actions={
    0 0 25 colors 15 concentric-rings
    0 0 100 [0.78 0.02 0.10] drop
    0 0 50 [0.77 0.92 0.47] drop
    0 0 20 [0.11 0.18 0.00] drop
     0 72 359
   {
       /a exch 2 mul def
       a sin 400 mul a cos 400 mul a sin 100 mul a cos 100 mul 10 50 stylus
    } for
    }}%
\psMarble(10,10)
\PstLens[LensMagnification=2,LensRotation=50,LensSize=2,LensShadow=false,%
LensStyleGlass=YellowGlass](1,-1){
\psMarble(10,10)}
\end{pspicture}
\end{verbatim}}


\newpage


\textbf{Example 6:}

\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=1000,background={[0.64 0.70 0.79]},
actions={
   11 -1 1
    {
    /rad exch sqrt 50 mul def
    0 0 rad [0.64 0.70 0.79] drop
    0 0 rad [0.14 0.75 0.87] drop
    0 0 rad [0.95 0.74 0.00] drop
    0 0 rad [1.00 0.04 0.08] drop
    } for
-500 100 0 {/xpos exch def
     xpos -500 xpos 0 50 20 stylus
     } for
0 100 500 {/xpos exch def
     xpos 500 xpos 0 50 20 stylus
     } for
-500 100 0 {/ypos exch def
     500 ypos 0 ypos 50 20 stylus
     } for
0 100 500 {/ypos exch def
     -500 ypos 0 ypos 50 20 stylus
     } for
   }](10,10)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=1000,background={[0.64 0.70 0.79]},
actions={
   11 -1 1
    {
    /rad exch sqrt 50 mul def
    0 0 rad [0.64 0.70 0.79] drop
    0 0 rad [0.14 0.75 0.87] drop
    0 0 rad [0.95 0.74 0.00] drop
    0 0 rad [1.00 0.04 0.08] drop
    } for
-500 100 0 {/xpos exch def
     xpos -500 xpos 0 50 20 stylus
     } for
0 100 500 {/xpos exch def
     xpos 500 xpos 0 50 20 stylus
     } for
-500 100 0 {/ypos exch def
     500 ypos 0 ypos 50 20 stylus
     } for
0 100 500 {/ypos exch def
     -500 ypos 0 ypos 50 20 stylus
     } for
   }](10,10)
\end{pspicture}
\end{verbatim}}


\newpage


\textbf{Example 7:}

\begin{center}
\begin{pspicture}(-6,-6)(6,6)
  \psMarble[
    background={
      [ 222 186 149 ]
    },
    viscosity=1000,
    actions={
    0 0 [ 12 100 -100 tines ] [ 12 98 80 tines ] 0 [ 76 95 63 ] 45 serpentine-drops
    0 0 [ 12 115 -100 tines ] [ 12 109.5 3 tines ] 0 [ 176 195 63 ] 20 serpentine-drops
    90  [ 9 228 18 tines ] 40 200 31 rake
    -90 [ 9 228 -132 tines ] 40 200 31 rake
    0 0 [ -350 ] 30 30 15 stir
    0 0 [ -150 ] 60 30 15 stir
    }
  ](12,12)
\end{pspicture}
\end{center}
{\footnotesize\begin{verbatim}
\begin{pspicture}(-6,-6)(6,6)
  \psMarble[
    background={
      [ 222 186 149 ]
    },
    viscosity=1000,
    actions={
    0 0 [ 12 100 -100 tines ] [ 12 98 80 tines ] 0 [ 76 95 63 ] 45 serpentine-drops
    0 0 [ 12 115 -100 tines ] [ 12 109.5 3 tines ] 0 [ 176 195 63 ] 20 serpentine-drops
    90  [ 9 228 18 tines ] 40 200 31 rake
    -90 [ 9 228 -132 tines ] 40 200 31 rake
    0 0 [ -350 ] 30 30 15 stir
    0 0 [ -150 ] 60 30 15 stir
    }
  ](12,12)
\end{pspicture}
\end{verbatim}}


\newpage


\textbf{Example 8:}

\begin{center}
\begin{pspicture}(-7.5,-8)(7.5,8)
\psMarble[
actions={
0 0 40 colors 26 concentric-rings
90 50 shift
0 0 [75 150 225 400 375 450] 10 180 30 stir
}](15,16)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-7.5,-8)(7.5,8)
\psMarble[
actions={
0 0 40 colors 26 concentric-rings
90 50 shift
0 0 [75 150 225 400 375 450] 10 180 30 stir
}](15,16)
\end{pspicture}
\end{verbatim}}


\newpage


\textbf{Example 9:}


\begin{minipage}[t]{10cm}\kern0pt
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
background={
[0.9 0.9 0.9]
},
colors={
[0.176 0.353 0.129]
[0.635 0.008 0.094]
[0.078 0.165 0.518]
[0.824 0.592 0.031]
[0.059 0.522 0.392]
[0.816 0.333 0.475]
},
viscosity=1000,
actions={
0 0 600 colors 4 get drop
-200 -90 100 colors 5 get drop
-200 -200 200 colors 0 get drop
-200 200 200 colors 1 get drop
200 -200 200 colors 2 get drop
200 200 200 colors 3 get drop
0 0 32e3 750 vortex
0 -500 850 -30 212 -5 colors 1 get 5 50 coil-drops
0 -500 840 -30 215 5 colors 0 get 5 50 coil-drops
0 -500 850 -30 220 0 colors 4 get 5 50 coil-drops
0 0 150 0 70 10 [105 160 99] 35 20 coil-drops
250 0 [ 120 80 ] 20 100 20 stir
}
]
\psMarble[
colors={
[0 0 0]
[0 0 0]
[0 0 0]
[0 0 0]
[0 0 0]
[0 0 0]
},
viscosity=1000,drawcontours,linewidth=0.2,linecolor=black,bckg=false,
actions={
0 0 600 colors 4 get drop
-200 -90 100 colors 5 get drop
-200 -200 200 colors 0 get drop
-200 200 200 colors 1 get drop
200 -200 200 colors 2 get drop
200 200 200 colors 3 get drop
0 0 32e3 750 vortex
0 -500 850 -30 212 -5 colors 1 get 5 50 coil-drops
0 -500 840 -30 215 5 colors 0 get 5 50 coil-drops
0 -500 850 -30 220 0 colors 4 get 5 50 coil-drops
0 0 150 0 70 10 [0 0 0] 35 20 coil-drops
250 0 [ 120 80 ] 20 100 20 stir
}
]
\end{pspicture}
\end{minipage}
\begin{minipage}[t]{8cm}
{\tiny\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
background={
[0.9 0.9 0.9]
},
colors={
[0.176 0.353 0.129]
[0.635 0.008 0.094]
[0.078 0.165 0.518]
[0.824 0.592 0.031]
[0.059 0.522 0.392]
[0.816 0.333 0.475]
},
viscosity=1000,
actions={
0 0 600 colors 4 get drop
-200 -90 100 colors 5 get drop
-200 -200 200 colors 0 get drop
-200 200 200 colors 1 get drop
200 -200 200 colors 2 get drop
200 200 200 colors 3 get drop
0 0 32e3 750 vortex
0 -500 850 -30 212 -5 colors 1 get 5 50 coil-drops
0 -500 840 -30 215 5 colors 0 get 5 50 coil-drops
0 -500 850 -30 220 0 colors 4 get 5 50 coil-drops
0 0 150 0 70 10 [105 160 99] 35 20 coil-drops
250 0 [ 120 80 ] 20 100 20 stir
}
]
\psMarble[
colors={
[0 0 0]
[0 0 0]
[0 0 0]
[0 0 0]
[0 0 0]
[0 0 0]
},
viscosity=1000,drawcontours,linewidth=0.2,linecolor=black,bckg=false,
actions={
0 0 600 colors 4 get drop
-200 -90 100 colors 5 get drop
-200 -200 200 colors 0 get drop
-200 200 200 colors 1 get drop
200 -200 200 colors 2 get drop
200 200 200 colors 3 get drop
0 0 32e3 750 vortex
0 -500 850 -30 212 -5 colors 1 get 5 50 coil-drops
0 -500 840 -30 215 5 colors 0 get 5 50 coil-drops
0 -500 850 -30 220 0 colors 4 get 5 50 coil-drops
0 0 150 0 70 10 [0 0 0] 35 20 coil-drops
250 0 [ 120 80 ] 20 100 20 stir
}
]
\end{pspicture}
\end{verbatim}}
\end{minipage}


\newpage


\textbf{Example 10:}

\begin{center}
\begin{pspicture}(-6,-6)(6,6)
  \psMarble[
    background={
      [0.1 0 0.1]
    },
    colors={
      (e7cc9b)
      (c28847)
      (80410b)
    },
    viscosity=1000,
    actions={
      %% coffee mug rim and stirred foam
      0 0 150 [ .8 .8 .7 ] drop
      0 0 150 [ .8 .9 .8 ] drop
      0 0 150 [ .9 .9 .8 ] drop
      0 0 500 colors 2 get drop
      0 0 283 0 1 colors 1 get 30 30 Gaussian-drops
      0 0 -50e3 100 vortex
      %% tulip
      0 -250 55 colors 0 get drop
      0 -200 35 colors 2 get drop
      0 -150 55 colors 0 get drop
      0 -100 35 colors 2 get drop
      0 -50 55 colors 0 get drop
      0 75 0 -450 20 30 stylus
      %% wreath
      0 10 390 90 95 0 colors 1 get 14 25 coil-drops
      0 0 400 90 100 0 colors 0 get 14 40 coil-drops
      0 0 [ -400 ] 1 20 31 stir
      %% short vine
      -100 250 75 [ 6 80 0 tines ] colors 1 get 20 line-drops
      -100 250 75 [ 6 80 0 tines ] colors 0 get 30 line-drops
      -300 200 300 350 20 30 stylus
    }
  ](12,12)
\end{pspicture}
\end{center}
{\tiny\begin{verbatim}
\begin{pspicture}(-6,-6)(6,6)
  \psMarble[
    background={
      [0.1 0 0.1]
    },
    colors={
      (e7cc9b)
      (c28847)
      (80410b)
    },
    viscosity=1000,
    actions={
      %% coffee mug rim and stirred foam
      0 0 150 [ .8 .8 .7 ] drop
      0 0 150 [ .8 .9 .8 ] drop
      0 0 150 [ .9 .9 .8 ] drop
      0 0 500 colors 2 get drop
      0 0 283 0 1 colors 1 get 30 30 Gaussian-drops
      0 0 -50e3 100 vortex
      %% tulip
      0 -250 55 colors 0 get drop
      0 -200 35 colors 2 get drop
      0 -150 55 colors 0 get drop
      0 -100 35 colors 2 get drop
      0 -50 55 colors 0 get drop
      0 75 0 -450 20 30 stylus
      %% wreath
      0 10 390 90 95 0 colors 1 get 14 25 coil-drops
      0 0 400 90 100 0 colors 0 get 14 40 coil-drops
      0 0 [ -400 ] 1 20 31 stir
      %% short vine
      -100 250 75 [ 6 80 0 tines ] colors 1 get 20 line-drops
      -100 250 75 [ 6 80 0 tines ] colors 0 get 30 line-drops
      -300 200 300 350 20 30 stylus
    }
  ](12,12)
\end{pspicture}
\end{verbatim}}


\newpage


\textbf{Example 11}

\begin{center}
\begin{pspicture}(-6,-6)(6,6)
  \psMarble[
    colors={
      [0.275 0.569 0.796][0.965 0.882 0.302]
      [0.176 0.353 0.129][0.635 0.008 0.094]
      [0.078 0.165 0.518][0.824 0.592 0.031]
      [0.059 0.522 0.392][0.816 0.333 0.475]
      [0.365 0.153 0.435][0.624 0.588 0.439]
    },
    actions={
      0 0 48 colors 25 concentric-rings
      90  [-150 450] 100 750 31 rake
      -90 [-150 450] 100 750 31 rake
      180 [ 25 50 0 tines ] 30 200 31 rake
      0 230 shift
    }
  ](12,12)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-6,-6)(6,6)
  \psMarble[
    colors={
      [0.275 0.569 0.796][0.965 0.882 0.302]
      [0.176 0.353 0.129][0.635 0.008 0.094]
      [0.078 0.165 0.518][0.824 0.592 0.031]
      [0.059 0.522 0.392][0.816 0.333 0.475]
      [0.365 0.153 0.435][0.624 0.588 0.439]
    },
    actions={
      0 0 48 colors 25 concentric-rings
      90  [-150 450] 100 750 31 rake
      -90 [-150 450] 100 750 31 rake
      180 [ 25 50 0 tines ] 30 200 31 rake
      0 230 shift
    }
  ](12,12)
\end{pspicture}
\end{verbatim}}


\newpage


\textbf{Example 12}

\begin{center}
\begin{pspicture}(-6,-6)(6,6)
  \psMarble[
    background={
      [ 100 40 40 ]
    },
    colors={
      [ 76 95 63 ]
      [ 53 97 122 ]
      [ 128 78 46 ]
    },
    actions={
    0 0 1000 1000 0 [ 222 186 149 ]  85 1.72 10 mul uniform-drops
    0 0 1000 1000 0 colors          250 1.72 16 mul uniform-drops
    0 0 1000 1000 0 [ 222 186 149 ] 100 1.72  7 mul uniform-drops
    0 0 [ 100 ] 40 300 31 stir
    0 0 [ 200 275 ] 20 120 10 stir
    0 0 [ 325 ] 20 90 31 stir
    }
  ](12,12)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-6,-6)(6,6)
  \psMarble[
    background={
      [ 100 40 40 ]
    },
    colors={
      [ 76 95 63 ]
      [ 53 97 122 ]
      [ 128 78 46 ]
    },
    actions={
    0 0 1000 1000 0 [ 222 186 149 ]  85 1.72 10 mul uniform-drops
    0 0 1000 1000 0 colors          250 1.72 16 mul uniform-drops
    0 0 1000 1000 0 [ 222 186 149 ] 100 1.72  7 mul uniform-drops
    0 0 [ 100 ] 40 300 31 stir
    0 0 [ 200 275 ] 20 120 10 stir
    0 0 [ 325 ] 20 90 31 stir
    }
  ](12,12)
\end{pspicture}
\end{verbatim}


\newpage


\textbf{Example 13: Blendmodes}

In case one want to overlap various marblings one can use the following blendmodes (basic option in PSTricks):

\texttt{/Normal: blendmode=0},
\texttt{/Compatible: blendmode=1},
\texttt{/Screen: blendmode=2},
\texttt{/Multiply: blendmode=3},

\texttt{/HardLight: blendmode=4},
\texttt{/Darken: blendmode=5},
\texttt{/Lighten: blendmode=6},
\texttt{/Difference: blendmode=7},

\texttt{/ColorDodge: blendmode=8},
\texttt{/ColorBurn: blendmode=9},
\texttt{/SoftLight: blendmode=10},
\texttt{/Hue: blendmode=11},

\texttt{/Saturation: blendmode=12},
\texttt{/Luminosity: blendmode=13},
\texttt{/Overlay: blendmode=14},

\texttt{/Exclusion: blendmode=15},
\texttt{/Color: blendmode=16}.

Just set
\begin{verbatim}
\psMarble[blendmode=5,shapealpha=1, ...]
\end{verbatim}

\medskip

\begin{center}
\begin{pspicture}(-4,-4)(4,4)
\pstVerb{%
[ /BM /Darken /ca 1 /CA 1 /SetTransparency pdfmark
}
\psMarble[viscosity=1000,
actions={
0 0 200 0 1 [1 0 0] 10 50 Gaussian-drops
0 0 200 0 1 [0.7 0.5 0] 50 20 Gaussian-drops
0 0 300 0 1 [0 0 0.5] 15 75 Gaussian-drops
}](8,8)
\psMarble[viscosity=1000,bckg=false,
actions={
      -300 92 500
      {
        0 exch 90 [ 12 100 -100 tines ] [ 76 95 63 ] 45 line-drops
      } for
    90 [11 200 0 tines] 40 200 31 rake
    -90 [11 200 0 tines] 40 200 31 rake
    0 0 [-350] 30 30 15 stir
    0 0 [-150] 60 30 15 stir
    }](8,8)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-4,-4)(4,4)
\psMarble[blendmode=5,shapealpha=1,viscosity=1000,
actions={
0 0 200 0 1 [1 0 0] 10 50 Gaussian-drops
0 0 200 0 1 [0.7 0.5 0] 50 20 Gaussian-drops
0 0 300 0 1 [0 0 0.5] 15 75 Gaussian-drops
}](8,8)
\psMarble[blendmode=5,shapealpha=1,viscosity=1000,bckg=false,
actions={
      -300 92 500
      {
        0 exch 90 [ 12 100 -100 tines ] [ 76 95 63 ] 45 line-drops
      } for
    90 [11 200 0 tines] 40 200 31 rake
    -90 [11 200 0 tines] 40 200 31 rake
    0 0 [-350] 30 30 15 stir
    0 0 [-150] 60 30 15 stir
    }](8,8)
\end{pspicture}
\end{verbatim}}


\newpage


\textbf{Example 14: Transparency}

In case one want to overlap various marblings one can also use transparency, which is a basic option in PSTricks \texttt{opacity=}. Just set
\begin{verbatim}
\psMarble[opacity=0.45, ...]
\end{verbatim}
The values need to be from 0 to 1.


%The transparency is setup right after \texttt{actions=\{} like: \texttt{0.45 .setopacityalpha} or some other value between 0 and 1.
%
%For Distiller users we set the equivalent: \texttt{[ /ca 0.45 /CA 0.45 /SetTransparency pdfmark}

\medskip

\begin{center}
\begin{pspicture}(-4,-4)(4,4)
\pstVerb{%
[ /ca 0.35 /CA 0.35 /SetTransparency pdfmark
}
\psMarble[viscosity=1000,
actions={
0 0 200 0 1 [1 0 0] 10 50 Gaussian-drops
0 0 200 0 1 [0 1 0] 50 20 Gaussian-drops
0 0 300 0 1 [0 0 1] 15 75 Gaussian-drops
}](8,8)
\psMarble[viscosity=1000,bckg=false,
actions={
      -300 92 500
      {
        0 exch 90 [ 12 100 -100 tines ] [ 76 95 63 ] 45 line-drops
      } for
    90 [11 200 0 tines] 40 200 31 rake
    -90 [11 200 0 tines] 40 200 31 rake
    0 0 [-350] 30 30 15 stir
    0 0 [-150] 60 30 15 stir
    }](8,8)
\pstVerb{%
[ /ca 1 /CA 1 /SetTransparency pdfmark
}
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-4,-4)(4,4)
\psMarble[opacity=0.35,viscosity=1000,
actions={
0 0 200 0 1 [1 0 0] 10 50 Gaussian-drops
0 0 200 0 1 [0 1 0] 50 20 Gaussian-drops
0 0 300 0 1 [0 0 1] 15 75 Gaussian-drops
}](8,8)
\psMarble[opacity=0.35,viscosity=1000,bckg=false,
actions={
      -300 92 500
      {
        0 exch 90 [ 12 100 -100 tines ] [ 76 95 63 ] 45 line-drops
      } for
    90 [11 200 0 tines] 40 200 31 rake
    -90 [11 200 0 tines] 40 200 31 rake
    0 0 [-350] 30 30 15 stir
    0 0 [-150] 60 30 15 stir
    }](8,8)
\end{pspicture}
\end{verbatim}}


\newpage


\section{Acknowledgments}

Many thanks to D. P. Story who coded some additions to the \texttt{pst-marble.pro} file so it might be used for Adobe Distiller users.

The file size for the documentation could so be reduced tremendously.

\bigskip

Also many thanks to A. Grahn who sent a patch to use transparency and blendmode effects with the usual PSTricks options.

%\newpage
%
%
%\section{List of all optional arguments for \texttt{pst-marble}}
%
%\xkvview{family=pst-marble,columns={key,type,default}}
%
%\clearpage
%
%\nocite{*}
%\bgroup
%\RaggedRight
%\printbibliography
%\egroup
%
%\printindex
\end{document}